Purchase return
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
POST /purchase-return/get-paging
Paginated list of purchase returns with optional filters.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
states | string[] | Нет | |
organization_id | string | Нет | |
supplier_id | string | Нет | |
purchase_id | string | Нет | |
responsible_id | string | Нет | |
currency_id | string | Нет | |
date_from | string (date-time) | Нет | |
date_to | string (date-time) | Нет |
json
{
"page": 1,
"limit": 20,
"states": [
"new"
],
"organization_id": "string",
"supplier_id": "string",
"purchase_id": "string",
"responsible_id": "string",
"currency_id": "string",
"date_from": "2025-05-01T12:00:00Z",
"date_to": "2025-05-01T12:00:00Z"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
list | any[] | |
total | number |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"list": [],
"total": 0
},
"time": "2025-05-01T12:00:00Z"
}GET /purchase-return/get-by-id/{id}
Get a purchase return by its _id (detailed view).
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да |
Тело запроса
Тело запроса не требуется.
Ответ
| Поле | Тип | Описание |
|---|---|---|
_id | string | |
number | string | |
organization_id | string | |
supplier_id | string | |
purchase_id | string | |
responsible_id | string | |
warehouse_id | string | |
currency_id | string | |
date | string (date-time) | |
state | string | Допустимые значения: new, done, canceled |
total | number | |
note | string | |
items | object[] | |
items[]._id | string | |
items[].product_id | string | |
items[].amount | number | |
items[].cost | number | |
created_at | string (date-time) | |
updated_at | string (date-time) |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"number": "string",
"organization_id": "string",
"supplier_id": "string",
"purchase_id": "string",
"responsible_id": "string",
"warehouse_id": "string",
"currency_id": "string",
"date": "2025-05-01T12:00:00Z",
"state": "new",
"total": 0,
"note": "string",
"items": [
{
"_id": "string",
"product_id": "string",
"amount": 0,
"cost": 0
}
],
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.