Skip to content

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.

Тело запроса

ПолеТипОбязательноОписание
namestringДаDisplay name of the open ticket
organization_idstringДаOrganization ObjectId the ticket belongs to
booking_table_idstringНетBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringНетOptional free-text comment
receiptobjectДа
receipt.organization_idstringНет
receipt.warehouse_idstringНет
receipt.customer_idstringНет
receipt.responsible_idstringНет
receipt.currency_idstringНет
receipt.price_idstringНет
receipt.notestringНет
receipt.productsobject[]Да
receipt.products[].product_idstringДа
receipt.products[].warehouse_idstringДа
receipt.products[].amountnumberДа
receipt.products[].pricenumberДа
receipt.products[].box_countnumberНет
receipt.products[].notestringНет
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
      }
    ]
  }
}

Ответ

ПолеТипОписание
_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.

Тело запроса

ПолеТипОбязательноОписание
namestringДаDisplay name of the open ticket
organization_idstringДаOrganization ObjectId the ticket belongs to
booking_table_idstringНетBooking table (seat/table) ObjectId, if the ticket is tied to a table
commentstringНетOptional free-text comment
receiptobjectДа
receipt.organization_idstringНет
receipt.warehouse_idstringНет
receipt.customer_idstringНет
receipt.responsible_idstringНет
receipt.currency_idstringНет
receipt.price_idstringНет
receipt.notestringНет
receipt.productsobject[]Да
receipt.products[].product_idstringДа
receipt.products[].warehouse_idstringДа
receipt.products[].amountnumberДа
receipt.products[].pricenumberДа
receipt.products[].box_countnumberНет
receipt.products[].notestringНет
_idstringДа
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.

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНетFilter by organization ObjectId
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "string"
}

Ответ

ПолеТипОписание
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.

Параметры пути

ПараметрТипОбязательноОписание
idstringДаOpen-ticket ObjectId

Тело запроса

Тело запроса не требуется.

Ответ

Структура ответа совпадает с POST /open-ticket/create.

POST /open-ticket/delete-many ​

Soft-delete multiple open tickets by their ObjectIds.

Тело запроса

ПолеТипОбязательноОписание
idsstring[]Да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.

Bito 2.0 Integration API