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
» Tax Rule GET API Documentation

Getting All Tax Rules

Endpoints: GET /admin/tax_rules

Purpose

The GET /admin/tax_rules API retrieves a list of all tax rules configured in the system. It provides essential information about each tax rule, including their names, associated zones, rounding type, and creation details. This endpoint supports pagination for managing large sets of tax rules.

Path Parameters

No path parameters for this endpoint.

Query Parameters

ParameterTypeDescription
limitIntegerNumber of products per request.
offsetIntegerStarting point for pagination. 
order_byStringField to sort results by.
directionStringSort order by ascending or descending.

Use Case

This endpoint is useful for administrators who want to view and manage the tax rules applied to different geographic zones. For instance, if a business operates across multiple regions with varying tax regulations, this API provides an overview of all active tax rules, ensuring accurate tax compliance.

Request Body

No data is required for the request body.

Response

A successful response returns a paginated list of tax rules with key details.

GET
https://{your_site_domain}/api/v4/admin/tax_rules/
Try It Out
JSON
{
    "tax_rules": [
        {
            "id": TAX_RULE_ID,
            "name": "TAX_RULE_NAME",
            "code": {},
            "description": TAX_RULE_DESCRIPTION,
            "default": IS_DEFAULT,
            "rounding_type": "ROUNDING_TYPE",
            "decimal_point": DECIMAL_POINT,
            "zones": [
                {
                    "id": ZONE_ID,
                    "name": "ZONE_NAME",
                    "is_system_generated": IS_SYSTEM_GENERATED,
                    "is_default": IS_DEFAULT_ZONE
                }
            ],
            "created_at": "CREATED_AT_TIMESTAMP",
            "updated_at": "UPDATED_AT_TIMESTAMP"
        }
    ],
    "pagination": {
        "records": TOTAL_RECORDS,
        "limit": PAGE_LIMIT,
        "offset": PAGE_OFFSET,
        "previous_page": "PREVIOUS_PAGE_URL",
        "next_page": "NEXT_PAGE_URL"
    }
}

Getting Specific Tax Rules

Endpoints: GET /admin/tax_rules/{id}

Purpose

The GET /admin/tax_rules/{id} API retrieves detailed information about a specific tax rule by its unique identifier. It provides comprehensive details such as the tax rule's name, code, applicable zones, rounding configuration, and timestamps.

Path Parameters

Parameter
Type
Description
id
integer
The unique identifier of the categories

Query Parameters 

This endpoint does not have any query parameters.

Use Case

Administrators use this endpoint to inspect and validate the configuration of a particular tax rule. For example, if a business needs to confirm the rounding type for a region or verify if a tax rule is applied correctly to a zone, this API provides precise information about the selected tax rule.

Request Body

No data is required for the request body.

Response

A successful response returns the complete details of the requested tax rule, including all associated zones and configuration parameters.

GET
https://{your_site_domain}/api/v4/admin/tax_rules/{id}
Try It Out
JSON
{
    "tax_rule": {
        "id": TAX_RULE_ID,
        "name": "TAX_RULE_NAME",
        "code": {
            "id": CODE_ID,
            "name": "CODE_NAME",
            "is_default": IS_DEFAULT_CODE
        },
        "description": TAX_RULE_DESCRIPTION,
        "default": IS_DEFAULT,
        "rounding_type": "ROUNDING_TYPE",
        "decimal_point": DECIMAL_POINT,
        "zones": [
            {
                "id": ZONE_ID,
                "name": "ZONE_NAME",
                "is_system_generated": IS_SYSTEM_GENERATED,
                "is_default": IS_DEFAULT_ZONE
            }
        ],
        "created_at": "CREATED_AT_TIMESTAMP",
        "updated_at": "UPDATED_AT_TIMESTAMP"
    }
}
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