Skip to content
Markdown

Open ticket ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /open-ticket/create ​

Create an open ticket (a held order / table bill) with its draft receipt and products.

Нужное разрешение: open_ticket_create · как работают разрешения

Пример запроса

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "name": "string",
    "organization_id": "string",
    "receipt": {
      "organization_id": "string",
      "warehouse_id": "string",
      "customer_id": "string",
      "responsible_id": "string",
      "currency_id": "string",
      "price_id": "string",
      "note": "string",
      "products": [
        {
          "product_id": null,
          "warehouse_id": null,
          "amount": null,
          "price": null,
          "box_count": null,
          "note": null,
          "price_id": null,
          "box_amount": null,
          "real_price": null,
          "total_price": null,
          "taxes": null,
          "discounts": null,
          "is_marked": null,
          "marks": null,
          "expiration_date": null,
          "total_to_pay": null,
          "materials": null,
          "used_measure": null
        }
      ],
      "uuid": "string",
      "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "delivery_date": "2025-05-01T12:00:00Z",
      "delivery_address": {
        "long": 0,
        "lat": 0,
        "human_address": {
          "address": null,
          "city": null,
          "state": null,
          "zip": null
        },
        "bearing": 0
      },
      "discounts": [
        {
          "is_custom": null,
          "_id": null,
          "value": null,
          "name": null,
          "apply_type": null
        }
      ],
      "calc_tax_after_discount": false,
      "calc_sale_discount_after_product": true,
      "total_to_pay": 0,
      "sold_at": "2025-05-01T12:00:00Z",
      "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
    }
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "name": "string",
        "organization_id": "string",
        "receipt": {
            "organization_id": "string",
            "warehouse_id": "string",
            "customer_id": "string",
            "responsible_id": "string",
            "currency_id": "string",
            "price_id": "string",
            "note": "string",
            "products": [
                {
                    "product_id": None,
                    "warehouse_id": None,
                    "amount": None,
                    "price": None,
                    "box_count": None,
                    "note": None,
                    "price_id": None,
                    "box_amount": None,
                    "real_price": None,
                    "total_price": None,
                    "taxes": None,
                    "discounts": None,
                    "is_marked": None,
                    "marks": None,
                    "expiration_date": None,
                    "total_to_pay": None,
                    "materials": None,
                    "used_measure": None,
                },
            ],
            "uuid": "string",
            "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "delivery_date": "2025-05-01T12:00:00Z",
            "delivery_address": {
                "long": 0,
                "lat": 0,
                "human_address": {
                    "address": None,
                    "city": None,
                    "state": None,
                    "zip": None,
                },
                "bearing": 0,
            },
            "discounts": [
                {
                    "is_custom": None,
                    "_id": None,
                    "value": None,
                    "name": None,
                    "apply_type": None,
                },
            ],
            "calc_tax_after_discount": False,
            "calc_sale_discount_after_product": True,
            "total_to_pay": 0,
            "sold_at": "2025-05-01T12:00:00Z",
            "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        },
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "name": "string",
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/create');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Тело запроса

ПолеТипОбязательноОписание
namestringДаDisplay name of the open ticket
organization_idstringДаOrganization ObjectId the ticket belongs to
booking_table_idstringНетBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringНетOptional free-text comment
receiptobjectДа
receipt.organization_idstringДа
receipt.warehouse_idstringДа
receipt.customer_idstringНет
receipt.responsible_idstringНет
receipt.currency_idstringДа
receipt.price_idstringНет
receipt.notestringНет
receipt.productsobject[]Да
receipt.products[].product_idstringДа
receipt.products[].warehouse_idstringДа
receipt.products[].amountnumberДа
receipt.products[].pricenumberНет
receipt.products[].box_countnumberНет
receipt.products[].notestringНет
receipt.products[].price_idstringНет
receipt.products[].box_amountnumberНет
receipt.products[].real_pricenumberДа
receipt.products[].total_pricenumberНет
receipt.products[].taxesobject[]Нет
receipt.products[].discountsobject[]Нет
receipt.products[].is_markedbooleanНетПо умолчанию: false
receipt.products[].marksstring[]Нет
receipt.products[].expiration_datestring (date-time)Нет
receipt.products[].total_to_paynumberНет
receipt.products[].materialsobject[]Нет
receipt.products[].used_measureobjectНет
receipt.uuidstringНет
receipt.contract_idstringНет
receipt.customer_assistant_idstringНет
receipt.delivery_datestring (date-time)Нет
receipt.delivery_addressobjectНет
receipt.delivery_address.longnumberНет
receipt.delivery_address.latnumberНет
receipt.delivery_address.human_addressobjectНет
receipt.delivery_address.bearingnumberНет
receipt.discountsobject[]Нет
receipt.discounts[].is_custombooleanДа
receipt.discounts[]._idstringНет
receipt.discounts[].valuenumberДа
receipt.discounts[].namestringНет
receipt.discounts[].apply_typestringДаДопустимые значения: percent, cash
receipt.calc_tax_after_discountbooleanНетПо умолчанию: false
receipt.calc_sale_discount_after_productbooleanНетПо умолчанию: true
receipt.total_to_paynumberНет
receipt.sold_atstring (date-time)Нет
receipt.mediator_idstringНет
json
{
  "name": "string",
  "organization_id": "string",
  "booking_table_id": "string",
  "comment": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  }
}

