Get Recommendations
Retrieve product recommendations from a recommendation scenario.
📘 Prerequisites
Before you can retrieve product recommendations, complete the Recommendation API prerequisites.
Request
- Base URLhttps://recommendation.jp.aiqua.io/api/v1.0
- URLhttps://recommendation.jp.aiqua.io/api/v1.0/app/{app_id}/scenarios/{scenario_id}/recommendation
- Authnone required
Path parameters
Your AIQUA app ID.
The recommendation scenario's ID.
Query parameters
Required. The user_id of the user being served recommendations.
The number of recommended products to return. Valid values are 1 to 50. Default: 20.
Optional. A <a href="https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding" target="_blank">percent-encoded</a> JSON object specifying filtering rules to apply to the recommendation results. Only products that satisfy the filtering rules are returned.
To learn more about creating recommendation filters, see Defining API filtering rules.
Before percent-encoding, the filter object has the following structure:
{
"version": 2,
"filterRule": {
"operator": "OR",
"ruleList": [
{
"operator": "OR",
"conditionList": [
{
"key": "category",
"operator": "in",
"value": ["3C", "Life"]
}
]
}
]
}
}
Only required when using Category Hot Items models.
The category name is case sensitive. The value must be a left-to-right prefix of the product's category. For example, if a product's category is "Woman's > Pants > Blue Jeans":
- "Blue Jeans": doesn't match
- "Pants > Blue Jeans": doesn't match
- "Woman's > Pants": matches
- "Woman's > Pants > Blue Jeans": matches
If the category name includes special characters, it must be <a href="https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding" target="_blank">percent-encoded</a>.
The product ID as specified in your product data feed. Required for some recommendation models. See Recommendation model reference for a list of all recommendation models and their required parameters.
Response
Success
Example response
{
"items": [
{
"productId": "TEST_SKU_16",
"position": 2,
"image": "<IMAGE_URL>",
"title": "Mobile_16",
"description": "hTC",
"customLabel00": "Foo's bar",
"customLabel01": "false",
"customLabel02": "-10",
"customLabel03": "200.65",
"url": "<PRODUCT_URL>",
"category": "3C > Mobile",
"currency": "TWD",
"price": "5999",
"originalPrice": "5999",
"order": "PRIMARY"
}
],
"recId": "8c4d2657-5a0e-4b77-aa25-e22fa5ba5633",
"scenarioId": "Aj2MMx5KHzPau2pv4aQ26i",
"modelId": "5",
"expType": "normal",
"respCode": "1000"
}Changes
No recorded changes to this operation across all 1 revision of this API.