Skip to content

Tax ​

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

POST /tax/create ​

This method allows adding tax into the account.

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHa
ratenumberHa
typestringHaMumkin qiymatlar: included, added
to_pricebooleanHa
is_manualbooleanHa
organization_idsstring[]Ha
is_allbooleanHa
is_all_categoriesbooleanHa
is_all_suppliersbooleanHa
supplier_idsstring[]Yo‘q
category_idsstring[]Yo‘q
item_added_idsstring[]Yo‘q
item_removed_idsstring[]Yo‘q
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"
  ]
}

Javob

MaydonTurTavsif
_idstring
namestring
ratenumber
typestringMumkin qiymatlar: included, added
is_allboolean
is_all_categoriesboolean
is_all_suppliersboolean
supplier_idsstring[]
category_idsstring[]
item_added_idsstring[]
item_removed_idsstring[]
item_countnumber
to_priceboolean
is_manualboolean
organization_idsstring[]
last_payment_datestring (date-time)
last_payment_amountnumber
calculated_amountnumber
is_enabledboolean
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.

So‘rov tanasi

MaydonTurMajburiyTavsif
_idstringYo‘q
namestringHa
ratenumberHa
typestringHaMumkin qiymatlar: included, added
to_pricebooleanHa
is_manualbooleanHa
organization_idsstring[]Yo‘q
json
{
  "_id": "64e944999f719902a7ff641b",
  "name": "VAT",
  "rate": 7.25,
  "type": "included",
  "to_price": true,
  "is_manual": false,
  "organization_ids": [
    "64e944999f719902a7ff641b"
  ]
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /tax/create.

DELETE /tax/delete/{id} ​

Delete a tax

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

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

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /tax/create.

POST /tax/get-all ​

Get all taxs

So‘rov tanasi

MaydonTurMajburiyTavsif
organization_idstringYo‘q
typestringYo‘qMumkin qiymatlar: included, added. Standart: "included"
is_manualbooleanYo‘qStandart: false
json
{
  "organization_id": "64e944999f719902a7ff641b",
  "type": "included",
  "is_manual": false
}

Javob

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

So‘rov tanasi

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
organization_idstringYo‘q
typestringYo‘qMumkin qiymatlar: included, added. Standart: "included"
is_manualbooleanYo‘qStandart: false
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "64e944999f719902a7ff641b",
  "type": "included",
  "is_manual": false
}

Javob

MaydonTurTavsif
codenumbersystem code of response. Standart: 0
messagestring
status_codenumberstatus code of response. Standart: 200
messagesobject
messages.uzstring
messages.rustring
messages.enstring
timestring (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

So‘rov tanasi

MaydonTurMajburiyTavsif
tax_idstringHa
pagenumberHaStandart: 1
limitnumberHaStandart: 20
json
{
  "tax_id": "64e944999f719902a7ff641b",
  "page": 1,
  "limit": 20
}

Javob

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

So‘rov parametrlari

ParametrTurMajburiyTavsif
deleted_atstringHa

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    "string"
  ],
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API