Product stock
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /product-stock/get-paging
Get product-stocks by paging
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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 |
json
{
"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
}
}Ответ
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 |
json
{
"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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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) |
json
{
"mark": "string",
"organization_id": "string",
"warehouse_id": "string",
"states": [
"string"
]
}Ответ
| Поле | Тип | Описание |
|---|---|---|
_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 |
json
{
"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.