OfficeGest
Stocks/Quantities

List stock quantities

Returns a paginated list of current stock quantities per article and warehouse. By default only returns entries with positive stock. Supports filtering by article code and warehouse. Returns 200 with empty data when no entries match the applied filters.

GET
/stocks/quantities
AuthorizationBearer <token>

In: header

Query Parameters

include_zero_stock?boolean

Include articles with zero or negative stock. Defaults to false (only positive stock is returned).

article_id?stringDeprecated
warehouse_id?integerDeprecated
filter[article_id][operator]?string

Filter by article code. Exclude an article code. Filter by a comma-separated list of article codes. Operators: eq, neq, in. Example: filter[article_id][eq]=value

filter[warehouse_id][operator]?integer

Filter by warehouse identifier. Operators: eq. Example: filter[warehouse_id][eq]=value

page?integer

Page number. Default 1; a value below 1 counts as 1.

Default1
Range1 <= value
limit?integer

Items per page. Default 50, maximum 250; a larger value is truncated to 250.

Default50
Range1 <= value <= 250

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/stocks/quantities?include_zero_stock=true&article_id=string&warehouse_id=0&filter%5Barticle_id%5D%5Boperator%5D=string&filter%5Bwarehouse_id%5D%5Boperator%5D=0&page=1&limit=50"
{
  "data": [
    {
      "article_id": "ART001",
      "article": "Produto A",
      "warehouse_id": 1,
      "warehouse": "Armazém Principal",
      "quantity": 50,
      "quantity_order_customer": 5,
      "quantity_order_supplier": 10
    }
  ],
  "meta": {
    "per_page": 50,
    "current_page": 1,
    "has_more": true
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}