Catalog
Search Categories
Given certain criteria, you may only want to show Categories of products that match these critera. With the Search Categories API you can filter for categories based on a filter query.
GET /catalog/categories/search/{query}
Get a list of categories of that match a given query. API Reference: Search Categories
Request
Required Path Parameters:
queryrequired
query property to search categories by their names.
Optional Query Parameters:
page
page number for categories you are requesting, if another page exists.
size
maximum number of items to return in this call.
Curl
curl -X GET https://sandbox-api.violet.io/v1/catalog/categories/search/{query} \
--header "X-Violet-App-Id: your-app-id-here" \
--header "X-Violet-App-Secret: your-app-secret-here" \
--header "X-Violet-Token: your-token-here" \
Response
JSON
{
"content": [
{
"id": "200",
"name": "Rings",
"slug": "rings",
"parent_id": "188",
"depth": 3,
"score": 23.68954
}
],
"pageable": {
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"page_number": 0,
"page_size": 20,
"offset": 0,
"paged": true,
"unpaged": false
},
"total_elements": 13,
"last": true,
"total_pages": 1,
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"number_of_elements": 13,
"first": true,
"size": 20,
"number": 0,
"empty": false
}