Page History
Last Updated:
Lastupdatedate |
---|
Livesearch | ||||
---|---|---|---|---|
|
Available API methods Table of Contents maxLevel 3
Anchor | ||||
---|---|---|---|---|
|
The following retrieves an array of all the previous Wallet messages on the campaign.
Code Block |
---|
GET /companies/:company_key/campaigns/wallet/:wallet_id/messages
|
A maximum of the 50 most recent records will be returned.
Note |
---|
Notes:
|
Return JSON
Code Block |
---|
[
{
"wallet_message_id":"abcdef23SDF2",
"message":{
"template":"This is the updated message I would like to send.",
"header":"Header, for Android Pay only.",
"image_url":"http://www.google.com/wallet.jpg"
},
"campaign_ref":{
"id":"abCDefGHij",
"type":"Loyalty",
"url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij" }, "filters":[ { "name":"group_code", "selector":"starts_with", "value":"DEA" }, { "name":"expiration_date", "selector":"between", "value":["2018-02-28T10:20:30-06:00", "2018-03-04T10:20:30-06:00"] }, { "name":"providers", "selector":"any", "value":[ "Passbook" ] } ], "url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij/messages/abcdef23SDF2", "created_at":"2017-01-15T14:30Z", "updated_at":"2017-02-18T19:30Z" }, { "wallet_message_id":"abcde123", "message":{ "template":"This is another message.", "header":"Header, for Android Pay only.", "image_url":"http://www.google.com/wallet.jpg" }, "campaign_ref":{ "id":"abCDefGHij", "type":"Loyalty", "url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij" }, "filters":[ { "name":"group_code", "selector":"starts_with", "value":"DEA" }, { "name":"expiration_date", "selector":"between", "value":["2018-02-28T10:20:30-06:00", "2018-03-04T10:20:30-06:00"] }, { "name":"providers", "selector":"any", "value":[ "Passbook" ] } ], "url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij/messages/abcde123", "created_at":"2017-01-15T14:30Z", "updated_at":"2017-02-18T19:30Z" } ] |
Anchor | ||||
---|---|---|---|---|
|
The following retrieves a specific Wallet message identified by the :wallet_message_id.
Code Block |
---|
GET /companies/:company_key/campaigns/wallet/:wallet_id/messages/:wallet_message_id
|
Note |
---|
Note:
|
Return JSON
Code Block |
---|
{
"wallet_message_id":"abcdef23SDF2",
"message":{
"template":"This is the updated message I would like to send.",
"header":"Header, for Android Pay only.",
"image_url":"http://www.google.com/wallet.jpg"
},
"campaign_ref":{
"id":"abCDefGHij",
"type":"Loyalty",
"url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij" }, "filters":[ { "name":"group_code", "selector":"starts_with", "value":"DEA" }, { "name":"expiration_date", "selector":"between", "value":["2018-02-28T10:20:30-06:00", "2018-03-04T10:20:30-06:00"] }, { "name":"providers", "selector":"any", "value":[ "Passbook" ] } ], "url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij/messages/abcdef23SDF2", "created_at":"2017-01-15T14:30Z", "updated_at":"2017-02-18T19:30Z" } |
Anchor | ||||
---|---|---|---|---|
|
The following will create a new Wallet message and immediately begin sending it out to the targeted Wallet items.
Code Block |
---|
POST /companies/:company_key/campaigns/wallet/:wallet_id/messages
|
Note |
---|
Notes: The wallet_id is the SmartLink token for a campaign. |
The created_at, updated_at, url, and wallet_message_id fields are system generated. Any values specified in the request will be ignored.
Note |
---|
Notes:
|
Request JSON
Code Block |
---|
{
"message":{
"template":"This is the updated message I would like to send.",
"header":"Header, for Android Pay only.",
"image_url":"http://www.google.com/wallet.jpg"
},
"campaign_ref":{
"id":"abCDefGHij",
"type":"Loyalty",
"url":"/companies/: |
...
company_key/campaigns/wallet/abCDefGHij" }, "filters":[ { "name":"group_code", "selector":"starts_with", "value":"DEA" }, { "name":"expiration_date", "selector":"between", "value":["2018-02-28T10:20:30-06:00", "2018-03-04T10:20:30-06:00"] }, { "name":"providers", "selector":"any", "value":[ "Passbook" ] } ] } |
Return JSON
A Wallet message entity reflecting the message created.
Filter Options for Create Mobile Wallet Message API
First Class Field Filter
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
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"} |
First Class Fields
See the Wallet Manager - First Class Fields page to get more information on how first class fields work.
Note |
---|
Notes:
|