Skip to content

Purchase return ​

INFO

Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.

POST /purchase-return/get-paging ​

Paginated list of purchase returns with optional filters.

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
statesstring[]Нет
organization_idstringНет
supplier_idstringНет
purchase_idstringНет
responsible_idstringНет
currency_idstringНет
date_fromstring (date-time)Нет
date_tostring (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"
}

Ответ

ПолеТипОписание
listany[]
totalnumber
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).

Параметры пути

ПараметрТипОбязательноОписание
idstringДа

Тело запроса

Тело запроса не требуется.

Ответ

ПолеТипОписание
_idstring
numberstring
organization_idstring
supplier_idstring
purchase_idstring
responsible_idstring
warehouse_idstring
currency_idstring
datestring (date-time)
statestringДопустимые значения: new, done, canceled
totalnumber
notestring
itemsobject[]
items[]._idstring
items[].product_idstring
items[].amountnumber
items[].costnumber
created_atstring (date-time)
updated_atstring (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.

Bito 2.0 Integration API