post https://api.exponea.com/webxp/bandits/best-variant
Response description
JSON format
Parameter | Type | Description | Required |
---|---|---|---|
project_id | string | Reward token received with the best variant call | Required |
bandit_id | string | Bandit ID | Required |
customer_ids | list of objects | One or more hard and/or soft customer IDs. The most common ones include: cookie, registered | At least 1 required |
variants | list of objects | List of variants to chose from | At least 2 required |
customer_context | list of objects | List of custom features (numerical/categorical) | Not required |
timeout | string | Request timeout | Not required |
Additional payload and response examples
{
"project_id": "229adede-d102-11ec-9d5f-82eeb310c437",
"bandit_id": "6299c9043819d9a5974794bd",
"customer_ids": {
"cookie": "776727a9-6ab7-4864-bd63-4e2a74c824fb"
},
"variants": [
{
"id": "run_away"
},
{
"id": "chill"
}
],
"customer_context": {
"features": {
"current_mood": {
"value": "not_great_not_terrible",
"options": {
"number_type": "categorical"
}
},
"last_measurement_röntgen": {
"value": 3.6,
"options": {
"number_type": "numerical"
}
}
}
},
"timeout": "3s"
}