Skip to content

Sale order ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /sale-order/create ​

Create a sale order. The optional uuid field is tenant-global among active sale orders. The authenticated integration source gates replay: a same-source replay returns the active existing order, while an active UUID owned by another or missing source returns the existing sale-order collision error. Omitting uuid preserves normal creation behavior. After an order is soft-deleted, its UUID may be reused.

Тело запроса

ПолеТипОбязательноОписание
uuidstringНетOptional external idempotency key. UUID uniqueness is tenant-global among active sale orders. The authenticated integration source gates replay: if it owns the active UUID, the existing order is returned; an active UUID owned by another or missing source returns the sale-order AlreadyExists collision. Source ownership is never accepted from the request body. After an order is soft-deleted, its UUID may be reused.
codestringНет
namestringНет
organization_idstringДа
visit_idstringНет
customer_idstringДа
customer_assistant_idstringНет
responsible_idstringДа
currency_idstringНет
currencyobjectНет
currency._idstring (objectId)Нет
currency.numeratornumberДа
currency.denominatornumberДа
currency.valuenumberДа
currency.precisionnumberНет
currency.round_typestringНетДопустимые значения: floor, ceil, round
statestringДаДопустимые значения: new, draft, in_progress, canceled, done, accepted
state_idstringНет
datestringДа
delivery_datestringНет
notestringНетComplete order note. Integration creates preserve long courier, pickup, and customer instructions; the API request-body limit still applies.
discountsobject[]Да
discounts[]._idstring (objectId)Нет
discounts[].valuenumberДа
discounts[].namestringДа
discounts[].apply_typestringНетДопустимые значения: percent, cash
discounts[].is_custombooleanНет
productsobject[]Да
products[].product_idstring (objectId)Да
products[].amountnumberДа
products[].pricenumberДа
products[].real_pricenumberНет
products[].discountsobject[]Нет
products[].discounts[]._idstring (objectId)Нет
products[].discounts[].valuenumberДа
products[].discounts[].namestringДа
products[].discounts[].apply_typestringНетДопустимые значения: percent, cash
products[].discounts[].is_custombooleanНет
products[].price_idstring (objectId)Да
products[].warehouse_idstring (objectId)Да
products[].box_countnumberНет
products[].box_itemnumberНет
products[].productobjectНет
products[].product.namestringНет
products[].product.product_idstringНет
products[].product.measure_idstringНет
products[].product.measureobjectНет
delivery_addressobjectНет
delivery_address.longnumberДа
delivery_address.latnumberДа
delivery_address.human_addressobjectНет
delivery_address.human_address.addresstringНет
delivery_address.human_address.citystringНет
delivery_address.human_address.statestringНет
delivery_address.human_address.zipstringНет
price_idstringНет
custom_fieldsobjectНет
custom_fields._idstringНет
custom_fields.valueobjectНет
json
{
  "uuid": "external-order-123",
  "code": "string",
  "name": "string",
  "organization_id": "67b486d242ed76693cd2cc59",
  "visit_id": "67b486d242ed76693cd2cc59",
  "customer_id": "67b486d242ed76693cd2cc59",
  "customer_assistant_id": "67b486d242ed76693cd2cc59",
  "responsible_id": "67b486d242ed76693cd2cc59",
  "currency_id": "67b486d242ed76693cd2cc59",
  "currency": {
    "_id": "66126f4b1e2f4a9cb4244c8f",
    "numerator": 1,
    "denominator": 1000,
    "value": 11000,
    "precision": 3,
    "round_type": "floor"
  },
  "state": "new",
  "state_id": "67b486d242ed76693cd2cc59",
  "date": "2023-10-01T12:00:00Z",
  "delivery_date": "2023-10-01T12:00:00Z",
  "note": "string",
  "discounts": [
    {
      "_id": "66126f4b1e2f4a9cb4244c90",
      "value": 10,
      "name": "10%",
      "apply_type": "percent",
      "is_custom": true
    }
  ],
  "products": [
    {
      "product_id": "66126f4b1e2f4a9cb4244a01",
      "amount": 2,
      "price": 15000,
      "real_price": 14500,
      "discounts": [],
      "price_id": "66126f4b1e2f4a9cb4244a02",
      "warehouse_id": "66126f4b1e2f4a9cb4244a03",
      "box_count": 2,
      "box_item": 24,
      "product": {
        "name": null,
        "product_id": null,
        "measure_id": null,
        "measure": null
      }
    }
  ],
  "delivery_address": {
    "long": 0,
    "lat": 0,
    "human_address": {
      "addres": "string",
      "city": "string",
      "state": "string",
      "zip": "string"
    }
  },
  "price_id": "2023-10-01T12:00:00Z",
  "custom_fields": {
    "_id": "67b486d242ed76693cd2cc59",
    "value": {}
  }
}

