Skip to content

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

FieldTypeRequiredDescription
namestringYesDisplay name of the open ticket
organization_idstringYesOrganization ObjectId the ticket belongs to
booking_table_idstringNoBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringNoOptional free-text comment
receiptobjectYes
receipt.organization_idstringNo
receipt.warehouse_idstringNo
receipt.customer_idstringNo
receipt.responsible_idstringNo
receipt.currency_idstringNo
receipt.price_idstringNo
receipt.notestringNo
receipt.productsobject[]Yes
receipt.products[].product_idstringYes
receipt.products[].warehouse_idstringYes
receipt.products[].amountnumberYes
receipt.products[].pricenumberYes
receipt.products[].box_countnumberNo
receipt.products[].notestringNo
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

FieldTypeDescription
_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.

Request body

FieldTypeRequiredDescription
namestringYesDisplay name of the open ticket
organization_idstringYesOrganization ObjectId the ticket belongs to
booking_table_idstringNoBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringNoOptional free-text comment
receiptobjectYes
receipt.organization_idstringNo
receipt.warehouse_idstringNo
receipt.customer_idstringNo
receipt.responsible_idstringNo
receipt.currency_idstringNo
receipt.price_idstringNo
receipt.notestringNo
receipt.productsobject[]Yes
receipt.products[].product_idstringYes
receipt.products[].warehouse_idstringYes
receipt.products[].amountnumberYes
receipt.products[].pricenumberYes
receipt.products[].box_countnumberNo
receipt.products[].notestringNo
_idstringYes
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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
organization_idstringNoFilter by organization ObjectId
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string"
}

Response

FieldTypeDescription
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.

Path parameters

ParameterTypeRequiredDescription
idstringYesOpen-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

FieldTypeRequiredDescription
idsstring[]YesOpen-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.

Bito 2.0 Integration API