curl --request POST \
--url https://api.example.com/api/projects/{projectId}/evaluate/{*} \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"context": {
"cart": {
"total": 1500
},
"customer": {
"country": "US",
"tier": "gold"
}
},
"trace": false
}
'{
"result": "<unknown>",
"performance": "<string>",
"trace": {}
}By default, decision should be published before it is evaluated.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/evaluate/{*} \
--header 'Content-Type: application/json' \
--header 'X-Access-Token: <api-key>' \
--data '
{
"context": {
"cart": {
"total": 1500
},
"customer": {
"country": "US",
"tier": "gold"
}
},
"trace": false
}
'{
"result": "<unknown>",
"performance": "<string>",
"trace": {}
}Project access token is obtained within project settings
Optional version ID to evaluate a specific decision version instead of the published one
Was this page helpful?