Skip to main content

Tax Management API

Overview​

The Tax Management API provides endpoints for managing tax rules in your EverShop store. Tax rules are essential for calculating and applying taxes to orders based on various criteria such as customer location, product type, and more.

Endpoints​

Create A Tax Class​

Creates a new tax class in the system. You can specify the class name, and associated tax rules.

Request Schema (application/json)
Field NameField TypeRequired
namestringYes
POST/api/tax/classes
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/tax/classes
Sample Of Response
{
"data": {
"tax_class_id": 1,
"uuid": "e15da567a66c11edb46b60d819134f39",
"name": "Taxable Goods"
}
}

Update A Tax Class​

Updates an existing tax class with new information.

Request Schema (application/json)
Field NameField TypeRequired
namestringNo
PATCH/api/tax/classes/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/tax/classes/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"tax_class_id": 1,
"uuid": "e15da567a66c11edb46b60d819134f39",
"name": "Taxable Goods"
}
}

Create A Tax Rate​

Creates a new tax rate in the system. You can specify the rate amount, associated tax class, and other details.

Request Schema (application/json)
Field NameField TypeRequired
namestringYes
countrystringNo
provincestringNo
postcodestringNo
ratestring or numberYes
is_compoundstring or number (0, 1, '0', '1')No
prioritystring or numberNo
POST/api/tax/classes/:class_id/rates
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/tax/classes/:class_id/rates
Sample Of Response
{
"data": {
"tax_rate_id": 1,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"name": "Taxable Goods",
"tax_class_id": 1,
"country": "US",
"province": "CA",
"postcode": "90001",
"rate": "7.25",
"is_compound": 0,
"priority": 1
}
}

Update A Tax Rate​

Updates an existing tax rate in the system. You can specify the new rate amount, associated tax class, and other details.

Request Schema (application/json)
Field NameField TypeRequired
namestringYes
countrystringNo
provincestringNo
postcodestringNo
ratestring or numberYes
is_compoundstring or number (0, 1, '0', '1')No
prioritystring or numberNo
PATCH/api/tax/rates/:id
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/tax/rates/:id
Sample Of Response
{
"data": {
"tax_rate_id": 1,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"name": "Taxable Goods",
"tax_class_id": 1,
"country": "US",
"province": "CA",
"postcode": "90001",
"rate": "7.25",
"is_compound": 0,
"priority": 1
}
}

Delete A Tax Rate​

Deletes an existing tax rate from the system.

Request Schema (application/json)
No request body required
DELETE/api/tax/rates/:id
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
https://<your domain>/api/tax/rates/:id
Sample Of Response
{
"data": {
"tax_rate_id": 1,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"name": "Taxable Goods",
"tax_class_id": 1,
"country": "US",
"province": "CA",
"postcode": "90001",
"rate": "7.25",
"is_compound": 0,
"priority": 1
}
}

Get Tax Data with GraphQL​

EverShop uses GraphQL for querying tax data. For detailed information on how to query tax data, refer to the GraphQL API documentation.