Search articles
Unified search for articles covering the legacy search_articles and search/articles endpoints. Supports Base64 encoded text/barcode search, SETORES location enrichment, barcode prefix resolution, article image URL and aggregated barcodes.
In: header
Query Parameters
"ASC" | "DESC"Items per page. Default 50, maximum 250; a larger value is truncated to 250.
501 <= value <= 250Base64 encoded barcode lookup (also searches artigos_barcodes).
Base64 encoded text to search in code/description/barcode.
Restrict sector lookup to this warehouse. Requires with_location=true.
Restrict sector lookup to this sector id. Requires with_location=true.
Include sector_id, sector_description, sector_barcode when SETORES module is active.
Include barcode_prefix and resolved prefix_search/prefix_value/prefix_type when barcode filter is used.
Include image_url when the article has a stored photo.
Include the barcodes[] aggregated list (includes artigos_barcodes entries).
Page number. Default 1; a value below 1 counts as 1.
11 <= valueOperators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[id][eq]=value
Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[description][eq]=value
Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[barcode][eq]=value
Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[article_type][eq]=value
Filter by active flag. Operators: eq, neq. Example: filter[active][eq]=value
Operators: eq, neq. Example: filter[use_lots][eq]=value
Filter by family code. Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[family_id][eq]=value
Operators: eq, neq, gt, gte, lt, lte, like, ct, nlike, sw, ew, in, nin. Example: filter[sub_family_id][eq]=value
Response Body
curl -X GET "https://og-tenant1.test:8003/api/v2/stocks/articles/search?order=string&sorder=ASC&sort=string&limit=50&id=string&description=string&barcode=string&article_type=string&active=true&use_lots=true&family_id=string&sub_family_id=string&txt=string&warehouse_id=0§or_id=0&with_location=true&with_prefix=true&with_image=true&with_extra_barcodes=true&page=1&filter%5Bid%5D%5Boperator%5D=string&filter%5Bdescription%5D%5Boperator%5D=string&filter%5Bbarcode%5D%5Boperator%5D=string&filter%5Barticle_type%5D%5Boperator%5D=string&filter%5Bactive%5D%5Boperator%5D=true&filter%5Buse_lots%5D%5Boperator%5D=true&filter%5Bfamily_id%5D%5Boperator%5D=string&filter%5Bsub_family_id%5D%5Boperator%5D=string"{
"data": [
{
"id": "ART001",
"barcode": "5601234567890",
"description": "Produto A",
"article_type": "N",
"active": true,
"use_lots": false,
"barcodes": [
"5601234567890"
],
"image_url": "https://host/loadupload/artigos/_ART001.jpg",
"sector_id": 12,
"sector_description": "Corredor 3",
"sector_barcode": "C3",
"barcode_prefix": "20",
"prefix_search": "20",
"prefix_value": "00123",
"prefix_type": "P"
}
],
"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"
}
}