To get a product list, you need to call the endpoint
https://uc-info.eu.abtasty.com/v1/reco/{siteId}/recos/{recommendationsId}
with these informations :
The recommendations ID will change for every location, you can find it in the platform either in Personalized Recommendations or in E-merchandizing.
Quickstart
All it takes is a few lines of code to call the API to retrieve your first list of products. Below you'll find examples in several programming languages.
This endpoint is available both as GET and as POST, the latter is not RESTful but allows to send all parameters in the body of the request, which can be more convenient.
You can try out the examples as they are using our demo shop or adapt them using your own site ID, API key and recommendations ID.
GET
import requests
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"]
})
fields = json.dumps(["name","id","price"])
res = requests.get(
f'https://uc-info.eu.abtasty.com/v1/reco/{SITE_ID}/recos/{RECOMMENDATIONS_ID}?variables={query}&fields={fields}',
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":[...]}
const SITE_ID = 504;
const API_KEY = 'Z8gib1CBfF2xQyrYVb0PewD4b7KThm8o';
const RECOMMENDATIONS_ID = '70ee825a-6bf9-4d0a-9535-06610ac13563';
const query = JSON.stringify({
"viewing_item": ["8707084648757"],
"cart_items": ["8706997748021", "8707082354997"]
});
const fields = JSON.stringify(["name","id","price"])
const res = await fetch(
`https://uc-info.eu.abtasty.com/v1/reco/${SITE_ID}/recos/${RECOMMENDATIONS_ID}?variables=${query}&fields=${fields}`,
{
headers: {
Authorization: `Bearer ${API_KEY}`
}
}
);
const data = await res.json();
curl -X 'GET' \
"https://uc-info.eu.abtasty.com/v1/reco/$SITE_ID/recos/$RECOMMENDATIONS_ID?variables=$QUERY&fields=$FIELDS" \
-H "Authorization: Bearer $API_KEY"
# {"name":"PP - Les internautes ont également aimé - 18.1.24 - OK","description":null,"products":[...]}