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 · как работают разрешения
Пример запроса
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"
}
}'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()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
$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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
name | string | Да | Display name of the open ticket |
organization_id | string | Да | Organization ObjectId the ticket belongs to |
booking_table_id | string | Нет | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | Нет | Optional free-text comment |
receipt | object | Да | |
receipt.organization_id | string | Да | |
receipt.warehouse_id | string | Да | |
receipt.customer_id | string | Нет | |
receipt.responsible_id | string | Нет | |
receipt.currency_id | string | Да | |
receipt.price_id | string | Нет | |
receipt.note | string | Нет | |
receipt.products | object[] | Да | |
receipt.products[].product_id | string | Да | |
receipt.products[].warehouse_id | string | Да | |
receipt.products[].amount | number | Да | |
receipt.products[].price | number | Нет | |
receipt.products[].box_count | number | Нет | |
receipt.products[].note | string | Нет | |
receipt.products[].price_id | string | Нет | |
receipt.products[].box_amount | number | Нет | |
receipt.products[].real_price | number | Да | |
receipt.products[].total_price | number | Нет | |
receipt.products[].taxes | object[] | Нет | |
receipt.products[].discounts | object[] | Нет | |
receipt.products[].is_marked | boolean | Нет | По умолчанию: false |
receipt.products[].marks | string[] | Нет | |
receipt.products[].expiration_date | string (date-time) | Нет | |
receipt.products[].total_to_pay | number | Нет | |
receipt.products[].materials | object[] | Нет | |
receipt.products[].used_measure | object | Нет | |
receipt.uuid | string | Нет | |
receipt.contract_id | string | Нет | |
receipt.customer_assistant_id | string | Нет | |
receipt.delivery_date | string (date-time) | Нет | |
receipt.delivery_address | object | Нет | |
receipt.delivery_address.long | number | Нет | |
receipt.delivery_address.lat | number | Нет | |
receipt.delivery_address.human_address | object | Нет | |
receipt.delivery_address.bearing | number | Нет | |
receipt.discounts | object[] | Нет | |
receipt.discounts[].is_custom | boolean | Да | |
receipt.discounts[]._id | string | Нет | |
receipt.discounts[].value | number | Да | |
receipt.discounts[].name | string | Нет | |
receipt.discounts[].apply_type | string | Да | Допустимые значения: percent, cash |
receipt.calc_tax_after_discount | boolean | Нет | По умолчанию: false |
receipt.calc_sale_discount_after_product | boolean | Нет | По умолчанию: true |
receipt.total_to_pay | number | Нет | |
receipt.sold_at | string (date-time) | Нет | |
receipt.mediator_id | string | Нет |
{
"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 | |
name | string | |
organization_id | string | |
uuid | string | |
booking_table_id | string | |
receipt | object |
{
"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 · как работают разрешения
Пример запроса
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"
}'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()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
$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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
name | string | Нет | Display name of the open ticket |
organization_id | string | Да | Organization ObjectId the ticket belongs to |
booking_table_id | string | Нет | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | Нет | Optional free-text comment |
receipt | object | Да | |
receipt.organization_id | string | Да | |
receipt.warehouse_id | string | Да | |
receipt.customer_id | string | Нет | |
receipt.responsible_id | string | Нет | |
receipt.currency_id | string | Да | |
receipt.price_id | string | Нет | |
receipt.note | string | Нет | |
receipt.products | object[] | Да | |
receipt.products[].product_id | string | Да | |
receipt.products[].warehouse_id | string | Да | |
receipt.products[].amount | number | Да | |
receipt.products[].price | number | Нет | |
receipt.products[].box_count | number | Нет | |
receipt.products[].note | string | Нет | |
receipt.products[].price_id | string | Нет | |
receipt.products[].box_amount | number | Нет | |
receipt.products[].real_price | number | Да | |
receipt.products[].total_price | number | Нет | |
receipt.products[].taxes | object[] | Нет | |
receipt.products[].discounts | object[] | Нет | |
receipt.products[].is_marked | boolean | Нет | По умолчанию: false |
receipt.products[].marks | string[] | Нет | |
receipt.products[].expiration_date | string (date-time) | Нет | |
receipt.products[].total_to_pay | number | Нет | |
receipt.products[].materials | object[] | Нет | |
receipt.products[].used_measure | object | Нет | |
receipt.uuid | string | Нет | |
receipt.contract_id | string | Нет | |
receipt.customer_assistant_id | string | Нет | |
receipt.delivery_date | string (date-time) | Нет | |
receipt.delivery_address | object | Нет | |
receipt.delivery_address.long | number | Нет | |
receipt.delivery_address.lat | number | Нет | |
receipt.delivery_address.human_address | object | Нет | |
receipt.delivery_address.bearing | number | Нет | |
receipt.discounts | object[] | Нет | |
receipt.discounts[].is_custom | boolean | Да | |
receipt.discounts[]._id | string | Нет | |
receipt.discounts[].value | number | Да | |
receipt.discounts[].name | string | Нет | |
receipt.discounts[].apply_type | string | Да | Допустимые значения: percent, cash |
receipt.calc_tax_after_discount | boolean | Нет | По умолчанию: false |
receipt.calc_sale_discount_after_product | boolean | Нет | По умолчанию: true |
receipt.total_to_pay | number | Нет | |
receipt.sold_at | string (date-time) | Нет | |
receipt.mediator_id | string | Нет | |
_id | string | Да | |
uuid | string | Нет |
{
"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 · как работают разрешения
Пример запроса
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
}'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()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
$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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
organization_id | string | Нет | Filter by organization ObjectId |
responsible_id | string | Нет | |
customer_id | string | Нет | |
date_from | string (date-time) | Нет | Start of the date range. |
date_to | string (date-time) | Нет | End of the date range. |
search | string | Нет | Free-text search. |
{
"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"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
total | number | |
list | object[] | |
list[]._id | string | |
list[].name | string | |
list[].organization_id | string | |
list[].uuid | string | |
list[].booking_table_id | string | |
list[].receipt | object |
{
"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 · как работают разрешения
Пример запроса
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/open-ticket/get-by-id/6712f0a9c4d1e87b3a0f9911' \
-H "api-key: $BITO_API_KEY"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()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
$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);Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Open-ticket ObjectId |
Тело запроса
Тело запроса не требуется.
Ответ
Структура ответа совпадает с POST /open-ticket/create.
POST /open-ticket/delete-many
Soft-delete multiple open tickets by their ObjectIds.
Нужное разрешение: open_ticket · как работают разрешения
Пример запроса
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"
]
}'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()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
$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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
ids | string[] | Да | Open-ticket ObjectIds to delete |
{
"ids": [
"string"
]
}Ответ
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.