Skip to content

Sale Order Bulk ​

Bulk sale order operations

INFO

Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.

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.

So‘rov tanasi

MaydonTurMajburiyTavsif
idsstring[]HaNon-empty list of sale order ObjectIds to soft-delete
json
{
  "ids": [
    "string"
  ]
}

Javob

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.

So‘rov tanasi

MaydonTurMajburiyTavsif
idsstring[]HaNon-empty list of sale order ObjectIds whose status will be updated
state_idstringHaObjectId of the target States document (kanban column) to move the sale orders into
reject_if_has_tradesbooleanYo‘qOptional 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.. Standart: false
json
{
  "ids": [
    "string"
  ],
  "state_id": "string",
  "reject_if_has_trades": false
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /sale-order/delete-many.


Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API