Overview
Each filter, active filter and paginator item contains a URL with predefined parameters. Include these parameters in the API call to activate filters, deactivate active filters or change pages. This single API call gives you all the information you need, with no further adjustments.
Fields inside products
Inside the products field, the Search API returns the following:
| Field name | Description |
|---|---|
results | Array of products with all information about them (configurable options, child products, attributes…). |
amounts | The current page number, last page number, number of products per page, next page number, previous page number and total number of products. |
active_filters | Array of active filters. Every active filter contains the name, label, type, id, url, url_path and url_params to remove that active filter. |
filters | Array of enabled filters. Some filters contain a title that can be changed from the dashboard for every filter. Each filter contains arrays of options. Every option has option_value, option_label, option_key, count, url, url_path and url_params. Special filters, such as color and size, carry more information in every option. |
sorters | Athena XAI has some special sorters (newest, price asc, price desc, popularity, relevance). Every sorter has an option_key, option_value, option_label, url, url_params and information on whether it is selected. |
orders | Orders can be set from the Athena Dashboard. One order represents how many products can show on the landing search page. Every order has an option_key, option_value, option_label, url, url_path, url_params and information on whether it is selected. |
pager | Array of pages. Every element has the fields option_key, option_value, option_label, url, url_path, url_params, type and information on whether it is selected. The value of option_label can be “First”, “Last”, “Next” or “Previous”, or a page number. If the element doesn’t contain a URL, the page number is the current page. |
collection_price | The lowest and highest prices for this search. |
visual_filter | Information about the visual filters. |
Other response fields
The Search API also returns the following:
| Field name | Description |
|---|---|
modes | There are two modes, grid mode and list mode. The current mode is the one that has selected set to true. |
query | The search query typed by the user. |
suggested_text | If the initial search query doesn’t yield results, Athena XAI uses search suggestions to find a similar search query and sets this field to that suggestion. |
used_suggestions | True if the initial search query didn’t yield results and Athena XAI used search suggestions to find a similar query. False in other cases. |
banners | An array of banners to show on the landing page. |
current_url | The current URL for this search, with the query parameter. |
current_path | URL parameter with the active filter, sorter and order. |