Unbxd Recommendations - REST APIs
REST APIs provide quick and seamless connection to Unbxd platforms and let you easily integrate the recommendation widgets in your ecommerce store. With each widget having its own API signature, configuring them on different pages of your store becomes really simple. The following sections will explain in detail about these APIs and teach you how to use them on your online store.
Before you start making the API calls, there are some prerequisite steps you must complete. Learn the steps to integrate Unbxd Recommendations in your online store.
API Parameters
The various parameters used in each recommendation widget API are explained in the table below:
Parameter | Acceptable Value | Default Value | Mandatory | Description |
---|---|---|---|---|
region | apac, us | N/A | Yes | This parameter specifies the geographical location of your server. The selected region must be the closest to your server location. |
API_KEY | N/A | N/A | Yes | Your API key. |
SITE_KEY | N/A | N/A | Yes | Your Site key. |
uid | N/A | N/A | Yes | The unique identifier of a visitor. This value can be easily obtained from a browser cookie "unbxd.userId" which gets automatically added on every visit. |
pid | N/A | N/A | Yes | The unique identifier of the product on whose Product Detail Page (PDP) the widget needs to be integrated. This value can be obtained from the uploaded Product Feed. |
category | N/A | N/A | Yes | The category of a product. This value can be obtained from the uploaded Product Feed. |
brand | N/A | N/A | Yes | The brand of a product. This value can be obtained from the uploaded Product Feed. |
ip | Valid IPv4 address | N/A | No | The IP address of a visitor. |
format | "html", "json" | html | No | The response format. |
currency | ISO 4217 currency code format. | "USD" US Dollar | No | Specifies the currency used. |
screenWidth | Positive numbers | N/A | No | Used for resizing the widget according to the screen width. This parameter is only used when the format is "html". |
Recommended For You
The Recommended For You is a personalized widget that showcases recommendations based on the visitor’s interaction history on your online store. Learn more about this widget.
The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/recommend/<uid>/?ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Note:
`v1.0` specifies that we are using the first version of the API.Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "RECOMMENDED_FOR_YOU",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "http://images.examplewebsite.com/is/image/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "http://images.examplewebsite.com/is/image/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "http://images.examplewebsite.com/is/image/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Recently Viewed
The Recently Viewed widget recommends products that were recently viewed by a visitor. Learn more about this widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/recently-viewed/<uid>/<pid>/?format=<format>¤cy=<currency>&screenWidth=<screenWidth>
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/recently-viewed/<uid>/?format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "RECENTLY_VIEWED",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error "
}
}
More Like These
The "More Like These" widget is built to recommend products similar to the one being viewed on the PDP (Product Detail Page). The widget leverages visitor's interaction history on the store to fetch relevant recommendation. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/more-like-these/<pid>/?uid=<uide>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "MORE_LIKE_THESE",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error "
}
}
Viewed also Viewed
As the name suggests, this widget recommends products viewed by other visitors. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/also-viewed/<pid>/?uid=<uid>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "ALSO_VIEWED",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Bought also Bought
Similar to the "Viewed also Viewed" widget, the Bought also Bought widget recommends products bought by other visitors. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/also-bought/<pid>/?uid=<uid>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "ALSO_BOUGHT",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Cart Recommendations
This widget recommends complementary products on the "Cart page" for those present in the visitor's cart. This widget allows you to cross-sell products even on the cart page. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/cart-recommend/<uid>/?ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "CART_RECOMMEND",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Homepage Top Sellers
This widget recommends top selling products bought from the homepage. Learn more about the widget.
The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/top-sellers/?uid=<uid>&ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "TOP_SELLERS",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Category Top Sellers
This widget recommends top selling products from a specific category. Learn more about this widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/category-top-sellers/<category>/?uid=<uid>&ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "CATEGORY_TOP_SELLERS",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
PDP Top Sellers
This widget recommends top selling products for a specific product. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/pdp-top-sellers/<pid>/?uid=<uid>&ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "PDP_TOP_SELLERS",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Brand Top Sellers
This widget recommends top selling products from a specific brand. Learn more about the widget. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/brand-top-sellers/<brand>/?uid=<uid>&ip=<ip>&format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
A sample Success response will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "BRAND_TOP_SELLERS",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 150.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 200.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "Women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 172.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "Women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}
Complete the Look
The Complete the Look widget showcases curated products on a Product Display Page (PDP) that are usually associated with the original product. Ensure that this widget is configured on the console before sending the request. The request format is shown below:
http(s)://recommendations.unbxdapi.com/v1.0/<API_KEY>/<SITE_KEY>/complete-the-look/<pid>/?format=<format>¤cy=<currency>&screenWidth=<screenWidth>
Response
The "Complete the look" widget response for "Vera Wang Ivory White Wedding Gown" will look like this:
{
"status": 200,
"queryTime": 13,
"boxType": "COMPLETE_THE_LOOK",
"count": 3,
"location": null,
"explanation": null,
"error": null,
"Recommendations": [
{
"title": "Vera Wang Bridal Fingerless Gloves",
"price": 49.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/09_980_4002_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-bridal-fingerless-gloves/pro/002/540011",
"gender": "women",
"availability": "YES",
"uniqueId": "9804002",
},
{
"title": "Flower White Gracious Tiara",
"price": 34.9,
"catlevel2Name": "Birthdays and Parties",
"imageUrl": [
"http://images.examplewebsite.com/is/image/06_107_0035_098?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/flower-white-gracious-tiara/pro/035/940011",
"gender": "women",
"availability": "YES",
"uniqueId": "1070035",
},
{
"title": "Vera Wang Ivory Lace Edge Cathedral Length Bridal Veil",
"price": 24.9,
"catlevel2Name": "Bridal Accessories",
"imageUrl": [
"http://images.examplewebsite.com/is/image/34_373_1272_058?cache=on&wid=361&fmt=jpeg&qlt=75,1&resmode=sharp2&op_usm=1,1,5,0"
],
"catlevel1Name": "Women",
"productUrl": "/clothing/women/vera-wang-ivory-lace-edge-cathedral-length-bridal-veil/pro/766/1720002",
"gender": "women",
"catlevel2Name": "Bridal Accessories",
"availability": "YES",
"uniqueId": "3731272",
}
]
}
A sample Failure response will look like this:
{
"count": 0,
"error": {
"code": 3001,
"message": "message describing the error"
}
}