iotoms Docs

Update a tax

PUT
/api/v1/catalog/attributes/taxes/{id}

Updates a tax rate definition. Send name and taxRate1 every time; an omitted taxRate2 is saved as 0 and an omitted status as active. Items linked to this tax use the new rates from then on.

How to use it

  1. Take the tax id from List taxes.
  2. Send name and taxRate1 (a percentage) plus the current taxRate2 and status; omitting them resets them to 0 and active.
  3. The new rates apply to items linked to this tax from then on.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Request Body

application/json
  1. body
id*integer

Numeric tax ID; use it as taxId on items.

Formatint64
name*string

Tax name, unique across the catalog (up to 100 characters).

taxRate1*number

First tax rate as a percentage (e.g. 5.00 means 5%), up to two decimals.

taxRate2?|

Optional second tax rate as a percentage, applied alongside the first; 0 when not used.

modifiedTime*string

When the tax was last changed (ISO 8601 timestamp).

Formatdate-time
status*string

Tax status, e.g. active.

Response Body

OK

*/*
  1. response
id*integer

Numeric tax ID; use it as taxId on items.

Formatint64
name*string

Tax name, unique across the catalog (up to 100 characters).

taxRate1*number

First tax rate as a percentage (e.g. 5.00 means 5%), up to two decimals.

taxRate2?|

Optional second tax rate as a percentage, applied alongside the first; 0 when not used.

modifiedTime*string

When the tax was last changed (ISO 8601 timestamp).

Formatdate-time
status*string

Tax status, e.g. active.

Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/catalog/attributes/taxes/0' \  -H 'Content-Type: application/json' \  -d '{  "id": 0,  "name": "string",  "taxRate1": 0,  "modifiedTime": "2019-08-24T14:15:22Z",  "status": "string"}'
Example Response
{  "id": 0,  "name": "string",  "taxRate1": 0,  "taxRate2": 0,  "modifiedTime": "2019-08-24T14:15:22Z",  "status": "string"}