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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
ids | string[] | Да | Non-empty list of sale order ObjectIds to soft-delete |
{
"ids": [
"string"
]
}Ответ
{
"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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
ids | string[] | Да | Non-empty list of sale order ObjectIds whose status will be updated |
state_id | string | Да | ObjectId of the target States document (kanban column) to move the sale orders into |
reject_if_has_trades | boolean | Нет | 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 |
{
"ids": [
"string"
],
"state_id": "string",
"reject_if_has_trades": false
}Ответ
Структура ответа совпадает с POST /sale-order/delete-many.
Эта страница сгенерирована из спецификации OpenAPI.