GetQuantity

[POST] .../v1/item/getquantity

Returns item quantities by stock. Use this method to retrieve stock quantities for a single item across stocks when an integration needs inventory availability. It requires item_id, checks the item quantity permission for the current request user and returns an array of ItemGetQuantityOutcome records in result. The the request supports filters, but quantity calculation is driven by item_id and does not apply filter criteria. Business errors such as a missing request body, invalid item_id, denied access or persistent quantity calculation errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
filters Array of Filter Required Filters by fields available for this API method. Required filter fields: item_id.

Filterable Fields

Field Type Required Description
date int Optional Date for which the quantity should be returned, as Unix time.
item_id int Required Item ID.
stock_id int Optional Stock IDs.

Request Example

{
  "filters": [
    {
      "Field": "date",
      "Operator": "Equal",
      "Value": "string"
    }
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Array of ItemGetQuantityOutcome Result array.

Response Example

{
  "ok": true,
  "result": [
    {
      "allowed": 1.0,
      "booked": 1.0,
      "common": 1.0,
      "stock": {
        "address": "string",
        "area": 1.0,
        "deleted_mark": true,
        "description": "string",
        "firm": {
          "address": "string",
          "bank_name": "string",
          "boss_name": "string",
          "deleted_mark": true,
          "description": "string",
          "fullname": "string",
          "group": {
            "child_count": 1,
            "id": 1,
            "last_update": 1,
            "name": "string",
            "parent_id": 1
          },
          "id": 1,
          "inn": "string",
          "last_update": 1,
          "mfo": "string",
          "name": "string",
          "oked": "string",
          "phones": "string",
          "rs": "string",
          "vat_index": "string"
        },
        "id": 1,
        "last_update": 1,
        "name": "string"
      }
    }
  ]
}