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 POST API Documentation

Creating Specific Tax Rules

Endpoints:   POST /admin/tax_rules

Purpose

The POST /admin/tax_rules API allows the creation of new tax rules within the system. It accepts essential details such as the tax rule's name, description, and associated tax profile. If the id is not provided, the system auto-generates one. This endpoint facilitates the dynamic addition of tax rules to support evolving tax regulations.

Path Parameters

No path parameters for this endpoint.

Query Parameters 

This endpoint does not have any query parameters.

Use Case

This endpoint is useful for businesses that need to define and enforce new tax policies across multiple zones. For example, if a company wants to introduce a new VAT rate or customize tax collection for specific regions, they can use this API to create the required tax rule.

Request Body

Key Type Description
id String Unique identifier for the tax rule.
name String Name of the tax rule.
description String Detailed description of the tax rule.
tax_profile_id String Identifier linking to the associated tax profile.
JSON
{
    "tax_rule": {
        "id": "TAX_RULE_ID", 
        "name": "TAX_RULE_NAME",
        "description": "TAX_RULE_DESCRIPTION",
        "tax_profile_id": TAX_PROFILE_ID
    }
}

Response

A successful response returns the newly created tax rule along with its metadata.

POST
https://{your_site_domain}/api/v4/admin/tax_rules/
Try It Out
JSON
{
    "tax_rule": {
        "id": TAX_RULE_ID,
        "name": "UPDATED_TAX_RULE_NAME",
        "code": {
            "id": CODE_ID,
            "name": "UPDATED_CODE_NAME",
            "is_default": IS_DEFAULT_CODE
        },
        "description": "UPDATED_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