» Tax Rule PUT API Documentation

Putting Specific Tax Rules

Endpoints:   PUT /admin/tax_rules/{id}

Purpose

The PUT /admin/tax_rules/{id} API updates an existing tax rule by its unique identifier. It allows modifications to key attributes such as the name, description, and associated code. This endpoint ensures businesses can adjust tax regulations dynamically without creating duplicate rules.

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

This endpoint is useful when tax policies need to be revised due to regulatory changes. For instance, if a business wants to rename an existing tax rule, update the description, or revise the tax code, this API facilitates those modifications while maintaining the original tax rule reference.

Request Body

Key Type Description
name String Updated name of the tax rule.
description String Updated description of the tax rule.
{
    "tax_rule": {
        "name": "UPDATED_TAX_RULE_NAME",
        "description": "UPDATED_TAX_RULE_DESCRIPTION"
    }
}

Response

A successful response returns the updated tax rule details along with the latest timestamp.

PUT
https://{your_site_domain}/api/v4/admin/tax_rules/{id}
Try It Out
{
    "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"
    }
}