Open ticket
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /open-ticket/create
Create an open ticket (a held order / table bill) with its draft receipt and products.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the open ticket |
organization_id | string | Yes | Organization ObjectId the ticket belongs to |
booking_table_id | string | No | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | No | Optional free-text comment |
receipt | object | Yes | |
receipt.organization_id | string | No | |
receipt.warehouse_id | string | No | |
receipt.customer_id | string | No | |
receipt.responsible_id | string | No | |
receipt.currency_id | string | No | |
receipt.price_id | string | No | |
receipt.note | string | No | |
receipt.products | object[] | Yes | |
receipt.products[].product_id | string | Yes | |
receipt.products[].warehouse_id | string | Yes | |
receipt.products[].amount | number | Yes | |
receipt.products[].price | number | Yes | |
receipt.products[].box_count | number | No | |
receipt.products[].note | string | No |
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
}
]
}
}Response
| Field | Type | Description |
|---|---|---|
_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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the open ticket |
organization_id | string | Yes | Organization ObjectId the ticket belongs to |
booking_table_id | string | No | Booking table (seat/table) ObjectId, if the ticket is tied to a table |
comment | string | No | Optional free-text comment |
receipt | object | Yes | |
receipt.organization_id | string | No | |
receipt.warehouse_id | string | No | |
receipt.customer_id | string | No | |
receipt.responsible_id | string | No | |
receipt.currency_id | string | No | |
receipt.price_id | string | No | |
receipt.note | string | No | |
receipt.products | object[] | Yes | |
receipt.products[].product_id | string | Yes | |
receipt.products[].warehouse_id | string | Yes | |
receipt.products[].amount | number | Yes | |
receipt.products[].price | number | Yes | |
receipt.products[].box_count | number | No | |
receipt.products[].note | string | No | |
_id | string | Yes |
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"
}Response
Same response shape as POST /open-ticket/create.
POST /open-ticket/get-paging
Paginated list of open tickets, filterable by organization.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
organization_id | string | No | Filter by organization ObjectId |
json
{
"page": 1,
"limit": 20,
"organization_id": "string"
}Response
| Field | Type | Description |
|---|---|---|
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.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Open-ticket ObjectId |
Request body
No request body.
Response
Same response shape as POST /open-ticket/create.
POST /open-ticket/delete-many
Soft-delete multiple open tickets by their ObjectIds.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Open-ticket ObjectIds to delete |
json
{
"ids": [
"string"
]
}Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.