Product stock
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /product-stock/get-paging
Get product-stocks by paging
Нужное разрешение: product_stock · как работают разрешения
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-paging' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"page": 1,
"limit": 20
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-paging', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"page": 1,
"limit": 20
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-paging",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"page": 1,
"limit": 20,
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"page": 1,
"limit": 20
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-paging');
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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
organization_id | string | Нет | |
warehouse_id | string | Нет | |
product_id | string | Нет | |
states | string[] | Нет | |
is_marked | boolean | Нет | |
search | string | Нет | |
nin | string[] | Нет | |
purchase_id | string | Нет | |
trade_id | string | Нет | |
category_id | string | Нет | |
sort | object | Нет | |
sort.amount | boolean | Нет | |
sort.name | number | Нет | asc 1 , desc -1 |
update_trade_id | string | Нет | |
is_semi_product | boolean | Нет | |
is_product | boolean | Нет | |
is_material | boolean | Нет | |
is_main_warehouse | boolean | Нет | |
updated_at | string (date-time) | Нет | Only records updated at or after this time. |
{
"page": 1,
"limit": 20,
"organization_id": "string",
"warehouse_id": "string",
"product_id": "string",
"states": [
"string"
],
"is_marked": false,
"search": "string",
"nin": [
"string"
],
"purchase_id": "string",
"trade_id": "string",
"category_id": "string",
"sort": {
"amount": false,
"name": 0
},
"update_trade_id": "64b7f4d9e2b3b6a0b7c5d7ff",
"is_semi_product": false,
"is_product": false,
"is_material": false,
"is_main_warehouse": false,
"updated_at": "2025-05-01T12:00:00Z"
}Ответ
data.total — общее количество записей, data.data[] — записи текущей страницы. Таблица ниже описывает одну запись.
| Поле | Тип | Описание |
|---|---|---|
product | object | |
product._id | string | |
product.measure | object | |
product.measure._id | string | |
product.measure.system_code | string | |
product.measure.code | string | |
product.measure.short_name | string | |
product.measure.name | string | |
product.measure.decimal_count | number | |
product.name | string | |
product.barcode | string | |
product.sku | string | |
product.box_item | number | |
product.box_type | object | |
product.box_type._id | string | |
product.box_type.code | string | |
product.box_type.short_name | string | |
product.box_type.name | string | |
purchase_id | string | |
trade_id | string | |
organization | object | |
organization._id | string | |
organization.name | string | |
warehouse | object | |
warehouse._id | string | |
warehouse.name | string | |
state | string | |
mark | string | |
cost | number | |
amount | number | |
cost_currency_id | string | |
initial_cost | number | |
initial_cost_currency_id | string | |
created_at | string | |
updated_at | string | |
income_id | string | |
revision_id | string | |
transfer_id | string | |
write_off_id | string | |
purchase_return_id | string | |
production_operation_id | string | |
operation_item_id | string | |
total | number | |
income_date | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"product": {
"_id": "string",
"measure": {
"_id": "string",
"system_code": "string",
"code": "string",
"short_name": "string",
"name": "string",
"decimal_count": 0
},
"name": "string",
"barcode": "string",
"sku": "string",
"box_item": 0,
"box_type": {
"_id": "string",
"code": "string",
"short_name": "string",
"name": "string"
}
},
"purchase_id": "string",
"trade_id": "string",
"organization": {
"_id": "string",
"name": "string"
},
"warehouse": {
"_id": "string",
"name": "string"
},
"state": "string",
"mark": "string",
"cost": 0,
"amount": 0,
"cost_currency_id": "string",
"initial_cost": 0,
"initial_cost_currency_id": "string",
"created_at": "string",
"updated_at": "string",
"income_id": "string",
"revision_id": "string",
"transfer_id": "string",
"write_off_id": "string",
"purchase_return_id": "string",
"production_operation_id": "string",
"operation_item_id": "string",
"total": 0,
"income_date": "string"
}
]
},
"time": "2025-05-01T12:00:00Z"
}POST /product-stock/get-by-mark
Get the product that a marked (serial/IMEI) stock belongs to, enriched for sale (prices, taxes, available quantity). When warehouse_id is omitted, the organization's main warehouse is used. Returns a not-found error if no stock matches the mark.
Нужное разрешение: product_stock · как работают разрешения
Пример запроса
curl -X POST 'https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-by-mark' \
-H "api-key: $BITO_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"mark": "string"
}'const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-by-mark', {
method: 'POST',
headers: { 'api-key': process.env.BITO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"mark": "string"
}),
})
const { code, data } = await res.json()import os
import requests
res = requests.request(
"POST",
"https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-by-mark",
headers={"api-key": os.environ["BITO_API_KEY"]},
json={
"mark": "string",
},
)
print(res.json())<?php
$body = <<<'JSON'
{
"mark": "string"
}
JSON;
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/product-stock/get-by-mark');
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);Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
mark | string | Да | Mark (serial/IMEI) of the marked product-stock to look up |
organization_id | string | Нет | Organization id the stock belongs to |
warehouse_id | string | Нет | Warehouse id. When omitted, the organization's main warehouse is used |
states | string[] | Нет | Optional product-stock states to filter by (e.g. stock, sold) |
state | string | Нет | Допустимые значения: stock, in_transit, trash, sold, booked, on_the_way, deleted, used |
{
"mark": "string",
"organization_id": "string",
"warehouse_id": "string",
"states": [
"string"
],
"state": "stock"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | |
name | string | |
sku | string | |
barcode | string | |
image | string | |
measure_id | string | |
measure | object | |
box_item | number | |
is_marked | boolean | |
is_compound | boolean | |
is_service | boolean | |
category | object | |
prices | object[] | |
taxes | object[] | |
cost | number | |
cost_currency_id | string | |
quantity | number | Available amount of the product in the resolved warehouse |
parent_id | string |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"sku": "string",
"barcode": "string",
"image": "string",
"measure_id": "string",
"measure": {},
"box_item": 0,
"is_marked": false,
"is_compound": false,
"is_service": false,
"category": {},
"prices": [
{}
],
"taxes": [
{}
],
"cost": 0,
"cost_currency_id": "string",
"quantity": 0,
"parent_id": "string"
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.