The Taxes API allows you to manage tax settings for your store, including tax rates, exemptions, and rules for different regions and product types.
Retrieve a list of all tax rules in your store. This endpoint supports pagination and filtering.
Parameter | Type | Required | Description |
---|---|---|---|
page |
integer | No | Page number (default: 1) |
items_per_page |
integer | No | Number of items per page (default: 10) |
country_code |
string | No | Filter tax rules by country code |
state_code |
string | No | Filter tax rules by state/province code |
rate_min |
float | No | Filter tax rules by minimum rate |
rate_max |
float | No | Filter tax rules by maximum rate |
{ "taxes": [ { "tax_id": "12", "tax_name": "Sales Tax - California", "rate_type": "P", "rate_value": "7.25", "country_code": "US", "state_code": "CA", "status": "A" }, { "tax_id": "13", "tax_name": "GST - Canada", "rate_type": "P", "rate_value": "5.00", "country_code": "CA", "state_code": "", "status": "A" } ], "params": { "page": 1, "items_per_page": 10, "total_items": 2 } }
Retrieve details for a specific tax rule by its ID.
{ "tax_id": "12", "tax_name": "Sales Tax - California", "description": "California state sales tax", "rate_type": "P", "rate_value": "7.25", "priority": "0", "country_code": "US", "state_code": "CA", "zip_codes": "", "address_type": "S", "product_categories": [], "tax_exemptions": [], "price_includes_tax": "N", "status": "A" }
Create a new tax rule.
Parameter | Type | Required | Description |
---|---|---|---|
tax_name |
string | Yes | Name of the tax rule |
rate_type |
string | Yes | Type of rate: "P" for percentage, "F" for fixed amount |
rate_value |
string | Yes | Tax rate value |
country_code |
string | Yes | Two-letter country code |
state_code |
string | No | State/province code |
address_type |
string | No | Address type: "S" for shipping, "B" for billing |
product_categories |
array | No | Array of product category IDs this tax applies to |
{ "tax_name": "New York City Tax", "description": "NYC local sales tax", "rate_type": "P", "rate_value": "4.5", "country_code": "US", "state_code": "NY", "zip_codes": "10001,10002,10003,10004,10005,10006,10007", "address_type": "S", "price_includes_tax": "N", "status": "A" }
Update an existing tax rule.
{ "rate_value": "8.25", "description": "Updated California state sales tax", "status": "A" }
Delete a tax rule.
Code | Description |
---|---|
A |
Active |
D |
Disabled |
H |
Hidden |
Code | Description |
---|---|
P |
Percentage (e.g., 7.25%) |
F |
Fixed amount (e.g., $5.00) |
Code | Description |
---|---|
S |
Shipping address |
B |
Billing address |