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.
Нужное разрешение: sale_order_delete · как работают разрешения
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/sale-order/delete-many' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"string"
]
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/sale-order/delete-many', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"ids": [
"string"
]
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/sale-order/delete-many",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"ids": [
"string",
],
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"ids": [
"string"
]
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/sale-order/delete-many');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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). Returns the async process record produced by the bulk operation.
Нужное разрешение: sale_order_update · как работают разрешения
Приложению, которое отменяет документ, стоит запросить и sale_order_cancel.
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/sale-order/update-status-many' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"string"
],
"state_id": "string"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/sale-order/update-status-many', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"ids": [
"string"
],
"state_id": "string"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/sale-order/update-status-many",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"ids": [
"string",
],
"state_id": "string",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"ids": [
"string"
],
"state_id": "string"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/sale-order/update-status-many');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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 |
{
"ids": [
"string"
],
"state_id": "string"
}Ответ
Структура ответа совпадает с POST /sale-order/delete-many.
Эта страница сгенерирована из спецификации OpenAPI.