Send a message to wallet item users associated with a particular campaign. Note that the message will begin being sent to targeted end users immediately after it is created.
OS limitations
Messages based on location (Latitude/Longitude) can be sent for Apple and Android, but time-based notifications can only be sent for Apple.
Request
Define the relevant fields in the body of your request. In the filters element, you can define which wallet users will receive the message. Skip to the filter fields section to learn more about filtering.
Note that the created_at
, updated_at
, url
, and wallet_message_id
fields are system generated. Any values specified in the request will be ignored.
Response
Upon a successful request, a wallet message entity will be returned
Filter Field Options
First class field filter
See the first-class fields guide to get more information on how first-class fields work.
Selector | Value | Example |
---|---|---|
any | String | { "name" : "first_class_field", "field_name": "first_name", "selector" : "any", "value" : ["Your Name"] }` |
starts_with | String | { "name" : "first_class_field", "field_name": "last_name", "selector" : "starts_with", "value" : "R" } |
The loyalty_balance
first-class field supports comparison of float values.
Selector | Value | Example |
---|---|---|
=, <, <=, > , >= | String | {"name" : "first_class_field", "field_name" : "loyalty_balance", "selector" : ">=", "value" : 100.5 } |
between | String | {"name" : "first_class_field", "field_name" : "loyalty_balance", "selector" : "between", "value" : [1,10] } |
Group code filter
Selector | Value | Example |
---|---|---|
any | String | { "name" : "group_code", "selector" : "any", "value" : "code1" } |
starts_with | String | { "name" : "group_code", "selector" : "starts_with", "value" : "code1" } |
Provider filter
Selector | Value | Example |
---|---|---|
any | Array. Possible values are: "passbook" or "google" | { "name" : "provider", "selector" : "any", "value" : ["passbook", "google"] } |
Expiration date filter
Notes for Time:
- ISO8601 format is required. The filter expects an expiration date with a date, time and offset information. Any offset can be used.
- "on" selector is equivalent to between: [expiration_date (beginning of day), expiration_date (end of day)].
Selector | Value | Example |
---|---|---|
before | String. Date in ISO8601 format with offset. | {"name": "expiration_date", "selector": "before", "value": "2017-10-25T10:20:30-06:00"} |
after | String. Date in ISO8601 format with offset. | {"name": "expiration_date", "selector": "after", "value": "2017-10-25T10:20:30-06:00"} |
between | Array. 2 dates in ISO8601 format with offset. | {"name": "expiration_date", "selector": "between", "value": ["2017-10-24T10:20:30-06:00", "2017-10-25T10:20:30-06:00"]} |
on | String. Date in ISO8601 with offset | {"name": "expiration_date", "selector": "on", "value": "2017-10-25T10:20:30-06:00"} |