Compare products
POST/comparison/compare
Send the identifiers of the products you wish to compare to this endpoint to retrieve your configured comparison groups and associated attributes from Data Platform.
Request
Responses
- 200
- 400
OK
{
"products": [
{
"id": 258985256,
"title": "Headphones R",
"identifier": "1122336",
"groupIdentifier": "1122336",
"image": "www.myshop.com/product/1122336/img.jpg",
"url": "www.myshop.com/product/1122336",
"images": [
{
"url": "www.myshop.com/product/1122336/img.jpg",
"type": "SMALL"
}
],
"newPrice": "99.99",
"newPriceUnit": "$",
"comparison": {
"Product Details": {
"color": [
"blue"
],
"Manufacturer": [
"BrandZ"
],
"price": [
"99.99 $"
]
}
}
},
{
"id": 258985244,
"title": "Headphones O",
"identifier": "4455668",
"groupIdentifier": "4455668",
"image": "www.myshop.com/product/4455668/img.jpg",
"url": "www.myshop.com/product/4455668",
"images": [
{
"url": "www.myshop.com/product/4455668/img.jpg",
"type": "SMALL"
}
],
"newPrice": "149.99",
"newPriceUnit": "$",
"comparison": {
"Product Details": {
"color": [
"black"
],
"Manufacturer": [
"BrandX"
],
"price": [
"149.99 $"
]
}
}
}
],
"icons": {},
"booleans": {},
"explainerAttributes": [],
"viewId": "60548"
}
Bad Request
{ "status": "failure", "code": 400, "message": "Products must be given" }