Sale Order Bulk
Bulk sale order operations
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside 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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Non-empty list of sale order ObjectIds to soft-delete |
{
"ids": [
"string"
]
}Response
{
"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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Non-empty list of sale order ObjectIds whose status will be updated |
state_id | string | Yes | ObjectId of the target States document (kanban column) to move the sale orders into |
reject_if_has_trades | boolean | No | 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.. Default: false |
{
"ids": [
"string"
],
"state_id": "string",
"reject_if_has_trades": false
}Response
Same response shape as POST /sale-order/delete-many.
This page is generated from the OpenAPI spec.