Purchase return
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
POST /purchase-return/get-paging
Paginated list of purchase returns with optional filters.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
states | string[] | No | |
organization_id | string | No | |
supplier_id | string | No | |
purchase_id | string | No | |
responsible_id | string | No | |
currency_id | string | No | |
date_from | string (date-time) | No | |
date_to | string (date-time) | No |
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"
}Response
| Field | Type | Description |
|---|---|---|
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).
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
| Field | Type | Description |
|---|---|---|
_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 | One of: 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"
}This page is generated from the OpenAPI spec.