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

Updating Tax Code

Endpoint: PUT /admin/tax_codes/{id}

Purpose

This endpoint allows administrators to update an existing tax code, modifying its name, label, rate, or method of calculation. It ensures the system reflects accurate and up-to-date tax rules for transaction processing.

Path Parameters:

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

Query Parameters

This endpoint does not require any query parameters.

Use Case

An admin updates the details of a tax code to change the tax rate, switch between flat rate and API-based method, or update the display name. This allows businesses to adapt tax settings as laws or internal policies evolve.

Request Body

Key Type Description
name String Name of the tax code.
label String Label displayed for the tax code, typically user-facing.
description String Detailed description of the tax code.
rate Number Tax rate to be applied; could be a fixed value or percentage.
resolver_type String Method used to apply the tax rate, such as "flat" or "percentage".
priority Number Determines the order in which the tax is applied if multiple exist.
default Boolean Indicates if this tax code is the default for the tax profile or category.
JSON
{
  "tax_code": {
    "name": "TAX_CODE_NAME",
    "label": "TAX_LABEL",
    "description": "TAX_DESCRIPTION",
    "rate": TAX_RATE,
    "resolver_type": "RESOLVER_TYPE", 
    "priority": TAX_PRIORITY,
    "default": BOOLEAN
  }
}

Response

The response returns the updated tax code, reflecting the latest configuration including name, label, resolver type, and rate. It ensures administrators can verify changes made to tax rules instantly.

PUT
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",  // flat or api
        "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