Ответ

ПолеТипОписание
_idstring
namestring
organization_idstring
uuidstring
booking_table_idstring
receiptobject
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "name": "string",
    "organization_id": "string",
    "uuid": "string",
    "booking_table_id": "string",
    "receipt": {}
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /open-ticket/update ​

Update an existing open ticket and its draft receipt.

Нужное разрешение: open_ticket · как работают разрешения

Пример запроса

bash
curl -X PUT 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string"
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update', {
  method: 'PUT',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "organization_id": "string",
    "receipt": {
      "organization_id": "string",
      "warehouse_id": "string",
      "customer_id": "string",
      "responsible_id": "string",
      "currency_id": "string",
      "price_id": "string",
      "note": "string",
      "products": [
        {
          "product_id": null,
          "warehouse_id": null,
          "amount": null,
          "price": null,
          "box_count": null,
          "note": null,
          "price_id": null,
          "box_amount": null,
          "real_price": null,
          "total_price": null,
          "taxes": null,
          "discounts": null,
          "is_marked": null,
          "marks": null,
          "expiration_date": null,
          "total_to_pay": null,
          "materials": null,
          "used_measure": null
        }
      ],
      "uuid": "string",
      "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
      "delivery_date": "2025-05-01T12:00:00Z",
      "delivery_address": {
        "long": 0,
        "lat": 0,
        "human_address": {
          "address": null,
          "city": null,
          "state": null,
          "zip": null
        },
        "bearing": 0
      },
      "discounts": [
        {
          "is_custom": null,
          "_id": null,
          "value": null,
          "name": null,
          "apply_type": null
        }
      ],
      "calc_tax_after_discount": false,
      "calc_sale_discount_after_product": true,
      "total_to_pay": 0,
      "sold_at": "2025-05-01T12:00:00Z",
      "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
    },
    "_id": "string"
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "PUT",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "organization_id": "string",
        "receipt": {
            "organization_id": "string",
            "warehouse_id": "string",
            "customer_id": "string",
            "responsible_id": "string",
            "currency_id": "string",
            "price_id": "string",
            "note": "string",
            "products": [
                {
                    "product_id": None,
                    "warehouse_id": None,
                    "amount": None,
                    "price": None,
                    "box_count": None,
                    "note": None,
                    "price_id": None,
                    "box_amount": None,
                    "real_price": None,
                    "total_price": None,
                    "taxes": None,
                    "discounts": None,
                    "is_marked": None,
                    "marks": None,
                    "expiration_date": None,
                    "total_to_pay": None,
                    "materials": None,
                    "used_measure": None,
                },
            ],
            "uuid": "string",
            "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
            "delivery_date": "2025-05-01T12:00:00Z",
            "delivery_address": {
                "long": 0,
                "lat": 0,
                "human_address": {
                    "address": None,
                    "city": None,
                    "state": None,
                    "zip": None,
                },
                "bearing": 0,
            },
            "discounts": [
                {
                    "is_custom": None,
                    "_id": None,
                    "value": None,
                    "name": None,
                    "apply_type": None,
                },
            ],
            "calc_tax_after_discount": False,
            "calc_sale_discount_after_product": True,
            "total_to_pay": 0,
            "sold_at": "2025-05-01T12:00:00Z",
            "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff",
        },
        "_id": "string",
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "organization_id": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string"
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/update');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Тело запроса

