You can retrieve a list of products and product categories by providing the location ID. Use the search_term parameter to filter:
- Product categories by name or article
- Products by name, article, or barcode
Limit the number of results using the max_count parameter.
If search_term is not provided, the response will return a list of root categories for the specified location. In this case, the max_count parameter is ignored. If search_term is provided, the system will first search among categories. If fewer than max_count results are found, the search will continue among products to fill the remaining count.
The result is returned as an array of products tree elements.
| Field | Type | Description | | -------------| ------- | -------------------------------------------------- ----------------------------------------- | | parent_id | number | Parent element ID (0 for root elements) | | item_id | number | Item ID (0 if item is a category) | | category_id | number | Product category ID (0 if the item is a product) | | title | string | Product name or product category | | is_chain | boolean | Is the element chain-bound? true - the element is connected to the chain, false - not connected | | is_category | boolean | Is the element a category? true - category, false - product | | is_item | boolean | Is the item a product? true - product, false - category |
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/products/search
- Productionhttps://api.alteg.io/api/v1/locations/{location_id}/products/search
curl -i -X GET \
'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/products/search?term=string&count=0' \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: string'OK
Array with data objects
[ { "parent_id": 0, "item_id": 0, "category_id": 123, "title": "Root Category 1", "is_chain": true, "is_category": true, "is_item": false }, { "parent_id": 0, "item_id": 0, "category_id": 456, "title": "Root Category 2", "is_chain": true, "is_category": true, "is_item": false } ]
{ "success": true, "data": [ { … }, { … } ], "meta": { "count": 2 } }