Catalog
Get Categories
Each product belong to a predefined Category. You can access all available Categories for products using the Get Categories API, which returns a list of categories products from merchants you have access to belong to.
GET /catalog/categories
Get a list of categories of the products you have access to. API Reference: Get Categories
Request
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 \
--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": "6382",
"name": "Fabric Repair Kits",
"slug": "fabric_repair_kits",
"parent_id": "505370",
"depth": 5
}
],
"pageable": {
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"page_number": 0,
"page_size": 20,
"offset": 0,
"paged": true,
"unpaged": false
},
"total_elements": 5497,
"last": false,
"total_pages": 275,
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"number_of_elements": 20,
"first": true,
"size": 20,
"number": 0,
"empty": false
}