integration_documentation:request

integration_documentation:request

In this article the request to Findologic with all important parameters and information regarding the request is documented.
If any questions occur, please contact our technical support support@findologic.com.

Our library helps requesting the Findologic API and also getting the data from the response and mapping it to corresponding objects. Read more at https://github.com/findologic/findologic-api

Short overview

  • The Findologic search service is only available after the first succeeded import.
  • Queries are sent to Findologic by means of HTTP requests.
  • Before each actual query, a so-called Alivetest must be performed.
    • The Alivetest returns either alive or dead. If dead is the case, a fallback mechanism must take effect, and the conventional shop search must process the query.

Fallback mechanism

  • Before each query, an Alivetest HTTP request is sent to Findologic according to the following pattern:
    • http://service.findologic.com/ps/<SHOP_URL>/alivetest.php?shopkey=<SHOPKEY>.
  • In the case of a response from alive, the actual query is sent to the Findologic service.
  • With all other responses other than alive, the query is processed by the conventional shop search.
    If the fallback mechanism is not working properly, the Findologic search may not be used in a productive shop.
  • Also, a timeout of 1 second must be set for the Alivetest. If the response time exceeds 1 second, the query is processed by the conventional shop search.
  • A timeout of 3 seconds must be set for the actual query. If the response time exceeds 3 seconds, the query is processed by the conventional shop search.

Basic structure of the request

The request is composed of the following components:


Generating the request URL

All parameters keys and their values must be submitted UTF-8 and URL encoded.

attrib[Färbung][]=grün => attrib[F%C3%A4rbung][]=gr%C3%BCn
Use existing functions in order to avoid errors!

To build the request URL, use existing functions if possible. The request is automatically correctly coded with these. In PHP for example, the function is http_build_query:

$parameters = array(
  'shopkey' => 'ABCDABCDABCDABCDABCDABCDABCDABCD',
  'attrib' => array(
    'cat' => array(
      'Cars'
    ),
  ...
  ),
);
$requestUrl = 'http://service.findologic.com/ps/my-shop.com/index.php?' . http_build_query($parameters);

Examples

The following are examples of queries:

Search Request
“green car” <Service-URL>?query=green%20car
“green car”, “new items first” <Service-URL>?query=green%20car&order=dateadded+DESC
“green car”, page 2 (with 24 items per page) <Service-URL>?query=green%20car&first=24
“green car”, limited by the “Cars” category <Service-URL>?query=green%20car&attrib[cat][]=Cars
“green car”, all items of the “Cars” category in green colour <Service-URL>?query=green%20car&attrib[cat][]=Cars&attrib[Colour][]=green
“t-shirt”, limited to those that are available in the colour red and blue <Service-URL>?query=t-shirt&attrib[Colour][]=red&attrib[Colour][]=blue