Search stock quantities aggregated per article
Returns stock aggregated by article with warehouses[] array. Supports Base64 text/barcode search and optional article data (price, description, barcodes[]). Differs from /quantities (per article+warehouse).
In: header
Query Parameters
"ASC" | "DESC"Items per page. Default 50, maximum 250; a larger value is truncated to 250.
501 <= value <= 250Base64 encoded text search in article code/description.
Base64 encoded barcode lookup (resolves prefix when applicable).
Include price, description, use_lots and barcodes[] per article.
Include articles with zero or negative stock.
Page number. Default 1; a value below 1 counts as 1.
11 <= valueFilter by article code. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[article_id][eq]=value
Filter to a specific warehouse. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[warehouse_id][eq]=value
Response Body
curl -X GET "https://og-tenant1.test:8003/api/v2/stocks/quantities/search?order=string&sorder=ASC&sort=string&limit=50&article_id=string&warehouse_id=0&txt=string&barcode=string&with_article_data=true&include_zero_stock=true&page=1&filter%5Barticle_id%5D%5Boperator%5D=string&filter%5Bwarehouse_id%5D%5Boperator%5D=0"{
"data": [
{
"article_id": "ART001",
"description": "Produto A",
"price": 9.99,
"use_lots": false,
"barcodes": [
"5601234567890"
],
"total_quantity": 25,
"warehouses": [
{
"warehouse_id": 1,
"quantity": 20,
"quantity_order_customer": 2,
"quantity_order_supplier": 5
}
]
}
],
"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"
}
}