Mass Offers (not logged in)
GET/client/users/offers/mass
When not logged in, view mass offers that have been configured for everyone as the audience. Mass offers may be triggered by any activation method (Auto Load, LTC, or Coupon Code), but may not include targeting on personal data such as age, gender, or postal code.
The response to this call also includes product targeting data so that reflects information used on the client's product web pages. The productTargeting information provided in the response exactly reflects what can be set up in the ES Loyalty Console in creating an offer.
See the response code example below to see how the productTargeting works. The three main elements in the response for productTargeting are:
-
groupOperator-"AND"or"OR", used to set the relationships between categories and subcategories. -
conditions- From the product catalog, the field allows different ways of specifying a product such as the brand, brand class, category, department, family, GTIN, primary vendor, or subcategory. The conditions also includes theconditionOperator(see next point) and every selectedvaluefor each of theconditions. -
conditionOperator-"IN"or"NOT IN", determine whether the product is contained in or is specifically not in the category defined infield.
Using the groupOperator, complex and nested logic may be constructed to very specifically define the productTargeting in the Mass Offer.
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 |
|---|---|---|---|
| businessUnit | Business unit associated with the mass offers | String. Name of business unit. | Name of business unit. Ex.: /offers/mass?businessUnit=BUYCO |
| maxResults | Maximum number of mass offers returned | 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. |
| reportingIdentifier | The identifier for the type of report that should be generated | String | Ex.: offers/mass?reportingIdentifier=DIGITAL_PERSONALIZED_OFFER |
| 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. |
| channel | The channel through which these mass offers are distributed | Enum, commonly-used values: STORE, POS, WEBSITE, APP, PARTNER | Ex.: /offers/mass?channel=APP |
| businessUnit | Specifies a business unit for offers returned in response. | String | Can provide name of one businessUnit (only data for that BU is returned) or more than one by having a "businessUnit" name value and query parameter for each. If this parameter is not used, then offers for all BUs are returned. |
Query Parameter Examples
{{env_host}}/client/users/offers/mass?businessUnit=BUYCO
{{env_host}}/client/users/offers/mass?maxResults=50
{{env_host}}/client/users/offers/mass?reportingIdentifier=CATEGORY_MASS
{{env_host}}/client/users/offers/mass?locale=en-CA&maxResults=20
{{env_host}}/client/users/offers/mass?channel=APP
Request
Body
There is no 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 |
| 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 | |
| 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." |
| promptMessageIDs | Contains ID of messages for the POS operator or member associated with the offer displayed | Array | |
| productTargeting | Allows product targeting for Mass Offer, either by using a list or query logic. | Object | Used to highlight offers on specified product or category pages , targeting products at the SKU level |
| For product targeting using a list | The following field is used with list-based targeting. | ||
| fileName | The name of the list used for product targeting. | String | File is in CSV format; multiple file versioning in the case of multiple list files is supported |
| For product targeting using query logic | The following fields are used with logic-based targeting. | ||
| group | Highest-level logical grouping of product information | Object | |
| groupOperator | Defines the logical relationship between elements in the group | Enum: "AND" or "OR" | |
| conditions | Array | ||
| field | A classifier for the product such as "BRAND", "FAMILY", "PRIMARYVENDOR". | String | Other examples: "BRANDCLASS", "CATEGORY", "GTIN", "DEPARTMENT", or "SUBCATEGORY" |
| conditionOperator | Enum: "IN", "NOT IN", "EQUAL", "NOT EQUAL" | Options for conditionOperator depend on field selected | |
| value | The value associated with the field such as a Brand or Department designator or GTIN number. | String | |
| subgroups | Subcategories within the groups. | Array |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Reporting identifier {{reportingIdentifier}} is not a valid reporting identifier. | INVALID_REPORTING_IDENTIFIER | |
| 400 Bad Request | Invalid business unit(s) provided. | INVALID_BUSINESS_UNIT | |
| 400 Bad Request | Locale {{locale}} is not a valid locale. | INVALID_REQUEST |
Request
Responses
- 200
- 400
200 - Mass Offers Returned with Product Targeting
400 - Reporting Identifier Not Valid