How to integrate Impresee Search by Text API v3
This document describes how you can integrate Impresee search by text services into your online store.
- Obtain an Impresee application
UUIDthis is a string with 36 characters. This code can be generated in the Impresee Console or you can ask us to generate one for you.
In order to search products you must use the following REST service:
A JSON message must be sent to that service in POST mode. The JSON message has the following format:
The following list describes each JSON field:
- query_text: it corresponds to the text that the user writes. It can be word characters (as the user is typing).
- query_id: it is the identifier of the previous search. In the first search the id is empty.
- page_size: is the identifier of the previous search. In the first search that id is empty.
- num_page: the page you want to show, starting at 0.
- search_type: One of the following constants describing the user action:
- INSTANT: for search as you type, no filters are calculated
- FULL: full search, filters are calculated and shown to the user
- FILTER: filtering a search
- REORDER: a sort-by option is used
- PAGE: a page number is selected by user
- search_filter: An array with the product filters to use during the search. Each element of the array requires the filter code and the values to use. For filters by selection, one or more values must be marked. For range filters two numerical values are expected.
- search_reorder: The search-by code. By default products are sorted by relevance in descending order. The ordering code to be used must be written.
The search service returns a JSON message with the list of products that meet the condition and the attributes to be displayed to the user.
This is a JSON response message:
Each product contains the following data:
Using your Impresee Console account you can configure the catalog attributes that will be exported to the JSON. In this way it is possible to display extra information about each product.