Creating Tax Zone

Endpoint:  POST /admin/tax_zones

Purpose

This endpoint creates a new tax zone, defining geographic areas where specific tax rules apply. Tax zones can be radius-based or country/state-specific, allowing businesses to apply tax rates based on location.

Path Parameters

This endpoint does not require any path parameters.

Query Parameters

This endpoint does not require any query parameters

Use Case

A user creates a new tax zone to define where tax rules should apply. Businesses can use this to set up tax rates for specific regions, define taxable areas, and manage location-based tax settings for compliance.

Request Body

Key Type Description
name String Name of the tax zone.
use_radius Boolean Indicates whether to apply a radius-based tax zone.
start_location String The central location from which the radius is calculated.
radius Number The radius (likely in kilometers or miles) to define the tax zone area.
countries Array of Strings List of countries included in the tax zone.
states Array of Strings List of states or provinces included in the tax zone.
post_code String Specific postal code(s) covered by the tax zone.
{
    "tax_zone": {
        "name": "TAX_ZONE_NAME",
        "use_radius": USE_RADIUS,
        "start_location": "START_LOCATION",
        "radius": RADIUS_VALUE,
        "countries": ["COUNTRY_LIST"],
        "states": ["STATE_LIST"],
        "post_code": "POSTAL_CODE"
    }
}

Response

The response contains the created tax zone details, including zone ID, name, system-generated status, and geographic coverage. If use_radius is false, the tax zone is defined by specific countries, states, or postal codes. The response also includes timestamps for creation and last update, allowing businesses to track tax zone modifications.

POST
https://{your_site_domain}/api/v4/admin/tax_zones
Try It Out
{
    "tax_zone": {
        "id": TAX_ZONE_ID,
        "name": "TAX_ZONE_NAME",
        "system_generated": SYSTEM_GENERATED,
        "default": DEFAULT_STATUS,
        "use_radius": USE_RADIUS,
        "radius": RADIUS_VALUE,
        "start_location": "START_LOCATION",
        "countries": [
            {
                "id": COUNTRY_ID,
                "name": "COUNTRY_NAME",
                "code": "COUNTRY_CODE"
            }
        ],
        "states": [
            {
                "id": STATE_ID,
                "name": "STATE_NAME",
                "code": "STATE_CODE"
            }
        ],
        "post_code": ["POSTAL_CODE_LIST"],
        "created_at": "CREATED_TIMESTAMP",
        "updated_at": "UPDATED_TIMESTAMP"
    }
}