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

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

Last updated

Was this helpful?