Menu
Badges
Get badges for a set of placement IDs
POST
/rest/organizations/{organizationId}/commerce/v2/tracking-ids/{trackingId}/badgesUse it in a workflow
- Add a step and choose the Coveo connector.
- Pick the Badges action (under Commerce).
- Fill in the fields below, then reference the result from later steps as
{{badges.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"context": {
"view": {
"url": "https://acme.com/summersale",
"referrer": "https://example.com/"
},
"capture": true,
"cart": [
{
"productId": "shoe-a1-red",
"quantity": 2
}
],
"custom": {
"fitmentProducts": [
"sku_123",
"sku_456"
]
},
"labels": {
"brand": "ACME",
"category": "garden > garden-tools > chainsaws"
},
"product": {
"productId": "shoe-a1-red"
},
"source": [
"@coveo/headless@2.61.0",
"custom.library.js@2.0.0"
],
"user": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
}
},
"country": "US",
"currency": "USD",
"language": "en",
"placementIds": [
"36164bca-b489-4c42-8574-e1325d56d0be",
"47275dcb-c590-5d53-9685-f2436e67e1cf"
]
}
Response
Returns 200 with an object. Read it in later steps with {{badges.response.data.<field>}}.
{
"products": [
{
"badgePlacements": [
{
"badges": [
{
"backgroundColor": null,
"iconUrl": null,
"text": null,
"textColor": null
}
],
"placementId": "36164bca-b489-4c42-8574-e1325d56d0be"
}
],
"productId": "0000003035-45"
}
]
}
Need more? See the Coveo guide for connection setup and behaviour shared by every action.
Was this page helpful?