Open ticket
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 /open-ticket/create
Create an open ticket (a held order / table bill) with its draft receipt and products.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the open ticket |
organization_id | string | Ha | Organization ObjectId the ticket belongs to |
booking_table_id | string | Yo‘q | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | Yo‘q | Optional free-text comment |
receipt | object | Ha | |
receipt.organization_id | string | Yo‘q | |
receipt.warehouse_id | string | Yo‘q | |
receipt.customer_id | string | Yo‘q | |
receipt.responsible_id | string | Yo‘q | |
receipt.currency_id | string | Yo‘q | |
receipt.price_id | string | Yo‘q | |
receipt.note | string | Yo‘q | |
receipt.products | object[] | Ha | |
receipt.products[].product_id | string | Ha | |
receipt.products[].warehouse_id | string | Ha | |
receipt.products[].amount | number | Ha | |
receipt.products[].price | number | Ha | |
receipt.products[].box_count | number | Yo‘q | |
receipt.products[].note | string | Yo‘q |
{
"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
}
]
}
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_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.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the open ticket |
organization_id | string | Ha | Organization ObjectId the ticket belongs to |
booking_table_id | string | Yo‘q | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | Yo‘q | Optional free-text comment |
receipt | object | Ha | |
receipt.organization_id | string | Yo‘q | |
receipt.warehouse_id | string | Yo‘q | |
receipt.customer_id | string | Yo‘q | |
receipt.responsible_id | string | Yo‘q | |
receipt.currency_id | string | Yo‘q | |
receipt.price_id | string | Yo‘q | |
receipt.note | string | Yo‘q | |
receipt.products | object[] | Ha | |
receipt.products[].product_id | string | Ha | |
receipt.products[].warehouse_id | string | Ha | |
receipt.products[].amount | number | Ha | |
receipt.products[].price | number | Ha | |
receipt.products[].box_count | number | Yo‘q | |
receipt.products[].note | string | Yo‘q | |
_id | string | Ha |
{
"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"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /open-ticket/create.
POST /open-ticket/get-paging
Paginated list of open tickets, filterable by organization.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
organization_id | string | Yo‘q | Filter by organization ObjectId |
{
"page": 1,
"limit": 20,
"organization_id": "string"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
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.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Open-ticket ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /open-ticket/create.
POST /open-ticket/delete-many
Soft-delete multiple open tickets by their ObjectIds.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
ids | string[] | Ha | Open-ticket ObjectIds to delete |
{
"ids": [
"string"
]
}Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.