Tax
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /tax/create
This method allows adding tax into the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
rate | number | Yes | |
type | string | Yes | One of: included, added |
to_price | boolean | Yes | |
is_manual | boolean | Yes | |
organization_ids | string[] | Yes | |
is_all | boolean | Yes | |
is_all_categories | boolean | Yes | |
is_all_suppliers | boolean | Yes | |
supplier_ids | string[] | No | |
category_ids | string[] | No | |
item_added_ids | string[] | No | |
item_removed_ids | string[] | No |
json
{
"name": "VAT",
"rate": 7.25,
"type": "included",
"to_price": true,
"is_manual": false,
"organization_ids": [
"64e944999f719902a7ff641b"
],
"is_all": true,
"is_all_categories": false,
"is_all_suppliers": true,
"supplier_ids": [
"64e944999f719902a7ff641c"
],
"category_ids": [
"64e944999f719902a7ff641d"
],
"item_added_ids": [
"64e944999f719902a7ff641e"
],
"item_removed_ids": [
"64e944999f719902a7ff641f"
]
}Response
| Field | Type | Description |
|---|---|---|
_id | string | |
name | string | |
rate | number | |
type | string | One of: included, added |
is_all | boolean | |
is_all_categories | boolean | |
is_all_suppliers | boolean | |
supplier_ids | string[] | |
category_ids | string[] | |
item_added_ids | string[] | |
item_removed_ids | string[] | |
item_count | number | |
to_price | boolean | |
is_manual | boolean | |
organization_ids | string[] | |
last_payment_date | string (date-time) | |
last_payment_amount | number | |
calculated_amount | number | |
is_enabled | boolean |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "64e944999f719902a7ff641b",
"name": "string",
"rate": 0,
"type": "included",
"is_all": false,
"is_all_categories": false,
"is_all_suppliers": false,
"supplier_ids": [
"string"
],
"category_ids": [
"string"
],
"item_added_ids": [
"string"
],
"item_removed_ids": [
"string"
],
"item_count": 0,
"to_price": false,
"is_manual": false,
"organization_ids": [
"string"
],
"last_payment_date": "2025-05-01T12:00:00Z",
"last_payment_amount": 0,
"calculated_amount": 0,
"is_enabled": false
},
"time": "2025-05-01T12:00:00Z"
}PUT /tax/update
This method allows updating saler-order in the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | No | |
name | string | Yes | |
rate | number | Yes | |
type | string | Yes | One of: included, added |
to_price | boolean | Yes | |
is_manual | boolean | Yes | |
organization_ids | string[] | No |
json
{
"_id": "64e944999f719902a7ff641b",
"name": "VAT",
"rate": 7.25,
"type": "included",
"to_price": true,
"is_manual": false,
"organization_ids": [
"64e944999f719902a7ff641b"
]
}Response
Same response shape as POST /tax/create.
DELETE /tax/delete/{id}
Delete a tax
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}GET /tax/get-by-id/{id}
Get tax using its _id
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /tax/create.
POST /tax/get-all
Get all taxs
Request body
| Field | Type | Required | Description |
|---|---|---|---|
organization_id | string | No | |
type | string | No | One of: included, added. Default: "included" |
is_manual | boolean | No | Default: false |
json
{
"organization_id": "64e944999f719902a7ff641b",
"type": "included",
"is_manual": false
}Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "64e944999f719902a7ff641b",
"name": "string",
"rate": 0,
"type": "included",
"is_all": false,
"is_all_categories": false,
"is_all_suppliers": false,
"supplier_ids": [
"string"
],
"category_ids": [
"string"
],
"item_added_ids": [
"string"
],
"item_removed_ids": [
"string"
],
"item_count": 0,
"to_price": false,
"is_manual": false,
"organization_ids": [
"string"
],
"last_payment_date": "2025-05-01T12:00:00Z",
"last_payment_amount": 0,
"calculated_amount": 0,
"is_enabled": false
}
],
"time": "2025-05-01T12:00:00Z"
}POST /tax/get-paging
Get taxs by paging
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
organization_id | string | No | |
type | string | No | One of: included, added. Default: "included" |
is_manual | boolean | No | Default: false |
json
{
"page": 1,
"limit": 20,
"organization_id": "64e944999f719902a7ff641b",
"type": "included",
"is_manual": false
}Response
| Field | Type | Description |
|---|---|---|
code | number | system code of response. Default: 0 |
message | string | |
status_code | number | status code of response. Default: 200 |
messages | object | |
messages.uz | string | |
messages.ru | string | |
messages.en | string | |
time | string (date-time) | time of response |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"code": 0,
"message": "Success",
"status_code": 200,
"messages": {
"uz": "Muvaffaqiyatli",
"ru": "Успешно",
"en": "Successful"
},
"time": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}POST /tax/get-items
Get tax-items
Request body
| Field | Type | Required | Description |
|---|---|---|---|
tax_id | string | Yes | |
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
json
{
"tax_id": "64e944999f719902a7ff641b",
"page": 1,
"limit": 20
}Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"_id": "64e944999f719902a7ff641b",
"created_at": "2025-05-01T12:00:00Z",
"is_material": true,
"is_product": true,
"item_id": "64e944999f719902a7ff641b",
"tax_id": "64e944999f719902a7ff641b",
"updated_at": "2025-05-01T12:00:00Z",
"item": {
"_id": "64e944999f719902a7ff641b",
"name": "Item Name",
"measure_id": "64e944999f719902a7ff641b",
"barcode": "1234567890123"
}
}
],
"time": "2025-05-01T12:00:00Z"
}GET /tax/get-deleted
Get deleted tax ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.