Getting Tax Codes list

Endpoint: GET /admin/tax_codes

Purpose

This endpoint retrieves a paginated list of built-in and custom tax codes configured within the system. These tax codes define tax rates, descriptions, resolver types, and regional priorities used for calculating applicable taxes during transactions.

Path Parameters

This endpoint does not require any path parameters.

Query Parameters:

Parameter
Type
Description
limit
integer
Maximum number of tax codes to return per request (default: 20)
offset
integer
Starting point for pagination
order_by
string
Field to sort by (e.g., name, rate)
direction
string
Sort direction (asc or desc)

Use Case

An admin retrieves the full list of tax code definitions, including default system-generated tax codes (e.g., GST or Sales Tax by region). This is useful for reviewing regional tax configurations, validating tax rate accuracy, and managing tax priorities for different countries or states.

Request Body

This endpoint does not require a request body.

Response 

The response includes an array of tax codes, each with an ID, name, label, description, rate, resolver type, priority, and a flag indicating if it is default. It supports pagination, with metadata for total records, limit, offset, and navigation links to the previous and next pages. This structure allows efficient navigation and management of global tax settings.

GET
https://{your_site_domain}/api/v4/admin/tax_codes
Try It Out
{
    "tax_codes": [
        {
            "id": TAX_CODE_ID,
            "name": "TAX_CODE_NAME",
            "label": "TAX_LABEL",
            "description": "TAX_DESCRIPTION",
            "rate": TAX_RATE,
            "resolver_type": "RESOLVER_TYPE",  // e.g., flat
            "priority": PRIORITY_LEVEL,
            "is_default": IS_DEFAULT
        }
    ],
    "pagination": {
        "records": TOTAL_RECORDS,
        "limit": RECORDS_LIMIT,
        "offset": RECORDS_OFFSET,
        "previous_page": "PREVIOUS_PAGE_LINK",
        "next_page": "NEXT_PAGE_LINK"
    }
}

Getting Specific Tax Code details

Endpoint: GET /admin/tax_codes/{id}

Purpose

This endpoint retrieves detailed information about a specific tax code by its ID. It provides the configuration used to apply tax during order processing, including the tax rate, type, and priority.

Path Parameters

Parameter
Type
Description
id
integer
The unique identifier of the tax code

Query Parameters

This endpoint does not require any query parameters.

Use Case

An admin retrieves the configuration of a specific tax code to review or update its details. This is essential for auditing tax logic, confirming applied rates, and maintaining tax compliance across regions or tax scenarios.

Request Body

This endpoint does not require a request body.

Response 

The response returns the complete tax code definition, including the ID, name, label, description, tax rate, resolver type, its priority, and whether it is set as default. This ensures clear visibility and control over individual tax rules applied across the platform.

GET
https://{your_site_domain}/api/v4/admin/tax_codes/{id}
Try It Out
{
    "tax_code": {
        "id": TAX_CODE_ID,
        "name": "TAX_CODE_NAME",
        "label": "TAX_LABEL",
        "description": "TAX_DESCRIPTION",
        "rate": TAX_RATE,
        "resolver_type": "RESOLVER_TYPE",
        "priority": PRIORITY_LEVEL,
        "is_default": IS_DEFAULT
    }
}