Tax Regions API Routes
A tax region is a region's tax settings. It has tax rates and rules. So, after you create a region, you must create a tax region for it.
A tax region can extend settings from a parent tax region.
These API routes allow admin users to manage tax regions.
GET /admin/tax-regions#
List Tax Regions
Retrieve a list of tax regions. The tax regions can be filtered by fields such as id. The tax regions 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-.qstringOptionalidstring | string[]Optionalcountry_codestring | string[] | objectOptionalprovince_codestring | string[] | objectOptionalparent_idstring | string[] | objectOptionalcreated_bystring | string[]Optionalcreated_atstring | objectOptionalupdated_atstring | objectOptionaldeleted_atstring | objectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumbertax_regionsobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/tax-regions#
Create Tax Region
Create a tax region.
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)
country_codestringusprovince_codestringOptionalus-caparent_idstringOptionaldefault_tax_rateobjectOptionalThe tax region's default tax rate.
default_tax_rateobjectOptionalmetadataobjectOptionalprovider_idstringOptionalRequest examples
Responses
200 OK
tax_regionobjectThe tax region's details.
tax_regionobject400, 401, 404, 409, 422, 500: an error response is returned.
GET /admin/tax-regions/{id}#
Get a Tax Region
Retrieve a tax region by its ID. You can expand the tax region'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_regionobjectThe tax region's details.
tax_regionobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/tax-regions/{id}#
Update a Tax Region
Update a tax region'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)
province_codestringOptionalus-cametadataobjectOptionalprovider_idstringOptionalRequest examples
Responses
200 OK
tax_regionobjectThe tax region's details.
tax_regionobject400, 401, 404, 409, 422, 500: an error response is returned.
DELETE /admin/tax-regions/{id}#
Delete a Tax Region
Delete a tax region.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "tax_region"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.