Getting a product list

To retrieve a list of products, make a request to the following endpoint:

https://client.experiences.get-potions.com/v1/{siteId}/recos/{recommendationsId}

Required Information

  1. Site ID
  2. API Key
  3. Recommendations ID:
    • This ID is specific to each location.
    • You can find it on the platform under Personalized Recommendations or E-merchandising.

Quickstart

Retrieving a product list requires just a few lines of code. Below are examples in several programming languages.

Endpoint Options

  1. GET Method:

    • Ideal for simple requests.
  2. POST Method:

    • Not RESTful but allows all parameters to be sent in the request body, which can be more convenient in some cases.

Examples

  • Examples are available for the following languages:

    • Python

      import json SITE_ID = 504
      API_KEY = 'Z8gib1CBfF2xQyrYVb0PewD4b7KThm8o'
      RECOMMENDATIONS_ID = '70ee825a-6bf9-4d0a-9535-06610ac13563'
      query = json.dumps({
      "viewing_item": ["8707084648757"],
      "cart_items": ["8706997748021", "8707082354997"]
      }) res = requests.get(
      f'https://uc-info.eu.abtasty.com/v1/reco/{SITE_ID}/recos/{RECOMMENDATIONS_ID}?variables={query}',
      headers={'Authorization': f'Bearer {API_KEY}'}
      )
      res.raise_for_status()
      data = res.json()
      # {"name":"PP - Les internautes ont également aimé - 18.1.24 - OK","description":null,"items":[...]} /pre
    • JavaScript

      const API_KEY = 'Z8gib1CBfF2xQyrYVb0PewD4b7KThm8o';
      const RECOMMENDATIONS_ID = '70ee825a-6bf9-4d0a-9535-06610ac13563'; const query = JSON.stringify({
      "viewing_item": ["8707084648757"],
      "cart_items": ["8706997748021", "8707082354997"]
      }); const res = await fetch(
      `https://uc-info.eu.abtasty.com/v1/reco/${SITE_ID}/recos/${RECOMMENDATIONS_ID}?variables=${query}`,
      {
      headers: {
      Authorization: `Bearer ${API_KEY}`
      }
      }
      );
      const data = await res.json();
      // {"name":"PP - Les internautes ont également aimé - 18.1.24 - OK","description":null,"products":[...]} /pre
    • Curl

      "https://uc-info.eu.abtasty.com/v1/reco/$SITE_ID/recos/$RECOMMENDATIONS_ID?variables=$QUERY" \
      -H "Authorization: Bearer $API_KEY"
      # {"name":"PP - Les internautes ont également aimé - 18.1.24 - OK","description":null,"products":[...]} /pre
  • The examples are configured for a demo shop but can be adapted with your own Site ID, API Key, and Recommendations ID.

Technical Documentation

For in-depth information, explore our API via the Swagger documentation:

  1. Click on the “Authorize” button.
  2. Enter your API Key to access and try out all endpoints.

Was this article helpful?

/