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.

 

Previous Steps

  • Obtain an Impresee application UUID this 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.

Request

In order to search products you must use the following REST service:

https://api.impresee.com/ImpreseeSearch/api/v3/search/text/<your_impresee_application_UUID>

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 complete or incomplete words (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: size of each page.
  • 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 reorder-by code. By default products are sorted by relevance in descending order. The ordering code to be used must be written.

Response

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.

Impresee provides a JavaScript library that can be easily configured to integrate the search engine with any website in no time. More details about the library for integration and how to integrate visual search can be found here.