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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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 | Нет |
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
}
]
}
}Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | |
name | string | |
organization_id | string | |
uuid | string | |
booking_table_id | string | |
receipt | object |
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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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 | Нет | |
_id | string | Да |
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
}
]
},
"_id": "string"
}Ответ
Структура ответа совпадает с POST /open-ticket/create.
POST /open-ticket/get-paging
Paginated list of open tickets, filterable by organization.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
organization_id | string | Нет | Filter by organization ObjectId |
json
{
"page": 1,
"limit": 20,
"organization_id": "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 |
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.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Open-ticket ObjectId |
Тело запроса
Тело запроса не требуется.
Ответ
Структура ответа совпадает с POST /open-ticket/create.
POST /open-ticket/delete-many
Soft-delete multiple open tickets by their ObjectIds.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
ids | string[] | Да | 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.