Toptimize
[Beta] Retrieve objects
⚠️ Beta Access Required
Contact your sales representative to gain access to this endpoint and start using it.
Use the /retrieval endpoint to get recommendations of which products are relevant given a certain context. Context is provided by user information, plus seed products. This can be used to retrieve object to display on a PDP (single seed product) or in a cart (multiple seed products).
In order to provide retrieval, Topsort requires that events are also sent, as a source of information.
post/toptimize/v1/retrieval
Request
- Base URL: https://api.topsort.com
- URL: https://api.topsort.com/toptimize/v1/retrieval
- Auth: HTTP bearer
Request body
Example request
{
"slots": 5,
"opaqueUserId": "u_9ske45",
"seedProductIds": [
"p_PJbnN",
"p_ojng4"
],
"mode": "all",
"objectType": "listings",
"deviceType": "mobile"
}Response
The retrieval results. Each retrieved products is accompanied by their relevancy score.
Example response
{
"objectType": "listings",
"objects": [
{
"id": "p_xh90s",
"score": 0.978
},
{
"id": "p_12lp0",
"score": 0.953
},
{
"id": "p_ds7ui",
"score": 0.877
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.