Tax Rates API Routes
A tax rate is a percentage amount used to calculate the tax amount of each taxable item's price, such as line items or shipping methods.
Each tax region has a default tax rate. You can create tax rates that override the default using tax rules.
These API routes allow admin users to manage tax rates and their rules.
GET /admin/tax-rates#
List Tax Rates
Retrieve a list of tax rates. The tax rates can be filtered by fields such as id. The tax rates can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionaltax_region_idstring | string[] | objectOptionalis_default"true" | "false"Optionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumbertax_ratesobject[]The tax rate's tax rates.
tax_ratesobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/tax-rates#
Create Tax Rate
Create a tax rate.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
namestringVATtax_region_idstringratenumberOptional10codestringrulesobject[]OptionalThe tax rate's rules.
rulesobject[]Optionalis_defaultbooleanOptionalis_combinablebooleanOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
tax_rateobjectThe tax rate's details.
tax_rateobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/tax-rates/{id}#
Get a Tax Rate
Retrieve a tax rate by its ID. You can expand the tax rate's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
tax_rateobjectThe tax rate's details.
tax_rateobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/tax-rates/{id}#
Update a Tax Rate
Update a tax rate's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
ratenumberOptionalcodestringOptionalrulesobject[]OptionalThe tax rate's rules.
rulesobject[]OptionalnamestringOptionalis_defaultbooleanOptionalis_combinablebooleanOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
tax_rateobjectThe tax rate's details.
tax_rateobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/tax-rates/{id}#
Delete a Tax Rate
Delete a tax rate.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "tax_rate"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/tax-rates/{id}/rules#
Create Tax Rule for a Rate
Create a tax rule for a rate.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
referencestringproduct_typereference_idstringptype_123Request examples
Responses
200 OK
tax_rateobjectThe tax rate's details.
tax_rateobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/tax-rates/{id}/rules/{rule_id}#
Remove Rule of Tax Rate
Remove a tax rate's rule.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringrule_idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
idstringobjectstringdeletedbooleanparentobjectOptionalThe tax rate's details.
parentobjectOptional400, 401, 404, 409, 422, 500: an error response is returned.