Skip to content

Sale Order Bulk ​

Bulk sale order operations

INFO

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

POST /sale-order/delete-many ​

Soft-delete multiple sale orders in a single call (sets is_deleted=true on each). Pass a non-empty array of ObjectIds in ids. Returns the async process record produced by the bulk operation.

Тело запроса

ПолеТипОбязательноОписание
idsstring[]ДаNon-empty list of sale order ObjectIds to soft-delete
json
{
  "ids": [
    "string"
  ]
}

Ответ

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

POST /sale-order/update-status-many ​

Update the kanban state of multiple sale orders in a single call. Pass a non-empty array of ObjectIds in ids and the target state_id (ObjectId of the States document). Integrations may set reject_if_has_trades=true to atomically reject the whole change if any selected order already owns financial history. Returns the async process record produced by the bulk operation.

Тело запроса

ПолеТипОбязательноОписание
idsstring[]ДаNon-empty list of sale order ObjectIds whose status will be updated
state_idstringДаObjectId of the target States document (kanban column) to move the sale orders into
reject_if_has_tradesbooleanНетOptional integration safety fence. When true, Bito checks every selected sale order for trade status, non-zero sold total, and linked trade documents inside the same transaction as the state change. If any financial document exists, the entire state update is rejected. Intended for external cancellation flows; omitting it preserves existing behavior.. По умолчанию: false
json
{
  "ids": [
    "string"
  ],
  "state_id": "string",
  "reject_if_has_trades": false
}

Ответ

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


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

Bito 2.0 Integration API