All Offers
GET/client/users/:correlation_id/offers
Retrieve the list of all targeted offers available to the user based on criteria set in the Exchange Solutions Console, which may include: age, gender, extended member (internal/external) attributes, partner associations, badge eligibility, and member tier.
Targeted offers may be targeted to individuals or households (specifically the Primary household member). Completed offers are put at the bottom of the response.
Note: If the maxResults query parameters is not passed or is not a valid value, then the maximum number of offers returned will be the default set in configuration. If maxResults is set, up to 100 offers can be returned.
Query Parameters
You can add query parameters to provide query information at the end of the request URL and refine your search.
| Parameter | Description | Format | Note |
|---|---|---|---|
| maxResults | Maximum number of results (number) | Number | If the number > 100, then the API returns the first 100 (the maximum number of offers that can be returned. Ex.: /offers?maxResults=105 will return 100 offers; maxResults=5 will return 5 offers. If maxResults is not passed, then the default number of offers set in configuration are returned. |
| from | Timestamp in Epoch format | Number | Ex.: /offers?from=1553544407000 |
| until | Number of days after the "from" time stamp | Number | Ex.: /offers?from=1553544407000&until=10 |
| locale | Locale of the offer(s) returned in the response | String, values currently supported are: "en-CA", "en-US" and "fr-CA"; "EN" and "FR" can be used as well, but only for the member record (on the account level) | Optional. Priority order: (1) this query parameter; (2) locale set on the account; (3) environment locale. If locale is not provided or is not a valid value, system default ("en-CA") is used. |
| businessUnit | Business unit for offer(s) returned in response | String | Optional. Can provide name of one businessUnit (only data for that BU is returned) or more than one by having a "businessUnit" name value for each. If this parameter is not used, then offers for all BUs are returned. |
Note: Mass offers are not returned using this call. See the Get Mass Offers calls in this documentation.
Request
Body
This request does not have a body.
Response
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| id | The offer ID | String | |
| type | The type of offer | Enum: "FLAT", "MULTIPLIER", or "PERCENTAGE" | FLAT = rewards exact number of points when reward fires; MULTIPLIER = reward a multiple of base points; PERCENTAGE = reward a number of points based on the eligible spend equivalent to the percentage spent |
| rank | Sets the ranking priority of the offer | Number: 0-9 | Smaller numbers are higher ranks |
| acceptanceState | Whether or not the offer has been accepted | Enum: "ACCEPTED", "NONE", or "COMPLETED" | |
| acceptanceMethod | The method by which the offer was accepted | String: "LTC" | With LTC (Load to Card), the offer must be accepted by targeted member before performing the requested behaviour. |
| shortDescription1 | Additional field for offer copy | String | Any string value that is valid per corresponding regex restriction |
| shortDescription2 | Additional field for offer copy | String | Any string value that is valid per corresponding regex restriction |
| longDescription | Offer description used for display | String | Any string value that is valid per corresponding regex restriction |
| promotionHeadline | Primary offer title copy used for display | String | Any string value that is valid per corresponding regex restriction |
| tcMessage | The Terms and Conditions message | String | |
| expirationDate | The date on which the offer expires | String | |
| effectiveDate | The date on which the offer becomes effective | String | |
| smallImageURI | URI of small image | String | Any string value that is valid per corresponding regex restriction |
| largeImageURI | URI of large image | String | Any string value that is valid per corresponding regex restriction |
| smallHDImageURI | URI of small high-definition image | String | Any string value that is valid per corresponding regex restriction |
| largeHDImageURI | URI of large high-definition image | String | Any string value that is valid per corresponding regex restriction |
| rewardAmount | The amount of the reward | Number | |
| rewardDescription | Description of the reward to be had | String | For instance: "Spend 20, get 500 points." |
| progress | Tracks progress toward fulfillment of a frequency offer | Object | Req. for frequency offers. Tracks completions, transactions (if multiple required), and spend toward the requirements of the frequency offer |
| completions | Number of times the offer has been completed | Number | Required |
| transactions | Transactions required to fulfill the offer | Object | Optional, used if >1 txns are required |
| completed | How many qualified transactions have been completed | Number | |
| required | How many qualified transactions are required | Number | |
| spend or quantity | Amount of spending or quantity of products bought required to fullfil the offer | Object | spend = spend a specific value or more, quantity = buy a specific number or more of this item |
| total | The total spent towards this offer | Number | |
| unused | The spend that has not yet been used toward fulfillment of the offer | Number | |
| next | The additional spend required (plus unused) to meet the offer threshold | Number | |
| required | The total amount that must be spent to fulfill the offer | Number | |
| promptMessageID | Contains ID of messages for the POS operator or member associated with the offer displayed | Array | |
| productTargeting | List of CSV format file(s) or logic used for product targeting | Object (empty if product targeting is not used) | Contains fileName of one or more list-based product targeting file(s) or logic used for product targeting |
| fileName | Name of CSV file(s), including .csv extension, used for product targeting | String | Used if list-based product targeting is used |
| group | Defines group of logical query elements | Object | Used if logic-based product targeting is used; contains groupOperator |
| groupOperator | Defines the operator that relates the elements in the conditions group | String: "AND" or "OR" | Used if logic-based product targeting is used; contains conditions |
| conditions | Contains each element of the logical query | Array with objects in it | Each object is one product descriptor within the conditions. Contains field, conditionOperator, and value. |
| field | The type of field selected | String | |
| conditionOperator | The operator relating the value(s) to the field | String: "IN" or "NOT IN" | |
| value | The applicable values defined by the field | Array | Each value is a string within the value array |
| businessUnit | The business unit relevant to the offer. | String. | One or more business unit name values can be passed in using the query parameters, which will result in only offers for that (or those) business units being in the response. If this query parameter is not used, then offers for all business units are returned. |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | from value must be within last 1 year from today's date | INVALID_REQUEST | from value must be within the last 1 year from today's date |
| 400 Bad Request | Invalid business unit(s) provided. | INVALID_BUSINESS_UNIT |
Request
Responses
- 200
- 400
200 - All Offers Returned with No Product Targeting
Response Headers
Thu, 21 May 2020 03:56:11 GMT2926keep-alive49af928e-a4e9-4df9-a28b-999dabe09acbno-referrer1;mode=block*max-age=86400max-age=31536000vibrate 'none'; geolocation 'none'sameoriginconnect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netM3RKMGktIAMF2Fg=no-cache, no-store, must-revalidatenosniffRoot=1-5ec5fbda-abbf0c0c0dbf6ef1550673b7;Sampled=0400 - from Date Must Be Within Last Year