The tax of a shipment or individual order items can be edited by specifying updated information with the Adjust Tax action of the Shipment API.
Note that the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.
Production URL | https://{tenantId}-translation.mozu.com/api/v2/shipment/action/adjustTax |
Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/v2/shipment/action/adjustTax |
Supported Formats | JSON |
HTTP Method | POST |
Example
This example case creates a call that will edit a shipment based on the following information:
- Shipment ID 00000
- $5.00 tax on Order Item 11111
Required Parameters
The request has the following necessary parameters:
Parameter | Type | Description |
shipmentID | integer | A unique identifier for the shipment. The minimum value is “1”. |
shouldRectify | boolean | Whether the shipment should be rectified, i.e. immediately sent to READY status, or not. |
Optional Parameters
The request can also include the following additional properties:
Parameter | Type | Description |
itemTax | array | The tax amount and rate per item. |
shippingTax | number | The new shipping tax amount. |
shippingTaxRate | number | The new shipping tax rate. |
shipmentItemTax | number | The new item tax for the shipment. |
Item Tax
Item Tax (/itemTax/{object}) has three available parameters to construct it, though none are strictly required:
Parameter | Type | Description |
orderItemID | integer | A unique identifier for the order item. The minimum value is “0”. |
itemTaxAmount | number | The new item tax amount for the item. The minimum value is “0”. |
itemTaxRate | number | The new item tax rate for the item. The minimum value is “0”. |
Below is the Item Tax object that will be used in the example request.
"itemTax":[ { "orderItemID":"11111", "itemTaxAmount":5.00 }
The Full Request
This sample will set the tax of the designated Order Item 11111 to $5.00.
{ "shipmentID":"00000", "shippingTax":6.00, "shippingTaxRate":0, "shouldRectify":true, "itemTax":[ { "orderItemID":"11111", "itemTaxAmount":5.00 } ] }
The returned response follows the same structure as the Get Shipment API, providing information about the shipment that was edited.