Visit Main Site
Join Partner Program
Login
     
Introduction
Authentication
Documentation
Category
GET
POST
PUT
DELETE
Products
GET
POST
PUT
DELETE
Carts
GET
POST
PATCH
DELETE
Variations
GET
POST
PUT
DELETE
Currency
GET
POST
PUT
DELETE
Tax
Tax Profile
GET
POST
PUT
DELETE
Tax Rule
GET
POST
PUT
DELETE
Tax Code
GET
POST
PUT
DELETE
Tax Zone
GET
POST
PUT
DELETE
Discount
GET
POST
PUT
DELETE
Shipping
Shipping Profile
GET
POST
PUT
DELETE
Shipping Rate
GET
POST
PUT
DELETE
Shipping Rules
GET
POST
PUT
DELETE
Customer
GET
POST
PUT
DELETE
Orders
GET
POST
PATCH
Blog
GET
POST
PUT
DELETE
Settings
GET

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
JSON
{
    "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
JSON
{
    "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
    }
}
Terms and Conditions
Privacy Policy

© 2024 WebCommander | All Rights Reserved

contact@webcommander.com
1300 797 571

WebCommander
About Us
Features
Pricing
Compare
Partners
Contact Us
Resource
Find a Partner
Help Centre
Community
Blog
Solutions
Inventory Management
Omnichannel Sales
Ecommerce Automation
B2B Ecommerce
Headless Commerce
Website Design and Performance