iotoms Docs

Create a tax

POST
/api/v1/catalog/attributes/taxes

Creates a new tax rate definition: a unique name, a primary rate (taxRate1) and an optional second rate (taxRate2), both percentages. Link it to items with taxId.

How to use it

  1. Send a unique name and taxRate1 as a percentage (e.g. 5.00); add taxRate2 if a second tax applies on the same amount.
  2. Use the returned id as taxId when creating or updating items (Create an item).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

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 POST 'https://beta.iotoms.com/api/v1/catalog/attributes/taxes' \  -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"}