Search Tabs API
The Autocomplete API includes search tabs for quick filtering based on product and post categories. Manage and view these tabs in the Athena Dashboard, under Autocomplete -> Search Tabs.
Use the Search Tabs API to access all active tabs.
| Method | Path |
|---|---|
POST | /api/v1/search-tabs |
POST | /api/v2/search-tabs |
Request body
{
"token": "{{ website_token }}" //required
}
Successful response
{
"data": [
{
"title": "All",
"value": 0,
"checked": true
},
{
"title": "Men",
"value": 11,
"checked": false
}
]
}
Autocomplete API with Search Tabs
To search using a specific search tab, include the autocomplete_tab parameter in the body of an Autocomplete API call. Get the tab value from the Search Tabs API response.
Each response includes a product count for each tab. If you don’t specify autocomplete_tab, the default tab is “preselected”.
| Method | Path |
|---|---|
POST | /api/v1/autocomplete |
POST | /api/v2/autocomplete |
Request body
{
"q": "Yoga", //required
"token": "{{ website_token }}", //required
"autocomplete_tab": 3
}
Successful response
{
"data": {
"results": {...
},
"true_autocomplete_keyword": "mach",
"tabs": {
"count": {
"11": 1,
"20": 1,
"3": 23,
"9": 1,
"37": 1
},
"preselected": 3
},
"banners": {...
}
}
}