Tax

Set up tax classes, zones, and rates

GET /admin/api/tax/classes

List all tax classes. Includes built-in classes (Standard, Reduced, Zero) and any custom classes.

Response 200

{
  "classes": [
    {
      "id": 1,
      "name": "Standard",
      "created_at": "2025-11-01T00:00:00Z"
    },
    {
      "id": 2,
      "name": "Reduced",
      "created_at": "2025-11-01T00:00:00Z"
    },
    {
      "id": 3,
      "name": "Zero",
      "created_at": "2025-11-01T00:00:00Z"
    }
  ]
}

Example

curl "https://yourshop.zeroshop.io/admin/api/tax/classes" \
  -H "Authorization: Bearer zspat_..."
POST /admin/api/tax/classes

Create a custom tax class.

Request Body

{
  "name": "Digital Goods"
}

Response 201

{
  "id": 4,
  "name": "Digital Goods",
  "created_at": "2025-11-20T14:30:00Z"
}

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/tax/classes" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Digital Goods"}'
DELETE /admin/api/tax/classes/{id}

Delete a custom tax class. Built-in classes (Standard, Reduced, Zero) cannot be deleted.

Response 204

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/tax/classes/4" \
  -H "Authorization: Bearer zspat_..."
GET /admin/api/tax/zones

List all tax zones.

Response 200

{
  "zones": [
    {
      "id": 1,
      "name": "EU",
      "countries": [
        "DE",
        "FR",
        "NL"
      ],
      "created_at": "2025-11-20T14:30:00Z"
    },
    {
      "id": 2,
      "name": "United Kingdom",
      "countries": [
        "GB"
      ],
      "created_at": "2025-11-19T09:15:00Z"
    }
  ]
}

Example

curl "https://yourshop.zeroshop.io/admin/api/tax/zones" \
  -H "Authorization: Bearer zspat_..."
POST /admin/api/tax/zones

Create a new tax zone.

Request Body

{
  "name": "EU",
  "countries": [
    "DE",
    "FR",
    "NL"
  ]
}

Response 201

{
  "id": 1,
  "name": "EU",
  "countries": [
    "DE",
    "FR",
    "NL"
  ],
  "created_at": "2025-11-20T14:30:00Z"
}

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/tax/zones" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "EU",
    "countries": ["DE", "FR", "NL"]
  }'
PUT /admin/api/tax/zones/{id}

Update a tax zone's name and country list.

Request Body

{
  "name": "European Union",
  "countries": [
    "DE",
    "FR",
    "NL",
    "BE"
  ]
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/tax/zones/1" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "European Union",
    "countries": ["DE", "FR", "NL", "BE"]
  }'
DELETE /admin/api/tax/zones/{id}

Delete a tax zone and its associated rates.

Response 204

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/tax/zones/1" \
  -H "Authorization: Bearer zspat_..."
GET /admin/api/tax/zones/{id}/rates

List all tax rates for a specific zone.

Response 200

{
  "rates": [
    {
      "id": 1,
      "zone_id": 1,
      "class_id": 1,
      "rate": 2000,
      "created_at": "2025-11-20T14:30:00Z"
    },
    {
      "id": 2,
      "zone_id": 1,
      "class_id": 2,
      "rate": 700,
      "created_at": "2025-11-20T14:30:00Z"
    }
  ]
}

Example

curl "https://yourshop.zeroshop.io/admin/api/tax/zones/1/rates" \
  -H "Authorization: Bearer zspat_..."
PUT /admin/api/tax/zones/{id}/rates

Set (upsert) tax rates for a zone. Each (zone, class) pair is created or updated. Rates are in basis points (e.g. 2000 = 20.00%).

Request Body

{
  "rates": [
    {
      "class_id": 1,
      "rate": 2000
    },
    {
      "class_id": 2,
      "rate": 700
    }
  ]
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/tax/zones/1/rates" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "rates": [
      {"class_id": 1, "rate": 2000},
      {"class_id": 2, "rate": 700}
    ]
  }'

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.