Tax
Define tax codes and rates for sales and purchase transactions.
Path Parameter:
:AUTOKEY (integer) — internal auto-numbered ID, NOT the codeEndpoints
GET
/taxList all tax codes
POST
/taxCreate new tax code
PUT
/tax/:AUTOKEYUpdate tax by internal ID
DELETE
/tax/:AUTOKEYDelete tax by internal ID
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| autokey | integer | No | Auto-assigned internal ID. Used in URL path for PUT/DELETE. |
| code | string | Yes | Short tax code identifier (e.g., ST-6%). |
| description | string | Yes | Full tax name (e.g., SST 6%). |
| taxtype | integer | Yes | Tax type code. 0 = No Tax/Exempt. Required field. |
| taxrate | decimal | No | Tax percentage. For 6% use 6 (not 0.06). Default: null |
| taxaccount | string | No | Tax account code. Get from GET /account. Default: null |
| isdefault | boolean | No | Set as default tax for transactions. Default: false |
| isactive | boolean | No | Active status flag. Default: true |
Examples
POST — Create Tax
POST /tax
{
"code": "ST-6%",
"description": "SST 6%",
"taxtype": 0
}Response (200 OK)
{
"autokey": 1,
"code": "ST-6%",
"description": "SST 6%",
"taxtype": 0,
"taxrate": null,
"taxaccount": null,
"isdefault": false,
"isactive": true,
"lastmodified": 1727664000
}DELETE (by autokey, not code)
DELETE /tax/1
Response: "OK" (plain text)Critical: Use :AUTOKEY (integer) in URL path for PUT/DELETE, NOT the code. To find autokey: GET /tax?code=ST-6% and read data[].autokey.
