Customer Bulk
Bulk customer create/update operations
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /customer/delete-many
Soft-delete multiple customers in a single call (sets is_deleted=true on each). Pass either an explicit list of ObjectIds in ids, or set is_all=true with optional filters to delete all matched customers. Returns the count of deleted documents.
Нужное разрешение: customer_delete · как работают разрешения
Пример запроса
bash
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/customer/delete-many' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"string"
]
}'js
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/customer/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()python
import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/customer/delete-many",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"ids": [
"string",
],
},
)
print(res.json())php
<?php
$body = <<<'JSON'
{
"ids": [
"string"
]
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/customer/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[] | Да | Explicit list of customer ObjectIds to soft-delete. Mutually exclusive with is_all=true. |
json
{
"ids": [
"string"
]
}Ответ
| Поле | Тип | Описание |
|---|---|---|
deleted_count | number | Number of customer documents that were soft-deleted |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"deleted_count": 0
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.