Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Table of Contents

Get Wallet Messages

GET /companies/:company_key/campaigns/wallet/:wallet_id/messages

This retrieves an array of all the previous Wallet Messages on the campaign.

A maximum of the 50 most recent records will be returned (this is for future paging compatibility).

A 404 - Not Found object will be returned if the specified Mobile Wallet :wallet_id does not exist.

Return JSON

{
  "wallet_message_id": "abcdef23SDF2",
  "message": {
    "template": "This is the updated message I would like to send.",
    "header": "Header, for Google Wallet only.",
    "image_url": "http://www.google.com/wallet.jpg"
  }
  "campaign_ref": {
    "id" : "abCDefGHij",
    "type": "Loyalty",
    "url" : "/companies/:id/campaigns/wallet/abCDefGHij"
  },
  "filters": [
      { "name" : "group_code", "selector" : "starts_with", "value" : "DEA" },
      { "name" : "providers", "selector" : "any", "value" : [ "Passbook" ] }
  ],
  "url": "/companies/:id/campaigns/wallet/abCDefGHij/messages/abcdef23SDF2",
  "created_at": "2012-04-05T14:30Z",
  "updated_at": "2012-05-08T19:30Z"
},
{
  "wallet_message_id": "abcde123",
  "message": {
    "template": "This is another message.",
    "header": "Header, for Google Wallet only.",
    "image_url": "http://www.google.com/wallet.jpg"
  }
  "campaign_ref": {
    "id" : "abCDefGHij",
    "type": "Loyalty",
    "url" : "/companies/:id/campaigns/wallet/abCDefGHij"
  },
  "filters": [
      { "name" : "group_code", "selector" : "starts_with", "value" : "DEA" },
      { "name" : "providers", "selector" : "any", "value" : [ "Passbook" ] }
  ],
  "url": "/companies/:id/campaigns/wallet/abCDefGHij/messages/abcde123",
  "created_at": "2012-04-05T14:30Z",
  "updated_at": "2012-05-08T19:30Z"
}

Get Wallet Message

GET /companies/:company_key/campaigns/wallet/:wallet_id/messages/:wallet_message_id

This retrieves a specific wallet message identified by the :wallet_message_id.

A 404 - Not Found object will be returned if the specified Mobile Wallet Campaign or Wallet Message does not exist.

Return JSON

{
  "wallet_message_id": "abcdef23SDF2",
  "message": {
    "template": "This is the updated message I would like to send.",
    "header": "Header, for Google Wallet only.",
    "image_url": "http://www.google.com/wallet.jpg"
  }
  "campaign_ref": {
    "id" : "abCDefGHij",
    "type": "Loyalty",
    "url" : "/companies/:id/campaigns/wallet/abCDefGHij"
  },
  "filters": [
      { "name" : "group_code", "selector" : "starts_with", "value" : "DEA" },
      { "name" : "providers", "selector" : "any", "value" : [ "Passbook" ] }
  ],
  "url": "/companies/:id/campaigns/wallet/abCDefGHij/messages/abcdef23SDF2",
  "created_at": "2012-04-05T14:30Z",
  "updated_at": "2012-05-08T19:30Z"
}

Create Mobile Wallet Message

POST /companies/:company_key/campaigns/wallet/:wallet_id/messages

This will create a new Wallet Message and immediately begin sending it out to the targeted Wallet Items.
The created_at, updated_at, url and wallet_message_id fields are system generated. Any values specified in the request will be ignored.

An HTTP 200 - OK will be returned if the operation completes successfully.
An HTTP 404 - Not Found will be returned if the specified Mobile Wallet :wallet_id does not exist.

Request JSON*

{
  "message": {
    "template": "This is the updated message I would like to send.",
    "header": "Header, for Google Wallet only.",
    "image_url": "http://www.google.com/wallet.jpg"
  }
  "campaign_ref": {
    "id" : "abCDefGHij",
    "type": "Loyalty",
    "url" : "/companies/:id/campaigns/wallet/abCDefGHij"
  },
  "filters": [
      { "name" : "group_code", "selector" : "starts_with", "value" : "DEA" },
      { "name" : "providers", "selector" : "any", "value" : [ "Passbook" ] }
  ],
}

Return JSON

A Wallet Message entity reflecting the message created.

  • No labels