Skip to content

Product stock ​

INFO

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

POST /product-stock/get-paging ​

Get product-stocks by paging

Тело запроса

ПолеТипОбязательноОписание
pagenumberДаПо умолчанию: 1
limitnumberДаПо умолчанию: 20
organization_idstringНет
warehouse_idstringНет
product_idstringНет
statesstring[]Нет
is_markedbooleanНет
searchstringНет
ninstring[]Нет
purchase_idstringНет
trade_idstringНет
category_idstringНет
sortobjectНет
sort.amountbooleanНет
sort.namenumberНет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[] — записи текущей страницы. Таблица ниже описывает одну запись.

ПолеТипОписание
productobject
product._idstring
product.measureobject
product.measure._idstring
product.measure.system_codestring
product.measure.codestring
product.measure.short_namestring
product.measure.namestring
product.measure.decimal_countnumber
product.namestring
product.barcodestring
product.skustring
product.box_itemnumber
product.box_typeobject
product.box_type._idstring
product.box_type.codestring
product.box_type.short_namestring
product.box_type.namestring
purchase_idstring
trade_idstring
organizationobject
organization._idstring
organization.namestring
warehouseobject
warehouse._idstring
warehouse.namestring
statestring
markstring
costnumber
amountnumber
cost_currency_idstring
initial_costnumber
initial_cost_currency_idstring
created_atstring
updated_atstring
income_idstring
revision_idstring
transfer_idstring
write_off_idstring
purchase_return_idstring
production_operation_idstring
operation_item_idstring
totalnumber
income_datestring
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.

Тело запроса

ПолеТипОбязательноОписание
markstringДаMark (serial/IMEI) of the marked product-stock to look up
organization_idstringДаOrganization id the stock belongs to
warehouse_idstringНетWarehouse id. When omitted, the organization's main warehouse is used
statesstring[]НетOptional product-stock states to filter by (e.g. stock, sold)
json
{
  "mark": "string",
  "organization_id": "string",
  "warehouse_id": "string",
  "states": [
    "string"
  ]
}

Ответ

ПолеТипОписание
_idstring
namestring
skustring
barcodestring
imagestring
measure_idstring
measureobject
box_itemnumber
is_markedboolean
is_compoundboolean
is_serviceboolean
categoryobject
pricesobject[]
taxesobject[]
costnumber
cost_currency_idstring
quantitynumberAvailable amount of the product in the resolved warehouse
parent_idstring
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.

Bito 2.0 Integration API