Visual Recommendation
3 min
The Visual Recommendation endpoint enhances product discovery by providing visually similar product suggestions. This service is particularly beneficial for fashion, home decor, and design-centric platforms where appearance and style play a significant role in consumer choices.
Accessing Visual Recommendations
To retrieve visually similar product recommendations, businesses can use the Visual Recommendation API. This API enables users to fetch alternatives based purely on image similarity.
How to Retrieve Recommendations
- Make a GET Request: Send a request to the API endpoint with the product ID.
- Provide Required Headers:
- x-upstart-tenant: Identifies the retailer making the request.
- x-upstart-site: Specifies the site where recommendations are needed.
- Receive a Response: The system returns a list of visually similar products.
API Endpoint
- Catalog Endpoint → recommendation
- Endpoint: /catalog/live/recommendation/item/{product_id}?recommendationType=visually_similar
Headers
{
"x-upstart-tenant": "yourtenant",
"x-upstart-site": "your-site-id"
"Authorization": "Bearer your-auth-token"
}Sample Request
curl --location 'https://api.yourdomain.com/catalog/live/recommendation/item/{product_id}?recommendationType=visually_similar' \
--header 'accept: application/json' \
--header 'x-upstart-tenant: yourtenant' \
--header 'x-upstart-site: your-site-id'
[
{
"id": "123456",
"name": "Example Reclining Loveseat",
"brand": "FurnitureCo",
"manufacturer": "BestMakers",
"color": "Gray",
"dimensions": { "length": 75, "width": 40, "height": 42, "unit": "in" },
"features": ["Reclining", "USB Port"]
},
{
"id": "789101",
"name": "Premium Loveseat",
"brand": "HomeComfort",
"manufacturer": "TopFurniture",
"color": "Beige",
"dimensions": { "length": 80, "width": 38, "height": 40, "unit": "in" },
"features": ["Power Recline", "Cup Holder"]
}
]