ПолеТипОбязательноОписание
namestringНетDisplay name of the open ticket
organization_idstringДаOrganization ObjectId the ticket belongs to
booking_table_idstringНетBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringНетOptional free-text comment
receiptobjectДа
receipt.organization_idstringДа
receipt.warehouse_idstringДа
receipt.customer_idstringНет
receipt.responsible_idstringНет
receipt.currency_idstringДа
receipt.price_idstringНет
receipt.notestringНет
receipt.productsobject[]Да
receipt.products[].product_idstringДа
receipt.products[].warehouse_idstringДа
receipt.products[].amountnumberДа
receipt.products[].pricenumberНет
receipt.products[].box_countnumberНет
receipt.products[].notestringНет
receipt.products[].price_idstringНет
receipt.products[].box_amountnumberНет
receipt.products[].real_pricenumberДа
receipt.products[].total_pricenumberНет
receipt.products[].taxesobject[]Нет
receipt.products[].discountsobject[]Нет
receipt.products[].is_markedbooleanНетПо умолчанию: false
receipt.products[].marksstring[]Нет
receipt.products[].expiration_datestring (date-time)Нет
receipt.products[].total_to_paynumberНет
receipt.products[].materialsobject[]Нет
receipt.products[].used_measureobjectНет
receipt.uuidstringНет
receipt.contract_idstringНет
receipt.customer_assistant_idstringНет
receipt.delivery_datestring (date-time)Нет
receipt.delivery_addressobjectНет
receipt.delivery_address.longnumberНет
receipt.delivery_address.latnumberНет
receipt.delivery_address.human_addressobjectНет
receipt.delivery_address.bearingnumberНет
receipt.discountsobject[]Нет
receipt.discounts[].is_custombooleanДа
receipt.discounts[]._idstringНет
receipt.discounts[].valuenumberДа
receipt.discounts[].namestringНет
receipt.discounts[].apply_typestringДаДопустимые значения: percent, cash
receipt.calc_tax_after_discountbooleanНетПо умолчанию: false
receipt.calc_sale_discount_after_productbooleanНетПо умолчанию: true
receipt.total_to_paynumberНет
receipt.sold_atstring (date-time)Нет
receipt.mediator_idstringНет
_idstringДа
uuidstringНет
json
{
  "name": "string",
  "organization_id": "string",
  "booking_table_id": "string",
  "comment": "string",
  "receipt": {
    "organization_id": "string",
    "warehouse_id": "string",
    "customer_id": "string",
    "responsible_id": "string",
    "currency_id": "string",
    "price_id": "string",
    "note": "string",
    "products": [
      {
        "product_id": null,
        "warehouse_id": null,
        "amount": null,
        "price": null,
        "box_count": null,
        "note": null,
        "price_id": null,
        "box_amount": null,
        "real_price": null,
        "total_price": null,
        "taxes": null,
        "discounts": null,
        "is_marked": null,
        "marks": null,
        "expiration_date": null,
        "total_to_pay": null,
        "materials": null,
        "used_measure": null
      }
    ],
    "uuid": "string",
    "contract_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "customer_assistant_id": "64b7f4d9e2b3b6a0b7c5d7ff",
    "delivery_date": "2025-05-01T12:00:00Z",
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "address": null,
        "city": null,
        "state": null,
        "zip": null
      },
      "bearing": 0
    },
    "discounts": [
      {
        "is_custom": null,
        "_id": null,
        "value": null,
        "name": null,
        "apply_type": null
      }
    ],
    "calc_tax_after_discount": false,
    "calc_sale_discount_after_product": true,
    "total_to_pay": 0,
    "sold_at": "2025-05-01T12:00:00Z",
    "mediator_id": "64b7f4d9e2b3b6a0b7c5d7ff"
  },
  "_id": "string",
  "uuid": "string"
}

Ответ

Структура ответа совпадает с POST /open-ticket/create.

POST /open-ticket/get-paging ​

Paginated list of open tickets, filterable by organization.

Нужное разрешение: open_ticket · как работают разрешения

Пример запроса

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 1,
  "limit": 20
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "page": 1,
    "limit": 20
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "page": 1,
        "limit": 20,
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "page": 1,
  "limit": 20
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-paging');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНетFilter by organization ObjectId
responsible_idstringНет
customer_idstringНет
date_fromstring (date-time)НетStart of the date range.
date_tostring (date-time)НетEnd of the date range.
searchstringНетFree-text search.
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string",
  "responsible_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "customer_id": "64b7f4d9e2b3b6a0b7c5d7ff",
  "date_from": "2025-05-01T12:00:00Z",
  "date_to": "2025-05-01T12:00:00Z",
  "search": "string"
}

Ответ

ПолеТипОписание
totalnumber
listobject[]
list[]._idstring
list[].namestring
list[].organization_idstring
list[].uuidstring
list[].booking_table_idstring
list[].receiptobject
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "_id": "string",
        "name": "string",
        "organization_id": "string",
        "uuid": "string",
        "booking_table_id": "string",
        "receipt": {}
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /open-ticket/get-by-id/{id} ​

Fetch a single open ticket by ObjectId.

Нужное разрешение: open_ticket · как работают разрешения

Пример запроса

bash
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911' \
  -H "api-key: $BITO_API_KEY"
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911', {
  method: 'GET',
  headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "GET",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911",
    headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())
php
<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Параметры пути

ПараметрТипОбязательноОписание
idstringДаOpen-ticket ObjectId

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /open-ticket/create.

POST /open-ticket/delete-many ​

Soft-delete multiple open tickets by their ObjectIds.

Нужное разрешение: open_ticket · как работают разрешения

Пример запроса

bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many' \
  -H "api-key: $BITO_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "string"
  ]
}'
js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many', {
  method: 'POST',
  headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "ids": [
      "string"
    ]
  }),
})
const { code, data } = await res.json()
python
import os
import requests

res = requests.request(
    "POST",
    "https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many",
    headers={"api-key": os.environ["BITO_API_KEY"]},
    json={
        "ids": [
            "string",
        ],
    },
)
print(res.json())
php
<?php
$body = <<<'JSON'
{
  "ids": [
    "string"
  ]
}
JSON;

$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/open-ticket/delete-many');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => $body,
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);

Тело запроса

ПолеТипОбязательноОписание
idsstring[]ДаOpen-ticket ObjectIds to delete
json
{
  "ids": [
    "string"
  ]
}

Ответ

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

Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API