Menu
Coupons Search
Search for coupons.
POST
/organizations/{organizationId}/couponsUse it in a workflow
- Add a step and choose the Salesforce Commerce Cloud connector.
- Pick the Coupons Search action (under Coupons (Data API)).
- Fill in the fields below, then reference the result from later steps as
{{couponsSearch.response.data}}.
Request
Path parameters
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"query": {
"filteredQuery": {
"query": {
"textQuery": {
"fields": [
"couponId"
],
"searchPhrase": "disabled"
}
},
"filter": {
"termFilter": {
"field": "enabled",
"operator": "is",
"values": [
false
]
}
}
}
},
"limit": 10,
"sorts": [
{
"field": "couponId",
"sortOrder": "desc"
}
],
"offset": 0
}
Response
Returns 200 with an object. Read it in later steps with {{couponsSearch.response.data.<field>}}.
{
"hits": [
{
"couponId": "MyCoupon",
"enabled": false,
"type": "single_code",
"creationDate": "2019-10-20T12:00:00Z",
"description": "This coupon is used to give 10% off stuff.\n",
"exportedCodeCount": 0,
"lastModified": "2019-10-30T04:23:59Z",
"redemptionCount": 3,
"redemptionLimits": {
"limitPerCode": 1,
"limitPerCustomer": 1,
"limitPerTimeFrame": {
"limit": 2,
"redemptionTimeFrame": 24
}
},
"singleCode": "MyCode",
"systemCodesConfig": {
"codePrefix": "SG",
"numberOfCodes": 500000
},
"totalCodesCount": 50
}
]
}
Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.
Was this page helpful?