Ответ

ПолеТипОписание
_idstring
created_atstring
updated_atstring
namestring
uuidstring
visit_idstring
codestring
organization_idstring
organizationobject
organization._idstring
organization.namestring
customer_idstring
customerobject
customer._idstring
customer.typestringДопустимые значения: legal, natural
customer.phone_numberstring
customer.phone_numbersstring[]
customer.namestring
customer.imagestring
customer.custom_fieldsobject[]
customer.custom_fields[]._idstring
customer.custom_fields[].valueobject
customer_assistantobject
customer_assistant._idstring
customer_assistant.namestring
customer_assistant.typestringДопустимые значения: legal, natural
customer_assistant_hierarchyobject[]
customer_assistant_hierarchy[]._idstring
customer_assistant_hierarchy[].namestring
customer_assistant_hierarchy[].typestringДопустимые значения: legal, natural
customer_assistant_hierarchy[].first_namestring
customer_assistant_hierarchy[].last_namestring
customer_assistant_hierarchy[].middle_namestring
responsible_idstring
customer_image_urlstring
responsibleobject
responsible._idstring
responsible.full_namestring
price_idstring
priceobject
price._idstring
price.namestring
price.short_namestring
price.codestring
state_idstring
statestringДопустимые значения: new, draw, in_progress, canceled, done, accepted
notestring
datestring
delivery_datestring
numberstring
deviceobject
device._idstring
device.namestring
device.device_idstring
currencyobject
currency._idstring (objectId)
currency.to_currency_idstring (objectId)
currency.uuidnumber
currency.namestring
currency.valuenumber
currency.symbolstring
currency.sidestringДопустимые значения: start, end
currency.numeratornumber
currency.denominatornumber
currency.round_typestringДопустимые значения: floor, ceil, round
currency.precisionnumber
currency_idstring
total_to_paynumber
total_pricenumber
discountnumber
total_discountnumber
discountsobject[]
discounts[]._idstring
discounts[].namestring
discounts[].valuenumber
discounts[].apply_typestringДопустимые значения: percent, cash
discounts[].currency_idstring
productsobject[]
delivery_addressobject
delivery_address.longnumber
delivery_address.latnumber
delivery_address.human_addressobject
delivery_address.human_address.addresstring
delivery_address.human_address.citystring
delivery_address.human_address.statestring
delivery_address.human_address.zipstring
total_salenumber
total_amountnumber
trade_statusstringДопустимые значения: zero, partial, fully
tradesobject[]
trades[]._idstring
trades[].typestringДопустимые значения: b2b, b2c
trades[].organization_idstring
trades[].statestringДопустимые значения: new, in_progress, draft, canceled, done
trades[].state_idstring
trades[].numberstring
trades[].uuidnumber
trades[].currencyobject
trades[].currency._idstring
trades[].currency.to_currency_idstring
trades[].currency.namestring
trades[].currency.valuenumber
trades[].currency.numeratornumber
trades[].currency.denominatornumber
trades[].currency.round_typestringДопустимые значения: floor, ceil, round
trades[].currency.precisionnumber
trades[].cashbox_idstring
trades[].calc_tax_after_discountboolean
trades[].sale_settingsobject
trades[].sale_settings.discountnumber
trades[].total_extra_costnumber
trades[].total_effected_extra_costnumber
custom_fieldsobject[]
custom_fields[]._idstring
custom_fields[].valuestring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "name": "string",
    "uuid": "external-order-123",
    "visit_id": "67b486d242ed76693cd2cc59",
    "code": "67b486d242ed76693cd2cc59",
    "organization_id": "67b486d242ed76693cd2cc59",
    "organization": {
      "_id": "string",
      "name": "string"
    },
    "customer_id": "67b486d242ed76693cd2cc59",
    "customer": {
      "_id": "string",
      "type": "legal",
      "phone_number": "string",
      "phone_numbers": [
        "string"
      ],
      "name": "string",
      "image": "string",
      "custom_fields": [
        {
          "_id": null,
          "value": null
        }
      ]
    },
    "customer_assistant": {
      "_id": "string",
      "name": "string",
      "type": "legal"
    },
    "customer_assistant_hierarchy": [
      {
        "_id": "string",
        "name": "string",
        "type": "legal",
        "first_name": "string",
        "last_name": "string",
        "middle_name": "string"
      }
    ],
    "responsible_id": "string",
    "customer_image_url": "string",
    "responsible": {
      "_id": "string",
      "full_name": "string"
    },
    "price_id": "string",
    "price": {
      "_id": "string",
      "name": "string",
      "short_name": "string",
      "code": "string"
    },
    "state_id": "string",
    "state": "new",
    "note": "string",
    "date": "string",
    "delivery_date": "string",
    "number": "string",
    "device": {
      "_id": "string",
      "name": "string",
      "device_id": "string"
    },
    "currency": {
      "_id": "66126f4b1e2f4a9cb4244c8b",
      "to_currency_id": "66126f4b1e2f4a9cb4244c8c",
      "uuid": "66126f4b1e2f4a9cb4244c8d",
      "name": "string",
      "value": 1,
      "symbol": "string",
      "side": "start",
      "numerator": 1,
      "denominator": 1,
      "round_type": "floor",
      "precision": 3
    },
    "currency_id": "string",
    "total_to_pay": 0,
    "total_price": 0,
    "discount": 0,
    "total_discount": 0,
    "discounts": [
      {
        "_id": "string",
        "name": "string",
        "value": 0,
        "apply_type": "percent",
        "currency_id": "string"
      }
    ],
    "products": [
      {}
    ],
    "delivery_address": {
      "long": 0,
      "lat": 0,
      "human_address": {
        "addres": "string",
        "city": "string",
        "state": "string",
        "zip": "string"
      }
    },
    "total_sale": 0,
    "total_amount": 0,
    "trade_status": "zero",
    "trades": [
      {
        "_id": "string",
        "type": "b2b",
        "organization_id": "string",
        "state": "new",
        "state_id": "string",
        "number": "string",
        "uuid": 0,
        "currency": {
          "_id": null,
          "to_currency_id": null,
          "name": null,
          "value": null,
          "numerator": null,
          "denominator": null,
          "round_type": null,
          "precision": null
        },
        "cashbox_id": "string",
        "calc_tax_after_discount": false,
        "sale_settings": {
          "discount": null
        },
        "total_extra_cost": 0,
        "total_effected_extra_cost": 0
      }
    ],
    "custom_fields": [
      {
        "_id": "string",
        "value": "string"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /sale-order/update ​

This method allows updating saler-order in the account.

Тело запроса

ПолеТипОбязательноОписание
_idstringДа
codestringНет
namestringНет
organization_idstringНет
visit_idstringНет
customer_idstringНет
customer_assistant_idstringНет
responsible_idstringНет
currency_idstringДа
currencyobjectНет
currency._idstring (objectId)Нет
currency.numeratornumberДа
currency.denominatornumberДа
currency.valuenumberДа
currency.precisionnumberНет
currency.round_typestringНетДопустимые значения: floor, ceil, round
datestringНет
delivery_datestringНет
notestringНет
discountsobject[]Да
discounts[]._idstring (objectId)Нет
discounts[].valuenumberДа
discounts[].namestringДа
discounts[].discount_apply_typestringНетДопустимые значения: percentage, cash
discounts[].currency_idstring (objectId)Нет
productsobject[]Да
products[].product_idstring (objectId)Да
products[].amountnumberДа
products[].pricenumberДа
products[].real_pricenumberНет
products[].discountsobject[]Нет
products[].discounts[]._idstring (objectId)Нет
products[].discounts[].valuenumberДа
products[].discounts[].namestringДа
products[].discounts[].discount_apply_typestringНетДопустимые значения: percent, cash
products[].discounts[].currency_idstring (objectId)Нет
products[].price_idstring (objectId)Да
products[].warehouse_idstring (objectId)Да
products[].box_countnumberНет
products[].box_itemnumberНет
products[].productobjectНет
products[].product.namestringНет
products[].product.product_idstringНет
products[].product.measure_idstringНет
products[].product.measureobjectНет
delivery_addressobjectНет
delivery_address.longnumberДа
delivery_address.latnumberДа
delivery_address.human_addressobjectНет
delivery_address.human_address.addresstringНет
delivery_address.human_address.citystringНет
delivery_address.human_address.statestringНет
delivery_address.human_address.zipstringНет
price_idstringНет
custom_fieldsobjectНет
custom_fields._idstringНет
custom_fields.valuestringНетmust be any data types
is_offlinebooleanНет
json
{
  "_id": "67b486d242ed76693cd2cc59",
  "code": "",
  "name": "",
  "organization_id": "67b486d242ed76693cd2cc59",
  "visit_id": "67b486d242ed76693cd2cc59",
  "customer_id": "67b486d242ed76693cd2cc59",
  "customer_assistant_id": "67b486d242ed76693cd2cc59",
  "responsible_id": "67b486d242ed76693cd2cc59",
  "currency_id": "67b486d242ed76693cd2cc59",
  "currency": {
    "_id": "66126f4b1e2f4a9cb4244c8f",
    "numerator": 1,
    "denominator": 1000,
    "value": 11000,
    "precision": 3,
    "round_type": "floor"
  },
  "date": "2023-10-01T12:00:00Z",
  "delivery_date": "2023-10-01T12:00:00Z",
  "note": "string",
  "discounts": [
    {
      "_id": "66126f4b1e2f4a9cb4244c90",
      "value": 10,
      "name": "10%",
      "discount_apply_type": "percentage",
      "currency_id": "66126f4b1e2f4a9cb4244c91"
    }
  ],
  "products": [
    {
      "product_id": "66126f4b1e2f4a9cb4244a01",
      "amount": 2,
      "price": 15000,
      "real_price": 14500,
      "discounts": [],
      "price_id": "66126f4b1e2f4a9cb4244a02",
      "warehouse_id": "66126f4b1e2f4a9cb4244a03",
      "box_count": 2,
      "box_item": 24,
      "product": {
        "name": null,
        "product_id": null,
        "measure_id": null,
        "measure": null
      }
    }
  ],
  "delivery_address": {
    "long": 0,
    "lat": 0,
    "human_address": {
      "addres": "string",
      "city": "string",
      "state": "string",
      "zip": "string"
    }
  },
  "price_id": "2023-10-01T12:00:00Z",
  "custom_fields": {
    "_id": "67b486d242ed76693cd2cc59",
    "value": "any"
  },
  "is_offline": false
}

Ответ

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

DELETE /sale-order/delete/{id} ​

Delete a sale-order

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

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

Тело запроса

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

Ответ

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

GET /sale-order/get-by-id/{id} ​

Get sale-order using its _id

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

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

Тело запроса

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

Ответ

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

POST /sale-order/get-paging ​

Get sale-orders by paging

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНет
customer_idstringНет
currency_idstringНет
statesstring[]Нет
searchstringНет
date_formstringНет
date_tostringНет
delivery_date_fromstringНет
delivery_date_tostringНет
created_from_botbooleanНет
trade_statusesstring[]Нет
visit_idstringНет
state_idstringНет
namestringНет
json
{
  "page": 1,
  "limit": 20,
  "organization_id": "67b486d242ed76693cd2cc59",
  "customer_id": "67b486d242ed76693cd2cc59",
  "currency_id": "67b486d242ed76693cd2cc59",
  "states": [
    "string"
  ],
  "search": "string",
  "date_form": "2023-10-01T12:00:00Z",
  "date_to": "2023-10-01T12:00:00Z",
  "delivery_date_from": "2023-10-01T12:00:00Z",
  "delivery_date_to": "2023-10-01T12:00:00Z",
  "created_from_bot": false,
  "trade_statuses": [
    "string"
  ],
  "visit_id": "67b486d242ed76693cd2cc59",
  "state_id": "67b486d242ed76693cd2cc59",
  "name": "string"
}

Ответ

data.total — общее количество записей, data.data[] — записи текущей страницы. Таблица ниже описывает одну запись.

ПолеТипОписание
created_atstring
updated_atstring
namestring
uuidstring
codestring
organizationobject
organization._idstring
organization.namestring
customerobject
customer._idstring
customer.typestringДопустимые значения: legal, natural
customer.phone_numberstring
customer.phone_numbersstring[]
customer.namestring
customer.imagestring
customer.custom_fieldsobject[]
customer.custom_fields[]._idstring
customer.custom_fields[].valueobject
customer_image_urlstring
responsibleobject
responsible._idstring
responsible.full_namestring
state_idstring
statestringДопустимые значения: new, draw, in_progress, canceled, done, accepted
notestring
datestring
numberstring
currency_idstring
total_to_paynumber
total_pricenumber
total_discountnumber
total_salenumber
total_amountnumber
trade_statusstringДопустимые значения: zero, partial, fully
created_from_botboolean
positionnumber
taskobject
task.type_idstring
task.datestring
task.created_bystring
task.responsible_idstring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "data": [
      {
        "created_at": "string",
        "updated_at": "string",
        "name": "string",
        "uuid": "external-order-123",
        "code": "string",
        "organization": {
          "_id": "string",
          "name": "string"
        },
        "customer": {
          "_id": "string",
          "type": "legal",
          "phone_number": "string",
          "phone_numbers": [
            "string"
          ],
          "name": "string",
          "image": "string",
          "custom_fields": [
            {
              "_id": null,
              "value": null
            }
          ]
        },
        "customer_image_url": "string",
        "responsible": {
          "_id": "string",
          "full_name": "string"
        },
        "state_id": "67b486d242ed76693cd2cc59",
        "state": "new",
        "note": "string",
        "date": "string",
        "number": "string",
        "currency_id": "string",
        "total_to_pay": 0,
        "total_price": 0,
        "total_discount": 0,
        "total_sale": 0,
        "total_amount": 0,
        "trade_status": "zero",
        "created_from_bot": false,
        "position": 0,
        "task": {
          "type_id": "67b486d242ed76693cd2cc59",
          "date": "2023-10-01T12:00:00Z",
          "created_by": "67b486d242ed76693cd2cc59",
          "responsible_id": "67b486d242ed76693cd2cc59"
        }
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /sale-order/get-deleted ​

Get deleted sale-order ids

Параметры запроса

ПараметрТипОбязательноОписание
deleted_atstringДа

Тело запроса

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

Ответ

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

PUT /sale-order/accept/{id} ​

Accept a sale order (mark as accepted by the responsible party).

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

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

Тело запроса

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

Ответ

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

POST /sale-order/get-by-customer/for-bot ​

List sale orders for a given customer, formatted for bot/external consumption.

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
customer_idstringДа
statesstring[]Нет
json
{
  "page": 1,
  "limit": 20,
  "customer_id": "string",
  "states": [
    "new"
  ]
}

Ответ

ПолеТипОписание
listobject[]
list[]._idstring
list[].created_atstring
list[].updated_atstring
list[].namestring
list[].uuidstring
list[].visit_idstring
list[].codestring
list[].organization_idstring
list[].organizationobject
list[].organization._idstring
list[].organization.namestring
list[].customer_idstring
list[].customerobject
list[].customer._idstring
list[].customer.typestringДопустимые значения: legal, natural
list[].customer.phone_numberstring
list[].customer.phone_numbersstring[]
list[].customer.namestring
list[].customer.imagestring
list[].customer.custom_fieldsobject[]
list[].customer_assistantobject
list[].customer_assistant._idstring
list[].customer_assistant.namestring
list[].customer_assistant.typestringДопустимые значения: legal, natural
list[].customer_assistant_hierarchyobject[]
list[].customer_assistant_hierarchy[]._idstring
list[].customer_assistant_hierarchy[].namestring
list[].customer_assistant_hierarchy[].typestringДопустимые значения: legal, natural
list[].customer_assistant_hierarchy[].first_namestring
list[].customer_assistant_hierarchy[].last_namestring
list[].customer_assistant_hierarchy[].middle_namestring
list[].responsible_idstring
list[].customer_image_urlstring
list[].responsibleobject
list[].responsible._idstring
list[].responsible.full_namestring
list[].price_idstring
list[].priceobject
list[].price._idstring
list[].price.namestring
list[].price.short_namestring
list[].price.codestring
list[].state_idstring
list[].statestringДопустимые значения: new, draw, in_progress, canceled, done, accepted
list[].notestring
list[].datestring
list[].delivery_datestring
list[].numberstring
list[].deviceobject
list[].device._idstring
list[].device.namestring
list[].device.device_idstring
list[].currencyobject
list[].currency._idstring (objectId)
list[].currency.to_currency_idstring (objectId)
list[].currency.uuidnumber
list[].currency.namestring
list[].currency.valuenumber
list[].currency.symbolstring
list[].currency.sidestringДопустимые значения: start, end
list[].currency.numeratornumber
list[].currency.denominatornumber
list[].currency.round_typestringДопустимые значения: floor, ceil, round
list[].currency.precisionnumber
list[].currency_idstring
list[].total_to_paynumber
list[].total_pricenumber
list[].discountnumber
list[].total_discountnumber
list[].discountsobject[]
list[].discounts[]._idstring
list[].discounts[].namestring
list[].discounts[].valuenumber
list[].discounts[].apply_typestringДопустимые значения: percent, cash
list[].discounts[].currency_idstring
list[].productsobject[]
list[].delivery_addressobject
list[].delivery_address.longnumber
list[].delivery_address.latnumber
list[].delivery_address.human_addressobject
list[].total_salenumber
list[].total_amountnumber
list[].trade_statusstringДопустимые значения: zero, partial, fully
list[].tradesobject[]
list[].trades[]._idstring
list[].trades[].typestringДопустимые значения: b2b, b2c
list[].trades[].organization_idstring
list[].trades[].statestringДопустимые значения: new, in_progress, draft, canceled, done
list[].trades[].state_idstring
list[].trades[].numberstring
list[].trades[].uuidnumber
list[].trades[].currencyobject
list[].trades[].cashbox_idstring
list[].trades[].calc_tax_after_discountboolean
list[].trades[].sale_settingsobject
list[].trades[].total_extra_costnumber
list[].trades[].total_effected_extra_costnumber
list[].custom_fieldsobject[]
list[].custom_fields[]._idstring
list[].custom_fields[].valuestring
totalnumber
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "list": [
      {
        "_id": "string",
        "created_at": "string",
        "updated_at": "string",
        "name": "string",
        "uuid": "external-order-123",
        "visit_id": "67b486d242ed76693cd2cc59",
        "code": "67b486d242ed76693cd2cc59",
        "organization_id": "67b486d242ed76693cd2cc59",
        "organization": {
          "_id": null,
          "name": null
        },
        "customer_id": "67b486d242ed76693cd2cc59",
        "customer": {
          "_id": null,
          "type": null,
          "phone_number": null,
          "phone_numbers": null,
          "name": null,
          "image": null,
          "custom_fields": null
        },
        "customer_assistant": {
          "_id": null,
          "name": null,
          "type": null
        },
        "customer_assistant_hierarchy": [],
        "responsible_id": "string",
        "customer_image_url": "string",
        "responsible": {
          "_id": null,
          "full_name": null
        },
        "price_id": "string",
        "price": {
          "_id": null,
          "name": null,
          "short_name": null,
          "code": null
        },
        "state_id": "string",
        "state": "new",
        "note": "string",
        "date": "string",
        "delivery_date": "string",
        "number": "string",
        "device": {
          "_id": null,
          "name": null,
          "device_id": null
        },
        "currency": {
          "_id": null,
          "to_currency_id": null,
          "uuid": null,
          "name": null,
          "value": null,
          "symbol": null,
          "side": null,
          "numerator": null,
          "denominator": null,
          "round_type": null,
          "precision": null
        },
        "currency_id": "string",
        "total_to_pay": 0,
        "total_price": 0,
        "discount": 0,
        "total_discount": 0,
        "discounts": [],
        "products": [],
        "delivery_address": {
          "long": null,
          "lat": null,
          "human_address": null
        },
        "total_sale": 0,
        "total_amount": 0,
        "trade_status": "zero",
        "trades": [],
        "custom_fields": []
      }
    ],
    "total": 0
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /sale-order/get-by-id/for-bot/{id} ​

Get a sale order by _id, formatted for bot/external consumption.

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

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

Тело запроса

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

Ответ

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


Эта страница сгенерирована из спецификации OpenAPI.

Bito 2.0 Integration API