Skip to content

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

MaydonTurMajburiyTavsif
namestringHaDisplay name of the open ticket
organization_idstringHaOrganization ObjectId the ticket belongs to
booking_table_idstringYo‘qBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringYo‘qOptional free-text comment
receiptobjectHa
receipt.organization_idstringYo‘q
receipt.warehouse_idstringYo‘q
receipt.customer_idstringYo‘q
receipt.responsible_idstringYo‘q
receipt.currency_idstringYo‘q
receipt.price_idstringYo‘q
receipt.notestringYo‘q
receipt.productsobject[]Ha
receipt.products[].product_idstringHa
receipt.products[].warehouse_idstringHa
receipt.products[].amountnumberHa
receipt.products[].pricenumberHa
receipt.products[].box_countnumberYo‘q
receipt.products[].notestringYo‘q
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
      }
    ]
  }
}

Javob

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

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHaDisplay name of the open ticket
organization_idstringHaOrganization ObjectId the ticket belongs to
booking_table_idstringYo‘qBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringYo‘qOptional free-text comment
receiptobjectHa
receipt.organization_idstringYo‘q
receipt.warehouse_idstringYo‘q
receipt.customer_idstringYo‘q
receipt.responsible_idstringYo‘q
receipt.currency_idstringYo‘q
receipt.price_idstringYo‘q
receipt.notestringYo‘q
receipt.productsobject[]Ha
receipt.products[].product_idstringHa
receipt.products[].warehouse_idstringHa
receipt.products[].amountnumberHa
receipt.products[].pricenumberHa
receipt.products[].box_countnumberYo‘q
receipt.products[].notestringYo‘q
_idstringHa
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"
}

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

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
organization_idstringYo‘qFilter by organization ObjectId
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string"
}

Javob

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

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaOpen-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

MaydonTurMajburiyTavsif
idsstring[]HaOpen-ticket ObjectIds to delete
json
{
  "ids": [
    "string"
  ]
}

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API