(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-P2BC6Q6N');

Help Center

Loyalty Card API

Introduction to Loyalty Cards #

Loyalty Cards support two different layout options. Layout 1 has a strip image and 2 front fields whereas Layout 2 has a strip image and up to 4 front fields. The fields for custom-field-1, custom-field-2, and custom-field-3 can be used in the generatepass, updatepassdata, createpassissuancelink, and updatepassissuancelink API calls but are used only for layout 2 loyalty cards.

Introduction to Loyalty Card Layout 1 #

The following image shows where the fields used in the API calls will appear on the loyalty card layout 1 for both Apple Wallet and Google Pay. Any fields shown on the loyalty card layout 1 but not linked to the key in the image are required in the Pass Template Builder, therefore, they will always be shown on the pass. In this case, those fields are the Card Issuer and Program Name.

mobile wallet loyalty card

Introduction to Loyalty Card Layout 2 #

The following image shows where the fields used in the API calls will appear on the loyalty card layout 2 for both Apple Wallet and Google Pay. Any fields shown on the loyalty card layout 2 but not linked to the key in the image are required in the Pass Template Builder, therefore, they will always be shown on the pass. In this case, those fields are the Card Issuer and Program Name.

loyalty card layout 2

The following table provides a detailed description of certain variables that can be used in each API call for the loyalty card layouts 1 and 2. The following text fields from the Pass Template Builder are not dynamic, therefore, you will not see these fields in the API calls for the loyalty card layout 1: Card Issuer, Program Name, Rewards Tier, Secondary Rewards Tier, Message 1, Message 2, Message 3, Text Module, Info Module, Home Page URI, Link 1 and Link 2. The format column explains whether the variable is mandatory or optional.

Params/Variables Format Description
action Mandatory, Alphabetic(a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric(a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
pass-template-id Mandatory, Alphanumeric(a-zA-Z0-9), Case-Sensitive The unique Pass Template ID used to reference a particular Pass Template.
pass-id Mandatory, Alphanumeric(a-zA-Z0-9), Case-Sensitive The identifier from your system to identify the pass or pass data uniquely.
reference-data Optional, Alphanumeric(a-zA-Z0-9) This is used for adding additional information related to the pass.
barcode-value Optional, Alphanumeric(a-zA-Z0-9) The unique barcode value associated with a specific pass-id.
expiration-timestamp Optional.“expiration-timestamp” should be in UTC.Example: 2013-02-19T15:54:50Z The timezone offset is ignored and always considers the timestamp in UTC.
expiration-timezone Optional.“expiration-timezone” should be in long name format.Example: America/New_York Use the long names listed in section 9.1 for your reference.
loyalty-points Optional, Alphanumeric(a-zA-Z0-9) The number of loyalty points, such as ‘100’. Special characters are allowed for this field.
secondary-loyalty-points Optional, Alphanumeric(a-zA-Z0-9) The secondary loyalty points field, if applicable,  such as ‘$5’. Special characters are allowed for this field.
account-name Optional, Alphanumeric(a-zA-Z0-9) The account or member name associated with the pass-id.
account-id Optional, Alphanumeric(a-zA-Z0-9) The account or member ID number associated with the pass-id.
message-fields (4-10)
(message4, message5, etc…)
Optional, Alphanumeric(a-zA-Z0-9) These fields are used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
additional-image Optional, Alphanumeric (A-Za-z0-9). Web URL This image is displayed only on Google Pay Passes below the pass, in between the additional details.
strip-image Optional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only The strip image is displayed below the logo and Merchant Name on both Apple Wallet and Google Pay Passes, as a rectangular image across the middle of the Pass. This will override any image set as strip image for the pass template.
custom-field-1 Optional, Alphanumeric(a-zA-Z0-9) Used only for Loyalty Card Layout 2 API calls.
custom-field-2 Optional, Alphanumeric(a-zA-Z0-9) Used only for Loyalty Card Layout 2 API calls.
custom-field-3 Optional, Alphanumeric(a-zA-Z0-9) Used only for Loyalty Card Layout 2 API calls.
relevant-locations (1-10)(relevant-1, relevant-2, etc..) Optional, Alphanumeric(a-zA-Z0-9)Format:
“key”:”relevant-1″,
“latitude”:”COORDINATES”,
“longitude”:”COORDINATES”,
“relevant-text”:”RELEVANCE TEXT”
Custom relevant text is only applicable for Apple Wallet Passes. If you set a relevant location, Android devices will display default text. When adding more than one relevant location, be sure to change the “key” to relevant-2, relevant-3, etc..
ibeacons (1-10)(ibeacon-1, ibeacon-2, etc..) Optional, Alphanumeric(a-zA-Z0-9)Format:
“key”:”ibeacon-1″,
“proximity-uuid”:”UUID VALUE”,
“major”:”MAJOR VALUE”,
“minor”:”MINOR VALUE”, “relevant-text”:”RELEVANCE TEXT”
ibeacons are only applicable for Apple Wallet Passes. When adding more than one ibeacon, be sure to change the “key” to ibeacon-2, ibeacon-3, etc..
user-email Optional, Alphanumeric (a-zA-Z0-9)
Accepts a valid email ID string.
The email will be stored as meta data for the generated Pass and will be used for the automated integrations, if any, for different Pass events to communicate with the end-user, via email.
user-phone Optional, Numeric (0-9)
Accepts a valid phone number.
The phone number will be stored as meta data for the generated Pass and will be used for the automated integrations, if any, for different Pass events to communicate with the end user, via SMS/MMS.

GeneratePass #

The generate pass API will generate a unique installation link for a loyalty card. If you try to call this API again without changing the ‘pass-id’ field, it will return an error message and fail to generate the installation link for the loyalty card. To call this API again successfully, you will need to use a different ‘pass-id’.

*Important Note* custom-field-1, custom-field-2, and custom-field-3 are only applicable if you used layout 2 for your loyalty card Pass Template and will not work on layout 1 loyalty card Pass Templates.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{  
   "action":"generatepass",
   "pass-template-id":"PASS TEMPLATE ID",
   "pass-id":"UNIQUE CUSTOMER PASS ID",
   "reference-data": {
     "Reference": "reference data of the customer",
      },
   "pass-data":{  
      "barcode-value":"BARCODE VALUE",
      "loyalty-points":"LOYALTY POINTS VALUE",
      "secondary-loyalty-points":"SECONDARY LOYALTY POINTS VALUE",
      "account-name":"ACCOUNT NAME VALUE",
      "account-id":"ACCOUNT ID VALUE",
      "additional-image":"ADDITIONAL IMAGE",
      “strip-image” : “STRIP IMAGE”,
      "custom-field-1": "CUSTOM VALUE FOR FIELD 1",
      "custom-field-2": "CUSTOM VALUE FOR FIELD 2",
      "custom-field-3": "CUSTOM VALUE FOR FIELD 3",
      "message4": "MESSAGE 4 TEXT",
      "message5": "MESSAGE 5 TEXT",
      "message6": "MESSAGE 6 TEXT",
      "message7": "MESSAGE 7 TEXT",
      "message8": "MESSAGE 8 TEXT",
      "message9": "MESSAGE 9 TEXT",
      "message10": "MESSAGE 10 TEXT",
      "additional-image":"ADDITIONAL IMAGE",
      "expiration-timestamp”: "EXPIRATION TIMESTAMP”,
      "expiration-timezone":"TIMEZONE",
      "relevant-locations":[         // 10 fields         
         { 
            "key":"relevant-1",
            "latitude":"COORDINATES",
            "longitude":"COORDINATES",
            "relevant-text":"RELEVANCE TEXT"
         },
         { 
            "key":"relevant-2",
            "latitude":"COORDINATES",
            "longitude":"COORDINATES",
            "relevant-text":"RELEVANCE TEXT"
         },
         …
      ],
      "ibeacons":[                      // 10 fields         
        { 
            "key":"ibeacon-1",
            "proximity-uuid":"UUID VALUE",
            "major":"MAJOR VALUE",
            "minor":"MINOR VALUE",
            "relevant-text":"RELEVANCE TEXT"
         },
        { 
            "key":"ibeacon-2",
            "proximity-uuid":"UUID VALUE",
            "major":"MAJOR VALUE",
            "minor":"MINOR VALUE",
            "relevant-text":"RELEVANCE TEXT"
         },
        …
      ]
   }
   “pass-meta-data” : {
   	“user-email” : “USER EMAIL ID”,
   	“user-phone” : “USER PHONE NUMBER”
   }
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{  
   "action":"generatepass",
   "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
   "pass-id":"Loyalty Card_1",
   "reference-data": {
      "email": "fake.email@email.com",
      "phone": "10000000000",
      "transaction-id": "96"
      },
   "pass-data":{  
      "barcode-value":"ASDE96325",
      "loyalty-points":"65",
      "secondary-loyalty-points":"94",
      "account-name":"Asian Store",
      "account-id":"56984",
      "custom-field-1": "Popcorn Festival",
      "message4": "Redeem your coupon at our Boston location",
      "additional-image":"https://fake-content-url.com/additional-image.png",
      "expiration-timestamp”: "2019-02-01T10:46:46+00:00”,
      "expiration-timezone":"Australia/Sydney",
      "relevant-locations":[  
         { 
            "key":"relevant-1",
            "latitude":"42.369169",
            "longitude":"-71.237371",
            "relevant-text":"Come grab some popcorn!"
         }
      ],
      "ibeacons":[  
         { 
            "key":"ibeacon-1",
            "proximity-uuid":"111111",
            "major":"222222",
            "minor":"3333333",
            "relevant-text":"Come grab some popcorn!"
         }
      ]
   “pass-meta-data” : {
   	“user-email” : “fake.email@email.com”,
   	“user-phone” : “10000000000”
   }
}

Response Success Example: Loyalty Card

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "pass-install-url":"https://fake-d2c-url.com/wallet/gc/223979as8c23420701f7b9aedbf0c55e?iid=q08e5af653af95a7",
   "tracking-id":"xxxxxxxxxx"
}

Response Failure Example: Loyalty Card

{
    "status":"Failure",
    "error-code":"E830",
    "error-message":"Internal Error. The pass was not generated.",
    "pass-id":"rockonrock2020"
}

UpdatePassData #

The update pass data API is used to update pass data for a loyalty card that has already been installed on a device. If you do not add a new “pass-id’ for the loyalty card, you will receive an error message and the loyalty card will not be updated until you add a new ‘pass-id’. The field for ‘pass-status’ will accept the following values: “redeemed”, “expired”, “voided”, “active”.

*Important Note* custom-field-1, custom-field-2, and custom-field-3 are only applicable if you used layout 2 for your loyalty card Pass Template and will not work on layout 1 loyalty card Pass Templates.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{  
    "action":"updatepassdata",
    "pass-id":"UNIQUE CUSTOMER PASS ID",
    "pass-template-id”: “PASS TEMPLATE ID”,
    "new-pass-id ":"NEW UNIQUE CUSTOMER PASS ID",
    "priority":TRUE/FALSE,
    "pass-data":{  
        "barcode-value":"BARCODE VALUE",
        "loyalty-points":"LOYALTY POINTS VALUE",
        "secondary-loyalty-points":"SECONDARY LOYALTY POINTS VALUE",
        "account-name":"ACCOUNT NAME VALUE",
        "account-id":"ACCOUNT ID VALUE",
        "additional-image":"ADDITIONAL IMAGE",
        “strip-image” : “STRIP IMAGE”,
        "custom-field-1": "CUSTOM VALUE FOR FIELD 1",
        "custom-field-2": "CUSTOM VALUE FOR FIELD 2",
        "custom-field-3": "CUSTOM VALUE FOR FIELD 3",
        "message4": "MESSAGE 4 TEXT",
        "message5": "MESSAGE 5 TEXT",
        "message6": "MESSAGE 6 TEXT",
        "message7": "MESSAGE 7 TEXT",
        "message8": "MESSAGE 8 TEXT",
        "message9": "MESSAGE 9 TEXT",
        "message10": "MESSAGE 10 TEXT",
        "additional-image":"ADDITIONAL IMAGE",  
        "pass-status":"STATUS OF THE PASS",
        "expiration-timestamp”:”EXPIRATION TIMESTAMP”,  
        "expiration-timezone":"TIMEZONE",   
        "pass-update-notification":"NOTIFICATION FOR PASS UPDATE",
   	"relevant-locations":[     	        // 10 fields            
            {  
                "key":"relevant-1",
                "latitude":"COORDINATES",
                "longitude":"COORDINATES",
                "relevant-text":"RELEVANCE TEXT"
            },
            {  
                "key":"relevant-2",
                "latitude":"COORDINATES",
                "longitude":"COORDINATES",
                "relevant-text":"RELEVANCE TEXT"
            },
            …
        ],
  	   "ibeacons":[            	              // 10 fields            
            {  
                "key":"ibeacon-1",
                "proximity-uuid":"UUID VALUE",
                "major":"MAJOR VALUE",
                "minor":"MINOR VALUE",
                "relevant-text":"RELEVANCE TEXT"
            },
            {  
                "key":"ibeacon-2",
                "proximity-uuid":"UUID VALUE",
                "major":"MAJOR VALUE",
                "minor":"MINOR VALUE",
                "relevant-text":"RELEVANCE TEXT"
            },
            …
        ]
   “pass-meta-data” : {
   	“user-email” : “EMAIL ID”,
   	“user-phone” : “PHONE NUMBER”
   }
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{  
    "action":"updatepassdata",
    "pass-id":"Loyalty Card_1",
    "pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "new-pass-id":" Loyalty Card_2",
    "priority":true,
    "pass-data":{  
        "barcode-value":"ASDE96325",
        "loyalty-points":"65",
        "secondary-loyalty-points":"94",
        "account-name":"Asian Store",
        "account-id":"56984",
        "custom-field-1": "Feb 3, 2020",
        "message4": "Redeem your coupon at our New York location",
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "pass-status":"active",
        "expiration-timestamp”: "2019-02-01T10:46:46+00:00”,
        "expiration-timezone":"Australia/Sydney",
        "pass-update-notification":"Pass has been updated with new values",
        "relevant-locations":[  
            {  
                "key":"relevant-1",
                "latitude":"42.369169",
                "longitude":"-71.237371",
                "relevant-text":"Come grab some popcorn!"
            }
        ],
        "ibeacons":[  
            {  
                "key":"ibeacon-1",
                "proximity-uuid":"111111",
                "major":"222222",
                "minor":"3333333",
                "relevant-text":"Come grab some popcorn!"
            }
        ]
   “pass-meta-data” : {
   	“user-email” : “fake.email@email.com”,
   	“user-phone” : “10000000000”
   }
}

Response Success Example: Loyalty Card

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "tracking-id":"xxxxxxxxxx"
}

Response Failure Example: Loyalty Card

{
    "status" : "Failure",
    "error-code" : "E809",
    "error-message" : "Internal Error. The pass was not updated.",
    "pass-id":"rockonrock2020"
}

GetPassData #

The get pass data API is used to retrieve data for a specific loyalty card that has already been installed on a device. This data may include the cardholder name, points balance, or rewards tier. If you do not enter the correct ‘pass-id’ for the loyalty card that you are trying to retrieve, you will receive an error code.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
    "action":"getpassdata",
    "pass-id":"UNIQUE CUSTOMER PASS ID",
    "pass-template-id": "PASS TEMPLATE ID"
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{  
   "action":"getpassdata",
   "pass-id":"rockonrock2020",
   "pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Success Example: Loyalty Card

{  
    "status":"Success",
    "pass-id":"16178389325c2f4bcc68660",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "pass-data":{  
        "program-logo":"https://fake-content-url.com/logo.png",
        "strip-image":"https://fake-content-url.com/strip-image.png",
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "barcode-value":"12345",
        "barcode-text":"12345",
        "card-issuer":"((((( Card Issuer )))))",
        "loyalty-points":"$3$",
        "program-name":"Program Name",
        "secondary-loyalty-points":"$ 4 $",
        "account-name":"5",
        "account-id":"6",
        "rewards-tier":"$ 45",
        "message1":"Your loyalty card never expires!",
        "message2":"View all of the locations where you can earn points",
        "message3":"Check out the new upcoming sales!",
        "text-module":"Need help? Contact us at 10000000000",
        "info-module":"Check out deals in your area. Visit: https://fake-home-page-uri.com",
        "link1":"tel://10000000000",
        "link2":"geo://36.9665,45.6666",
        "home-page-uri":"https://fake-home-page-uri.com",
        "expiration-timestamp":"1-2-2019 4.50pm",
        "expiration-timezone":"Europe/Oslo",
        "pass-status":"voided",
        "relevant-locations":[  
            {  
                "key":"relevant-1",
                "latitude":"42.3959218",
                "longitude":"-71.1283257",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ],
        "ibeacons":[  
            {  
                "key":"ibeacon-1",
                "proximity-uuid":"111111",
                "major":"222222",
                "minor":"3333333",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ]
    }
}

Response Failure Example: Loyalty Card

{  
    "status":"Success",
    "pass-id":"16178389325c2f4bcc68660",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "pass-data":{  
        "logo-url":"https://fake-content-url.com/logo.png",
        "pass-issuer":"Loyalty Card 24-12",
        "strip-url":"https://fake-content-url.com/strip-image.png",
        "barcode-value":"ASDH678",
        "barcode-text":"ASDH678",
        "loyalty-points":"8965",
        "secondary-loyalty-points":"699",
        "account-name":"334234",
        "account-id":"3123",
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "expiration-timestamp”:null,
        "rewards-tier":"3123",
        "secondary-rewards-tier":"3123",
        "message1":"Your loyalty card never expires!",
        "message2":"View all of the locations where you can earn points",
        "message3":"Check out the new upcoming sales!",
        "text-module":"Need help? Contact us at 10000000000",
        "info-module":"Check out deals in your area. Visit: https://fake-home-page-url.com",
        "link1-URI":"tel://10000000000",
        "link2-URI":"geo://36.9665,45.6666",
        "home-page-URI":"https://fake-home-page-url.com",
        "relevant-locations":[  
            {  
                "key":"relevant-1",
                "latitude":"42.3959218",
                "longitude":"-71.1283257",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ],
        "ibeacons":[  
            {  
                "key":"ibeacon-1",
                "proximity-uuid":"111111",
                "major":"222222",
                "minor":"3333333",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ]
    }
}
{
    "status":"FAILURE",
    "error-code":"E808",
    "error-message":"The pass-id value is invalid.",
    "pass-id":"rockonrock2020"
}

GetPassTemplate #

The get Pass Template API is used to retrieve a specific loyalty card Pass Template. To retrieve the specific loyalty card Pass Template you will need the correct ‘pass-template-id’ associated with the Pass Template.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
    "action":"getpasstemplate",
    "pass-template-id":"CARD TEMPLATE ID"
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{  
   "action":"getpasstemplate",
   "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Success Example: Loyalty Card

{  
    "status":"Success",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "pass-template":{  
        "pass-name":"Loyalty Card 24-12",
        "pass-type":"Loyalty Card",
        "organization":"JOY",
        "description":"Mobile Wallet Card by JOY",
        "logo-url":"https://fake-content-url.com/logo.png",
        "pass-issuer":"Loyalty Card 24-12",
        "strip-url":"https://fake-content-url.com/strip-image.png",
        "barcode-value":"ASDH678",
        "barcode-text":"ASDH678",
        "loyalty-points":"8965",
        "secondary-loyalty-points":"699",
        "account-name":"John Smith",
        "account-id":"3123",
        “custom-field-1”:”MM-DD-YYYY”
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "expiration-timestamp”:null,
        "rewards-tier":"3123",
        "secondary-rewards-tier":"3123",
        "message1":"Your loyalty card never expires!",
        "message2":"View all of the locations where you can earn points",
        "message3":"Check out the new upcoming sales!",
        "text-module":"Need help? Contact us at 10000000000",
        "info-module":"Check out deals in your area. Visit: https://fake-home-page-url.com",
        "link1-URI":"tel://10000000000",
        "link2-URI":"geo://36.9665,45.6666",
        "home-page-URI":"https://fake-home-page-url.com",
        "relevant-locations":[  
            {  
                "key":"relevant-1",
                "latitude":"42.3959218",
                "longitude":"-71.1283257",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ],
        "ibeacons":[  
            {  
                "key":"ibeacon-1",
                "proximity-uuid":"111111",
                "major":"222222",
                "minor":"3333333",
                "relevant-text":"Come grab some popcorn before your movie starts!"
            }
        ]
    }
}

Response Failure Example: Loyalty Card

{
    "status":"FAILURE",
    "error-code":"E802",
    "error-message":"The pass-template-id value is invalid.",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

The CreatePassIssuanceLink API is used to create an issuance link for a loyalty card Pass. To create a loyalty card Pass Issuance Link you will need the correct ‘pass-template-id’ associated with the Pass Template being used for the issuance link. The issuance links can be used in emails or websites to generate Passes using customized data upon clicking the link. The following table provides a detailed description of certain variables that can be used in each API call to create or update Pass Issuance Links for loyalty cards.

*Important Note* custom-field-1, custom-field-2, and custom-field-3 are only applicable if you used layout 2 for your loyalty card Pass Template and will not work on layout 1 loyalty card Pass Templates.

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API and is Case-Insensitive.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
 link-name Mandatory, Alphanumeric (a-zA-Z0-9) The name of the Pass Issuance Link to be created.
link-expiration-timestamp Optional. “link-expiration-timestamp” should be in Date/Time ISO 8601 format The expiration date of the issuance links for a specific template. Issuance links will be valid and a Pass can be generated using the link until this date.
link-expiration-timezone Required if link-expiration-timestamp is set. The “link-expiration-timezone” should be in long name format. Example: America/New_York Use the long names listed in section 10.1 for your reference.
link-generation-limit Optional, Numeric (0-9) Limits the number of unique Pass Issuances for a specific Pass Template. If no value is set then it is considered UNLIMITED.
link-status Optional. Accepted values: “ACTIVE” or “INACTIVE” Status of the Pass Issuance Link for a specific Pass Template.
update-pass-data Optional. Accepted values:”true” or “false” If this is set to true, this will update pass data via the issuance link. By default the value is set to false.
encryption-settings Optional Define Pass Issuance Link encryption settings.
encryption-name Optional. Accepted values: “AES-CBC” Standard Encryption Algorithms supported. Only 256 bit is supported in the API.
secret-key Required if “encryption-name” is provided. Alphanumeric (a-zA-Z0-9) This is a 32 character long password for encrypting data within the issuance link.
iv Required if “encryption-name” is provided. Alphanumeric (a-zA-Z0-9) This is a 16 character long string to be used as an initialization vector for encryption.
link-protection Optional Define Pass Issuance Link protection settings.
checksum Optional. Accepted values: “CRC32”, “SHA256”, “SHA384”, or “SHA512” Standard data integrity check algorithms are supported.
checksum-applied Required if “checksum” is provided. Accepted values: “query-string” (applied only on the query string part of the link), or
“full-link” (applied on the full link)
This defines which part of the issuance link the protection is applied on.
pass-template-id Required, Alphanumeric (a-zA-Z0-9) This is the ID of the Pass Template that the Pass Issuance Link will be generated for.
pass-variables Required Define the list of Pass variables and their required properties to be used in the Pass Issuance Link.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXXXXX

Request:
{
	"action": "createPassIssuanceLink",
	"link-name": "PASS ISSUANCE LINK TEMPLATE NAME",
	"link-expiration-timestamp": "EXPIRATION TIMESTAMP ISO 8601 FORMAT",
	"link-expiration-timezone": "EXPIRATION TIMEZONE OF PASS ISSUANCE LINK",
	"link-generation-limit" : "MAX. NUMBER OF UNIQUE PASSES TO BE GENERATED",
        "link-status" : "STATUS OF THE LINK",
        “update-pass-data” :  "true/false",
	"encryption-settings:" {
		"encryption-name": "AES_CBC",
		"secret-key": "SECRET KEY",
		"iv": "INITIALIZATION VECTOR"
                },
	"link-protection": {
		"checksum": "CRC32 / SHA256 / SHA384 / SHA512",
		"checksum-applied": "FULL-LINK / QUERY-STRING"
                }
	"pass-template-id": "PASS TEMPLATE ID",
	"pass-variables": {
                "pass-id": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "expiration-timestamp": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "expiration-timezone": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "additional-image": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "additional-image-text": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "strip-image": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
                "loyalty-points-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "secondary-loyalty-points-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "account-name-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "account-id-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-1": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-2": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-3": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "message4": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
                "message5": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message6": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message7": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },      
               "message8": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message9": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message10": {
	                "is-required": true/false,
	                "value-encryption": true/false
               },
                "barcode-value": {
   	                "is-required": true / false,
   	                "value-encryption": true / false
                },
                "user-email": {
                "is-required": true / false,
                "value-encryption": true / false
                },     
                "user-phone": {
                "is-required": true / false,
                "value-encryption": true / false
                },  
                "relevance-location-address1": {                  // 10 fields 
                        "is-required": true / false,
   	                "value-encryption": true / false
                },
                "relevance-location-latitude1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-longitude1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-text1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-address2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-latitude2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-longitude2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-text2": {
                        "is-required": true / false,
                          "value-encryption": true / false
                },
                "ibeacon-uuid1": {                                // 10 fields 
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-major1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-minor1": {
                        "is-required": true / false,
                         "value-encryption": true / false
                },
                "ibeacon-relevance-text1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-uuid2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-major2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-minor2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-relevance-text2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                }
        }
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
	"action": "createpassissuancelink",
	"issuance-link-name": "TestIssuanceLink",
	"pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"link-expiration-timestamp": "2020/10/23T00:00-10:00",
	"link-expiration-timezone": "America/New_York",
	"link-generation-limit": 100,
	"link-status": "active",
        “update-pass-data” :  "true",
	"encryption-settings": {
		"encryption-name": "aes-cbc",
		"secret-key": "dNJWdAIchrX7OQflNEk1quq3CvjngmXj",
		"iv": "wbJWPb9KLbxo6xpk"
                },
	"link-protection": {
		"checksum-algorithm": "crc32",
		"checksum-applied": "query-string"
                },
	"pass-variables":{
		"pass-id": {
			"is-required": true,
			"value-encryption": false
		},
		"loyalty-points-value": {
			"is-required": true,
			"value-encryption": true
		},
		"account-name-value":{
			"is-required": true,
			"value-encryption": true
		},
                "custom-field-1": {
                        "is-required": true,
                        "value-encryption": false
                }
}

Response Success Example: Loyalty Card

{
    "status": "Success",
    "pass-issuance-link-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "preview-url": "https://fake-d2c-url.com/wallet/gc/95f8ce07f404d96d6ecdc13583eacf53?pass-id={ Parameter Value }&loyalty-points-value=Encrypted({ Parameter Value })&account-name-value=Encrypted({ Parameter Value })&account-id-value=Encrypted({ Parameter Value })"
}

Response Failure Example: Loyalty Card

{
    "status": "Failure",
    "error-code": "E1543",
    "error-message": "Either pass variables provided are invalid or empty"
}

The UpdatePassIssuanceLink API is used to update an issuance link for a Loyalty Card Pass. To update a Loyalty Card Pass Issuance Link you will need the correct ‘pass-template-id’ associated with the Pass Template being used for the issuance link.

*Important Note* custom-field-1, custom-field-2, and custom-field-3 are only applicable if you used layout 2 for your loyalty card Pass Template and will not work on layout 1 loyalty card Pass Templates.

Request: Loyalty Card

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXXXX

Request:
{
	"action": "UpdatePassIssuanceLink",
	"link-name": "PASS ISSUANCE LINK TEMPLATE NAME",
        "issuance-link-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"link-expiration-timestamp": "EXPIRATION TIMESTAMP ISO 8601 FORMAT",
	"link-expiration-timezone": "EXPIRATION TIMEZONE OF PASS ISSUANCE LINK",
	"link-generation-limit" : "MAX. NUMBER OF UNIQUE PASSES TO BE GENERATED",
        "link-status" : "STATUS OF THE LINK",
        “update-pass-data” :  "true/false",
	"encryption-settings:" {
		"encryption-name": "AES_CBC",
		"secret-key": "SECRET KEY",
		"iv": "INITIALIZATION VECTOR"
                },
	"link-protection": {
		"checksum": "CRC32 / SHA256 / SHA384 / SHA512",
		"checksum-applied": "FULL-LINK / QUERY-STRING"
                }
	"pass-template-id": "PASS TEMPLATE ID",
	"pass-variables": {
                "pass-id": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "expiration-timestamp": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "expiration-timezone": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "additional-image": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "additional-image-text": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "strip-image": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
                "loyalty-points-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "secondary-loyalty-points-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "account-name-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "account-id-value": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-1": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-2": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "custom-field-3": {
                        "is-required": true/false,
                        "value-encryption": true/false
                },
                "message4": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
                "message5": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message6": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message7": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },      
               "message8": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message9": {
	                "is-required": true/false,
	                "value-encryption": true/false
                },
               "message10": {
	                "is-required": true/false,
	                "value-encryption": true/false
               },
                "barcode-value": {
   	                "is-required": true / false,
   	                "value-encryption": true / false
                },
                "user-email": {
                "is-required": true / false,
                "value-encryption": true / false
                },     
                "user-phone": {
                "is-required": true / false,
                "value-encryption": true / false
                },  
                "relevance-location-address1": {                  // 10 fields 
                        "is-required": true / false,
   	                "value-encryption": true / false
                },
                "relevance-location-latitude1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-longitude1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-text1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-address2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-latitude2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-location-longitude2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "relevance-text2": {
                        "is-required": true / false,
                          "value-encryption": true / false
                },
                "ibeacon-uuid1": {                                // 10 fields 
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-major1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-minor1": {
                        "is-required": true / false,
                         "value-encryption": true / false
                },
                "ibeacon-relevance-text1": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-uuid2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-major2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-minor2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                },
                "ibeacon-relevance-text2": {
                        "is-required": true / false,
                        "value-encryption": true / false
                }
        }
}

Request Example: Loyalty Card

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{
	"action": "Updatepassissuancelink",
	"link-name": "TestIssuanceLink",
        "issuance-link-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"pass-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"link-expiration-timestamp": "2020/10/23T00:00-10:00",
	"link-expiration-timezone": "America/New_York",
	"link-generation-limit": 100,
	"link-status": "active",
        “update-pass-data” :  "true",
	"encryption-settings": {
		"encryption-name": "aes-cbc",
		"secret-key": "dNJWdAIchrX7OQflNEk1quq3CvjngmXj",
		"iv": "wbJWPb9KLbxo6xpk"
                },
	"link-protection": {
		"checksum-algorithm": "crc32",
		"checksum-applied": "query-string"
                },
	"pass-variables":{
		"pass-id": {
			"is-required": true,
			"value-encryption": false
		},
		"loyalty-points-value": {
			"is-required": true,
			"value-encryption": true
		},
		"account-name-value":{
			"is-required": true,
			"value-encryption": true
		},
		"card-pin-value":{
			"is-required": true,
			"value-encryption": true
		}
}

Response Success Example: Loyalty Card

{
    "status": "Success",
    "pass-issuance-link-template-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "preview-url": "https://fake-d2c-url.com/wallet/gc/95f8ce07f404d96d6ecdc13583eacf53?pass-id={ Parameter Value }&loyalty-points-value=Encrypted({ Parameter Value })&account-name-value=Encrypted({ Parameter Value })&account-id-value=Encrypted({ Parameter Value })"
}

Response Failure Example: Loyalty Card

{
    "status": "Failure",
    "error-code": "E1543",
    "error-message": "Either pass variables provided are invalid or empty"
}

CreatePassTemplate Layout 1 #

The CreatePassTemplate API is used to create a Pass Template for a loyalty card layout 1 Pass. The following table provides a detailed description of certain variables that can be used in each API call to create or update Pass Templates for layout 1 loyalty cards. The required params for a loyalty card layout 1 Pass Template are: action, api-key, pass-template-type, pass-template-subtype, pass-template-name, card-issuer, background-color, program-logo, program-logo-gpay, program-name, barcode-type, text-color, description

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
pass-template-type Mandatory. The expected value is “loyalty” This defines the type of Pass that will be used for creating the Pass Template.
pass-template-subtype Mandatory. The expected value is “loyalty-card-type1” This defines the sub type for the Loyalty Card Template.
pass-template-name Mandatory. Alphanumeric (A-Za-z0-9) This is used as an internal name to identify the Pass Template.
program-logo Mandatory, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only This PNG image is used only for Apple Wallet Passes. Rectangular images are required
program-logo-gpay Mandatory, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only This PNG image is used only for Google passes. Circular images are preferred. Any image that is not circular will be masked into a circular image.
card-issuer Mandatory, Alphanumeric (A-Za-z0-9) This is the card-issuer for the loyalty card. If “program-logo” is set then this value won’t be displayed on Apple Wallet Passes.
strip-image Optional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only The strip image is displayed below the logo and Merchant Name on both Apple Wallet and Google Pay Passes, as a rectangular image across the middle of the Pass.
background-color Mandatory, Numeric (0-9). 6 digit hexadecimal color code preceded by hash “#” This value defines the background color of the Pass, for both Apple Wallet and Google Pay Passes.
loyalty-points-label Optional, Alphanumeric (A-Za-z0-9) The label for the loyalty-points field. If not set, but a loyalty-points is provided, then a default value “POINTS” will be used on the Pass.
loyalty-points Optional, Alphanumeric (A-Za-z0-9) The loyalty points associated with the loyalty card. This value is used to generate a static Pass.
program-name Mandatory, Alphanumeric (A-Za-z0-9) The loyalty program name.
secondary-loyalty-points-label Optional, Alphanumeric (A-Za-z0-9) The label for the secondary-loyalty-points field. If not set, but a secondary-loyalty-points value is provided, then a default value “REWARDS” will be used on the Pass.
secondary-loyalty-points Optional, Alphanumeric (A-Za-z0-9) The secondary loyalty points associated with the loyalty card. This value is used to generate a static Pass.
account-name-label Optional, Alphanumeric (A-Za-z0-9) The label for the account-name field. If not set, but an account-name value is provided, then a default value “MEMBER NAME” will be used on the Pass.
account-name Optional, Alphanumeric (A-Za-z0-9) The account name associated with the loyalty card. This value is used to generate a static Pass.
account-id-label Optional, Alphanumeric (A-Za-z0-9) The label for account-id field. If not set, but an account-id value is provided, then a default value “MEMBER ID” will be used on the Pass.
account-id Optional, Alphanumeric (A-Za-z0-9) The account id associated with the loyalty card. This value is used to generate a static Pass.
rewards-tier-label Optional, Alphanumeric (A-Za-z0-9) The label for the rewards-tier field. If not set, but an account-id value is provided, then a default value “REWARDS TIER” will be used on the Pass.
rewards-tier Optional, Alphanumeric (A-Za-z0-9) The rewards tier for the loyalty card.
message1-label Optional, Alphanumeric (A-Za-z0-9) The label for the message1 field.
message1 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message2-label Optional, Alphanumeric (A-Za-z0-9) The label for the message2 field.
message2 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message3-label Optional, Alphanumeric (A-Za-z0-9) The label for the message3 field.
message3 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message4-label Optional, Alphanumeric (A-Za-z0-9) The label for the message4 field.
message4 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message5-label Optional, Alphanumeric (A-Za-z0-9) The label for the message5 field.
message5 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message6-label Optional, Alphanumeric (A-Za-z0-9) The label for the message6 field.
message6 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message7-label Optional, Alphanumeric (A-Za-z0-9) The label for the message7 field.
message7 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message8-label Optional, Alphanumeric (A-Za-z0-9) The label for the message8 field.
message8 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message9-label Optional, Alphanumeric (A-Za-z0-9) The label for the message9 field.
message9 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message10-label Optional, Alphanumeric (A-Za-z0-9) The label for the message10 field.
message10 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
text-module-label Optional, Alphanumeric (A-Za-z0-9) The label for the text-module field.
text-module Optional, Alphanumeric (A-Za-z0-9) This field is also used to display any message like the message fields. It is displayed on the back of Apple Wallet Pass, and below the Pass for Google Pay.
info-module-label Optional, Alphanumeric (A-Za-z0-9) The label for the info-module field.
info-module Optional, Alphanumeric (A-Za-z0-9) This field is also used to display any message like the message fields. It is displayed on the back of Apple Wallet Pass, and below the Pass for Google Pay. When the Pass Status is updated, this field value is updated with the appropriate message reflecting the status.
home-page-uri-label Optional, Alphanumeric (A-Za-z0-9) The label for the home page URI.
home-page-uri Optional, Alphanumeric (A-Za-z0-9) This field is used to display any web page link which may contain any additional information about the Passes. The links are clickable on both Apple Wallet and Google Pay Passes and will open in a browser.
link1-label Optional, Alphanumeric (A-Za-z0-9) The label for the link1 field.
link1-type Optional, Alphabetic (A-Za-z). Accepted values: “email”, “geo-location”, “map-link”, “phone”, or “web-link” This field specifies what the type of link will be for link1 field value.
link1 Optional, Alphanumeric (A-Za-z0-9) Based on the value provided in the link1-type field, this field can have an email id, a geolocation, a google map link, a phone number or a web link. The value will be validated based on the type set in the link1-type field. On Google Pay Passes, an icon will be displayed beside the field value to identify the type of field. E.g. the map link/geolocation will have a map icon.
link2-label Optional, Alphanumeric (A-Za-z0-9) The label for the link2 field.
link2-type Optional, Alphabetic (A-Za-z). Accepted values: “email”, “geo-location”, “map-link”, “phone”, or “web-link” This field specifies what the type of link will be for link2 field value.
link2 Optional, Alphanumeric (A-Za-z0-9) Based on the value provided in the link2-type field, this field can have an email id, geolocation, a google map link, a phone number or a web link. The value will be validated based on the type set in the link2-type field. On Google Pay Passes, an icon will be displayed beside the field value to identify the type of field. E.g. the map link/geolocation will have a map icon.
text-color Mandatory, Numeric (0-9). 6 digit hexadecimal color code preceded by hash “#” This value defines the text color for Apple Wallet Passes only. Google controls the color for the values displayed on the Google Pay Pass, which is either black or white, based on the background color of the Pass.
description Mandatory, Alphanumeric (A-Za-z0-9) This field provides a description for the pass, which is used as a voice-over to describe Passes for blind or low vision users for Apple Wallet Passes only.
linked-apps Optional, Alphanumeric (A-Za-z0-9) This is a comma-separated list of iTunes apps, which are displayed on the back of the apple passes.
ibeacons Optional, Alphanumeric (A-Za-z0-9).Format:
“proximity-uuid”:”UUID VALUE”,
“major”:”MAJOR VALUE”,
“minor”:”MINOR VALUE”, “relevant-text”:”RELEVANCE TEXT”
ibeacons are only applicable for Apple Wallet Passes. They are used to display messages on the lock screens of IOS mobile devices based on the values set.
additional-image Optional, Alphanumeric (A-Za-z0-9). Web URL This image is displayed only on Google Pay Passes, in the area below the pass in between the additional details.
additional-image-text Optional, Alphanumeric (A-Za-z0-9) This value provides information that is linked to the additional image.
expiration-setting Optional. Alphabetic (A-Za-z). Accepted Values: “default” or “auto” If this is not set and expiry-date is set, then “default” will be considered by default.
expiry-date Optional, Alphanumeric (A-Za-z0-9)Format:
mm/dd/yyyy hour:min AM/PM
The date/time value for the Pass expiration, if not set specifically for individual Passes.
expiration-timezone Optional, Alphanumeric (A-Za-z0-9) The timezone name. E.g. America/New_York. Use the long names listed in the Appendix.
auto-expire-number-days Optional, Numeric (0-9) This is the number of days post install to expire passes. If “auto” is set for expiration-setting, then auto-expire-number-days or auto-expire-number-hours is mandatory.
auto-expire-number-hours Optional, Numeric (0-9) This is the number of hours post install to expire passes. If “auto” is set for expiration-setting, then auto-expire-number-days or auto-expire-number-hours is mandatory.
auto-expire-timezone Optional, Alphanumeric (A-Za-z0-9) The timezone name. E.g. America/New_York. Use the long names listed in the Appendix. If “auto” is set for expiration-setting, then this field is mandatory.
auto-expire-roundoff-midnight Optional. Alphabetic (A-Za-z). Accepted Values: “true” or “false” If this is set to true, then the expiration timestamp calculated based on the number of days/hours will be rounded off to midnight. If not set, false will be considered by default.
barcode-type Mandatory, Alphabetic (A-Za-z). Accepted values: “QRCODE”, “AZTEC”, “PDF417”, or “CODE128” The barcode type for all Passes installed using this Pass Template.
barcode-value Optional, Alphanumeric (A-Za-z0-9) This is the default barcode value, which will be used for Passes if no value is provided.
autogenerate-barcode-values Optional, Alphabetic (A-Za-z). Accepted values: “True” or “False”. This field defines if the barcode values will be generated automatically for Passes.
autogenerate-barcode-value-type Optional, Alphabetic (A-Za-z). Accepted values: “Numeric”, “Alphabet”, or “Alphanumeric”. This field defines the type of barcode values that will be auto-generated for Passes if the autogenerate-barcode-values is set to “True”.
autogenerate-barcode-value-length Optional, Numeric (0-9). Accepted values: 10 – 100 This field defines the length of the auto-generated barcode value for Passes if the autogenerate-barcode-values is set to “True”.
relevant-locations Optional, Alphanumeric (a-zA-Z0-9)Format:
“latitude”:”COORDINATES”, “longitude”:”COORDINATES”, “relevant-text”:”RELEVANCE TEXT”
These fields are used to display text information for Passes, when the device that the Pass is installed on is detected at the relevant location. The locations are defined by the latitude/longitude co-ordinates. The relevant-text is the message displayed for Apple Wallet Passes. For Google Pay Passes, a predefined message is displayed.
disable-pass-sharing Optional, Alphabetic (A-Za-z). Accepted values: “True” or “False” This field defines if Passes installed for this Pass Template can be installed on multiple devices or not.
never-installed-ttl Optional, Numeric (0-9) This field sets the number of hours post which an uninstalled pass will be archived.
never-installed-archive-timestamp Optional, Numeric (0-9) This field, if set, defines the timestamp post which an uninstalled timestamp will be archived. This value will be considered if never-installed-ttl is also set.
expired-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which an expired pass will be archived.
redeemed-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which a redeemed pass will be archived.
voided-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which a voided pass will be archived.

Request: Loyalty Card Layout 1

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXXXXX

Request:
{
  	 "action": "createPassTemplate",
  	 "pass-template-type": "loyalty",
	 “pass-template-subtype” : “loyalty-card-type1”,
  	 "pass-template-name": "Pass Template Name",
	"appearance": {
   	 "program-logo": "IMAGE PATH",
   	 "program-logo-gpay": "IMAGE PATH",
   	 "card-issuer": "MERCHANT NAME",
   	 "strip-image": "IMAGE PATH",
   	 "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
   	 "loyalty-points-label": "LOYALTY POINTS LABEL",
   	 "loyalty-points": "LOYALTY POINTS VALUE",
   	 "program-name": "LOYALTY PROGRAM NAME",
   	 "secondary-loyalty-points-label": "SECONDARY LOYALTY POINTS LABEL",
   	 "secondary-loyalty-points": "SECONDARY LOYALTY POINTS VALUE",
   	 "account-name-label": "ACCOUNT NAME LABEL",
   	 "account-name": "ACCOUNT NAME VALUE",
   	 "account-id-label": "ACCOUNT ID LABEL",   
   	 "account-id": "ACCOUNT ID VALUE",    
   	 "rewards-tier-label": "REWARDS TIER LABEL",
   	 "rewards-tier": "REWARDS TIER VALUE",
     	 "message1-label": "MESSAGE 1 LABEL",
    	 "message1": "MESSAGE 1 TEXT",   	 
    	 "message2-label": "MESSAGE 2 LABEL",
    	 "message2": "MESSAGE 2 TEXT",
   	 "message3-label": "MESSAGE 3 LABEL",
    	 "message3": "MESSAGE 3 TEXT",
         "message4-label": "MESSAGE 4 LABEL",
       	 "message4": "MESSAGE 4 TEXT",   	 
    	 "message5-label": "MESSAGE 5 LABEL",
    	 "message5": "MESSAGE 5 TEXT",
   	 "message6-label": "MESSAGE 6 LABEL",
    	 "message6": "MESSAGE 6 TEXT",
	 "message7-label": "MESSAGE 7 LABEL",
    	 "message7": "MESSAGE 7 TEXT",   	 
    	 "message8-label": "MESSAGE 8 LABEL",
    	 "message8": "MESSAGE 8 TEXT",
         "message9-label": "MESSAGE 9 LABEL",
    	 "message9": "MESSAGE 9 TEXT",
         "message10-label": "MESSAGE 10 LABEL",
    	 "message10": "MESSAGE 10 TEXT",
    	 "text-module-label": "TEXT MODULE LABEL",
    	 "text-module": "TEXT MODULE VALUE",
    	 "info-module-label": "INFO MODULE LABEL",
    	 "info-module": "INFO MODULE VALUE",
    	 "home-page-uri-label": "TEXT FOR HOME PAGE URI",
    	 "home-page-uri": "HOME PAGE LINK",
  	 "link1-label": "TEXT FOR ADDITIONAL LINK 1",
    	 "link1": "ADDITIONAL LINK 1",
   	 "link1-type": "TYPE OF LINK",
  	 "link2-label": "TEXT FOR ADDITIONAL LINK 2",
  	 "link2": "ADDITIONAL LINK 2",
   	 "link2-type": "TYPE OF LINK"
    },
    "apple-wallet-fields": {
   	 "text-color": "COLOR HASH CODE",
   	 "description": "Pass description used for VoiceOver Information",
   	 "linked-apps": "COMMA SEPARATED LIST OF ITUNES STORE ID",
   	 "ibeacons": [{  
   		"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	   	"relevant-text":"RELEVANCE TEXT"
    	},
   	 {  
   	 	"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	 	"relevant-text":"RELEVANCE TEXT"
    	},
		 ]
    },
    "gpay-fields": {
   	 "additional-image": "ADDITIONAL IMAGE URL",
   	 "additional-image-text": "Image Description"
    },
    "expiration-fields" : {
        “expiration-setting” : “SETTING TYPE”,
        "expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME",
        “auto-expire-number-days” : “NUMBER OF DAYS POST AUTO EXPIRE PASSES”,
        “auto-expire-number-hours” : “NUMBER OF HOURS POST AUTO EXPIRE PASSES”, 
        “auto-expire-timezone” : “VALID TIMEZONE NAME”,
        “auto-expire-roundoff-midnight” : false,
    },
    "barcode-fields": {
   	 "barcode-type": "BARCODE TYPE",
   	 "barcode-value": "DEFAULT BARCODE VALUE",    
   	 "autogenerate-barcode-values":true, // boolean
   	 "autogenerate-barcode-value-type": "VALUE TYPE FOR AUTO GENERATED BARCODES",
   	 "autogenerate-barcode-value-length": "LENGTH OF AUTO GENERATED BARCODE VALUES"
    },
    "relevant-locations": [{
    	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
},
	{
   	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
	},
	. . .
	],
    "disable-pass-sharing":"TRUE OR FALSE",
    "pass-data-archive-settings": {
   	 "never-installed-ttl":"NUMBER OF HOURS POST WHICH PASS RECORDS WILL BE ARCHIVED IF NOT INSTALLED", //either this or below option can bet set
   	 "never-installed-archive-timestamp": "TIMESTAMP WHEN NON INSTALLED PASS RECORDS ARE TO BE ARCHIVED",
   	 "expired-pass-ttl": "NUMBER OF HOURS POST WHICH EXPIRED PASSES WILL BE ARCHIVED",
   	 "redeemed-pass-ttl": "NUMBER OF HOURS POST WHICH REDEEMED PASSES WILL BE ARCHIVED",
   	 "voided-pass-ttl": "NUMBER OF HOURS POST WHICH VOIDED PASSES WILL BE ARCHIVED"
    }
}

Request Example: Loyalty Card Layout 1

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{ 
    "action":"createPassTemplate",
    "pass-template-type":"loyalty",
    “pass-template-subtype” : “loyalty-card-type1”,
    "pass-template-name":"Loyalty card-5",
    "appearance":{ 
        "program-logo":"https://fake-content-url.com/program-logo.png",
        "program-logo-gpay":"https://fake-content-url.com/program-logo-gpay.png",
        "card-issuer":"Loyal-1",
        "strip-image":"https://fake-content-url.com/strip-image.png",
        "background-color":"#030000"
    },
    "universal-fields":{ 
        "loyalty-points-label":"Policy Number",
        "loyalty-points":"236502",
        "program-name":"Skycore Auto",
        "secondary-loyalty-points-label":"Valid Until",
        "secondary-loyalty-points":"10-22-2020",
        "account-name-label":"Insured",
        "account-name":"JOY",
        "account-id-label":"Owner",
        "account-id":"James",
        "rewards-tier-label":"Effective",
        "rewards-tier":"10/01/2018",
        "message1-label":"Vehicle Covered",
        "message1":"2012 Jeep Liberty Unlimited VIN:00279021",
        "message2-label":"Agent",
        "message2":"Matt Johnson Fake Address",
        "message3-label":"NAIC Number",
        "message3":"213213",
        "text-module-label":"Disclaimer",
        "text-module":"This insurance card was created for demo purposes only.",
        "info-module-label":"Check up center",
        "info-module":"Fake Address",
        "home-page-uri-label":"online website",
        "home-page-uri":"https://fake-home-page-uri.com",
        "link1-label":"Link-1",
        "link1":"fake.email@email.com",
        "link1-type":"email",
        "link2-label":"phone",
        "link2":"10000000000",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"",
        "description":"Pass wallet by skycore",
        "linked-apps":"123213",
        "ibeacons":[ 
            { 
                "proximity-uuid":"233233",
                "major":"123123",
                "minor":"34234",
                "relevant-text":"Come use your card"
            },
            { 
                "proximity-uuid":"2112312",
                "major":"23232",
                "minor":"231321",
                "relevant-text":"Come use your card!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2020 6:00 PM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"CODE128",
        "barcode-value":"123123",
        "autogenerate-barcode-values":true,
        "autogenerate-barcode-value-type":"Alphabet",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "latitude":"32.22",
            "longitude":"45.89",
            "relevant-text":"Come use your card!"
        },
        { 
            "latitude":"45.63",
            "longitude":"74.32",
            "relevant-text":"Come use your card!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"1",
        "never-installed-archive-timestamp":"2/1/2020 11:19 AM",
        "expired-pass-ttl":"1",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
    }
}

Response Success Example: Loyalty Card Layout 1

{ 
    "status":"Success",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Failure Example: Loyalty Card Layout 1

{ 
    "status":"Failure",
    "error-code":"E922",
    "error-message":"The link1-type value is invalid."
}

UpdatePassTemplate Layout 1 #

The UpdatePassTemplate API is used to update an existing Pass Template for a loyalty card layout 1 Pass. The param: pass-update-notification is used to display an update notification on already installed passes, when static data is updated on the template. This param is optional and alphanumeric (A-Za-z0-9).

Request: Loyalty Card Layout 1

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
  	 "action": "updatePassTemplate",
  	 "pass-template-type": "loyalty",
  	 "pass-template-name": "Pass Template Name",
	"appearance": {
   	 "program-logo": "IMAGE PATH",
   	 "program-logo-gpay": "IMAGE PATH",
   	 "card-issuer": "MERCHANT NAME",
   	 "strip-image": "IMAGE PATH",
   	 "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
   	 "loyalty-points-label": "LOYALTY POINTS LABEL",
   	 "loyalty-points": "LOYALTY POINTS VALUE",
   	 "program-name": "LOYALTY PROGRAM NAME",
   	 "secondary-loyalty-points-label": "SECONDARY LOYALTY POINTS LABEL",
   	 "secondary-loyalty-points": "SECONDARY LOYALTY POINTS VALUE",
   	 "account-name-label": "ACCOUNT NAME LABEL",
   	 "account-name": "ACCOUNT NAME VALUE",
   	 "account-id-label": "ACCOUNT ID LABEL",   
   	 "account-id": "ACCOUNT ID VALUE",    
   	 "rewards-tier-label": "REWARDS TIER LABEL",
   	 "rewards-tier": "REWARDS TIER VALUE",
     	 "message1-label": "MESSAGE 1 LABEL",
    	 "message1": "MESSAGE 1 TEXT",   	 
    	 "message2-label": "MESSAGE 2 LABEL",
    	 "message2": "MESSAGE 2 TEXT",
   	 "message3-label": "MESSAGE 3 LABEL",
    	 "message3": "MESSAGE 3 TEXT",
         "message4-label": "MESSAGE 4 LABEL",
       	 "message4": "MESSAGE 4 TEXT",   	 
    	 "message5-label": "MESSAGE 5 LABEL",
    	 "message5": "MESSAGE 5 TEXT",
   	 "message6-label": "MESSAGE 6 LABEL",
    	 "message6": "MESSAGE 6 TEXT",
	 "message7-label": "MESSAGE 7 LABEL",
    	 "message7": "MESSAGE 7 TEXT",   	 
    	 "message8-label": "MESSAGE 8 LABEL",
    	 "message8": "MESSAGE 8 TEXT",
         "message9-label": "MESSAGE 9 LABEL",
    	 "message9": "MESSAGE 9 TEXT",
         "message10-label": "MESSAGE 10 LABEL",
    	 "message10": "MESSAGE 10 TEXT",
    	 "text-module-label": "TEXT MODULE LABEL",
    	 "text-module": "TEXT MODULE VALUE",
    	 "info-module-label": "INFO MODULE LABEL",
    	 "info-module": "INFO MODULE VALUE",
    	 "home-page-uri-label": "TEXT FOR HOME PAGE URI",
    	 "home-page-uri": "HOME PAGE LINK",
  	 "link1-label": "TEXT FOR ADDITIONAL LINK 1",
    	 "link1": "ADDITIONAL LINK 1",
   	 "link1-type": "TYPE OF LINK",
  	 "link2-label": "TEXT FOR ADDITIONAL LINK 2",
  	 "link2": "ADDITIONAL LINK 2",
   	 "link2-type": "TYPE OF LINK"
    },
    "apple-wallet-fields": {
   	 "text-color": "COLOR HASH CODE",
   	 "description": "Pass description used for VoiceOver Information",
   	 "linked-apps": "COMMA SEPARATED LIST OF ITUNES STORE ID",
   	 "ibeacons": [{  
                "key":"ibeacon-1",
   		"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	   	"relevant-text":"RELEVANCE TEXT"
    	},
   	 {  
                "key":"ibeacon-2",
   	 	"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	 	"relevant-text":"RELEVANCE TEXT"
    	},
		 ]
    },
    "gpay-fields": {
   	 "additional-image": "ADDITIONAL IMAGE URL",
   	 "additional-image-text": "Image Description"
    },
    "expiration-fields" : {
        “expiration-setting” : “SETTING TYPE”,
        "expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME",
        “auto-expire-number-days” : “NUMBER OF DAYS POST AUTO EXPIRE PASSES”,
        “auto-expire-number-hours” : “NUMBER OF HOURS POST AUTO EXPIRE PASSES”, 
        “auto-expire-timezone” : “VALID TIMEZONE NAME”,
        “auto-expire-roundoff-midnight” : false,
    },
    "barcode-fields": {
   	 "barcode-type": "BARCODE TYPE",
   	 "barcode-value": "DEFAULT BARCODE VALUE",    
   	 "autogenerate-barcode-values":true, // boolean
   	 "autogenerate-barcode-value-type": "VALUE TYPE FOR AUTO GENERATED BARCODES",
   	 "autogenerate-barcode-value-length": "LENGTH OF AUTO GENERATED BARCODE VALUES"
    },
	"relevant-locations": [{
              "key":"relevant-1",
    	      "latitude":"COORDINATES",
    	      "longitude":"COORDINATES",
    	      "relevant-text":"RELEVANCE TEXT"
	},
	{
              "key":"relevant-2",
   	      "latitude":"COORDINATES",
    	      "longitude":"COORDINATES",
    	      "relevant-text":"RELEVANCE TEXT"
	},
	. . .
	],
    "disable-pass-sharing":"TRUE OR FALSE",
    "pass-data-archive-settings": {
   	 "never-installed-ttl":"NUMBER OF HOURS POST WHICH PASS RECORDS WILL BE ARCHIVED IF NOT INSTALLED",
   	 "never-installed-archive-timestamp": "TIMESTAMP WHEN NON INSTALLED PASS RECORDS ARE TO BE ARCHIVED",
   	 "expired-pass-ttl": "NUMBER OF HOURS POST WHICH EXPIRED PASSES WILL BE ARCHIVED",
   	 "redeemed-pass-ttl": "NUMBER OF HOURS POST WHICH REDEEMED PASSES WILL BE ARCHIVED",
   	 "voided-pass-ttl": "NUMBER OF HOURS POST WHICH VOIDED PASSES WILL BE ARCHIVED"
     },
    “pass-update-notification” : “UPDATE NOTIFICATION MESSAGE”
}

Request Example: Loyalty Card Layout 1

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{ 
    "action":"updatePassTemplate",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "appearance":{ 
        "program-logo":"https://fake-content-url.com/program-logo.png",
        "program-logo-gpay":"https://fake-content-url.com/program-logo-gpay.png",
        "card-issuer":"Loyal-1",
        "strip-image":"https://fake-content-url.com/strip-image.png",
        "background-color":"#030000"
    },
    "universal-fields":{ 
        "loyalty-points-label":"Policy Number",
        "loyalty-points":"236502",
        "program-name":"Skycore Auto",
        "secondary-loyalty-points-label":"Valid Until",
        "secondary-loyalty-points":"10-22-2020",
        "account-name-label":"Insured",
        "account-name":"JOY",
        "account-id-label":"Owner",
        "account-id":"James",
        "rewards-tier-label":"Effective",
        "rewards-tier":"10/01/2018",
        "message1-label":"Vehicle Covered",
        "message1":"2012 Jeep Liberty Unlimited VIN:00279021",
        "message2-label":"Agent",
        "message2":"Matt Johnson Fake Addresss",
        "message3-label":"NAIC Number",
        "message3":"213213",
        "text-module-label":"Disclaimer",
        "text-module":"This insurance card was created for demo purposes only.",
        "info-module-label":"Check up center",
        "info-module":"Fake Address",
        "home-page-uri-label":"online website",
        "home-page-uri":"https://fake-home-page-uri.com",
        "link1-label":"Link-1",
        "link1":"fake.email@email.com",
        "link1-type":"email",
        "link2-label":"phone",
        "link2":"10000000000",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"",
        "description":"Pass wallet by skycore",
        "linked-apps":"123213",
        "ibeacons":[ 
            { 
                "key":"ibeacon-1",
                "proximity-uuid":"233233",
                "major":"123123",
                "minor":"34234",
                "relevant-text":"Come use your card"
            },
            { 
                "key":"ibeacon-2",
                "proximity-uuid":"2112312",
                "major":"23232",
                "minor":"231321",
                "relevant-text":"Come use your card!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2020 6:00 PM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"CODE128",
        "barcode-value":"123123",
        "autogenerate-barcode-values":true,
        "autogenerate-barcode-value-type":"Alphabet",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "key":"relevant-1",
            "latitude":"32.22",
            "longitude":"45.89",
            "relevant-text":"Come use your card!"
        },
        { 
            "key":"relevant-2",
            "latitude":"45.63",
            "longitude":"74.32",
            "relevant-text":"Come use your card!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"1",
        "never-installed-archive-timestamp":"2/1/2020 11:19 AM",
        "expired-pass-ttl":"1",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
     },
    “pass-update-notification” : “Your Pass has been updated.”
}

Response Success Example: Loyalty Card Layout 1

{ 
    "status":"Success",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Failure Example: Loyalty Card Layout 1

{ 
    "status":"Failure",
    "error-code":"E922",
    "error-message":"The link1-type value is invalid."
}

CreatePassTemplate Layout 2 #

The CreatePassTemplate API is used to create a Pass Template for a loyalty card layout 2 Pass. The following table provides a detailed description of certain variables that can be used in each API call to create or update Pass Templates for layout 2 loyalty cards. The required params for a loyalty card layout 2 Pass Template are: action, api-key, pass-template-type, pass-template-subtype, pass-template-name, card-issuer, background-color, program-logo, program-logo-gpay, program-name, barcode-type, text-color, description

Params/Variables Format Description
action Mandatory, Alphabetic (a-zA-Z) This is the name of the function you want to execute with the API.
x-api-key Mandatory, Alphanumeric (a-zA-Z0-9), Case-Sensitive.
This is set in the request header param.
This is a random key that is assigned to an account and can be used for authorization. You can find and regenerate this key on the ‘API Settings’ page.
pass-template-type Mandatory. The expected value is “loyalty” This defines the type of Pass that will be used for creating the Pass Template.
pass-template-subtype Mandatory. The expected value is “loyalty-card-type2” This defines the sub type for the Loyalty Card Template.
pass-template-name Mandatory. Alphanumeric (A-Za-z0-9) This is used as an internal name to identify the Pass Template.
program-logo Mandatory, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only This PNG image is used only for Apple Wallet Passes. Rectangular images are required
program-logo-gpay Mandatory, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only This PNG image is used only for Google passes. Circular images are preferred. Any image that is not circular will be masked into a circular image.
card-issuer Mandatory, Alphanumeric (A-Za-z0-9) This is the card-issuer for the loyalty card. If “program-logo” is set then this value won’t be displayed on Apple Wallet Passes.
strip-image Optional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images only The strip image is displayed below the logo and Merchant Name on both Apple Wallet and Google Pay Passes, as a rectangular image across the middle of the Pass.
background-color Mandatory, Numeric (0-9). 6 digit hexadecimal color code preceded by hash “#” This value defines the background color of the Pass, for both Apple Wallet and Google Pay Passes.
dynamic-pass-field-1 Optional, Alphanumeric (A-Za-z0-9)

Acceptable values are:
account-name, account-id, loyalty-points, secondary-loyalty-points, expiration-timestamp, current-timestamp, custom-field-1, custom-field-2, custom-field-3

This defines the first dynamic field that will be displayed on front of the pass.
dynamic-pass-field-2 Optional, Alphanumeric (A-Za-z0-9)
Acceptable values are:
account-name, account-id, loyalty-points, secondary-loyalty-points, expiration-timestamp, current-timestamp, custom-field-1, custom-field-2, custom-field-3
This defines the second dynamic field that will be displayed on front of the pass.
dynamic-pass-field-3 Optional, Alphanumeric (A-Za-z0-9)
Acceptable values are:
account-name, account-id, loyalty-points, secondary-loyalty-points, expiration-timestamp, current-timestamp, custom-field-1, custom-field-2, custom-field-3
This defines the third dynamic field that will be displayed on front of the pass.
dynamic-pass-field-4 Optional, Alphanumeric (A-Za-z0-9)
Acceptable values are:
account-name, account-id, loyalty-points, secondary-loyalty-points, expiration-timestamp, current-timestamp, custom-field-1, custom-field-2, custom-field-3
This defines the fourth dynamic field that will be displayed on front of the pass.
loyalty-points-label Optional, Alphanumeric (A-Za-z0-9) The label for the loyalty-points field. If not set, but a loyalty-points is provided, then a default value “POINTS” will be used on the Pass.
loyalty-points Optional, Alphanumeric (A-Za-z0-9) The loyalty points associated with the loyalty card. This value is used to generate a static Pass.
program-name Mandatory, Alphanumeric (A-Za-z0-9) The loyalty program name.
secondary-loyalty-points-label Optional, Alphanumeric (A-Za-z0-9) The label for the secondary-loyalty-points field. If not set, but a secondary-loyalty-points value is provided, then a default value “REWARDS” will be used on the Pass.
secondary-loyalty-points Optional, Alphanumeric (A-Za-z0-9) The secondary loyalty points associated with the loyalty card. This value is used to generate a static Pass.
account-name-label Optional, Alphanumeric (A-Za-z0-9) The label for the account-name field. If not set, but an account-name value is provided, then a default value “MEMBER NAME” will be used on the Pass.
account-name Optional, Alphanumeric (A-Za-z0-9) The account name associated with the loyalty card. This value is used to generate a static Pass.
account-id-label Optional, Alphanumeric (A-Za-z0-9) The label for account-id field. If not set, but an account-id value is provided, then a default value “MEMBER ID” will be used on the Pass.
account-id Optional, Alphanumeric (A-Za-z0-9) The account id associated with the loyalty card. This value is used to generate a static Pass.
expiration-timestamp-label Optional, Alphanumeric (A-Za-z0-9) The label for the expiration timestamp of the pass which will be displayed on the front of the pass, if “expiration-timestamp” field is set for any one of the “dynamic-pass-field-n”
expiration-timestamp-display-time Optional. Accepts “true” or “false” If this is set to “true”, then the expiration timestamp displayed on the pass (if “expiration-timestamp” field is set for any one of the “dynamic-pass-field-n”) will show the time. If this is set to “false”, only the date will be displayed.
current-timestamp-label Optional, Alphanumeric (A-Za-z0-9) The label for the current timestamp which will be displayed on front of the pass, if “current-timestamp” field is set for any one of the “dynamic-pass-field-n”
current-timestamp-display-time Optional. Accepts “true” or “false” If this is set to “true”, then the expiration timestamp displayed on the pass (if “current-timestamp” field is set for any one of the “dynamic-pass-field-n”) will show the time. If this is set to “false”, only the date will be displayed.
current-timestamp-timezone Optional, Alphanumeric (A-Za-z0-9) The timezone name. E.g. America/New_York. Use the long names listed in section 1 of the Appendix. This is only applicable if “current-timestamp” field is set for any one of the “dynamic-pass-field-n”.
custom-field-1-label Optional, Alphanumeric (A-Za-z0-9) The label for custom field 1. This is only applicable if “custom-field-1” is set for any one of the “dynamic-pass-field-n”.
custom-field-1 Optional, Alphanumeric (A-Za-z0-9) The field value for custom field 1. This is only applicable if “custom-field-1” is set for any one of the “dynamic-pass-field-n”.
custom-field-2-label Optional, Alphanumeric (A-Za-z0-9) The label for custom field 2. This is only applicable if “custom-field-2” is set for any one of the “dynamic-pass-field-n”.
custom-field-2 Optional, Alphanumeric (A-Za-z0-9) The field value for custom field 2. This is only applicable if “custom-field-2” is set for any one of the “dynamic-pass-field-n”.
custom-field-3-label Optional, Alphanumeric (A-Za-z0-9) The label for custom field 3. This is only applicable if “custom-field-3” is set for any one of the “dynamic-pass-field-n”.
custom-field-3 Optional, Alphanumeric (A-Za-z0-9) The field value for custom field 3. This is only applicable if “custom-field-3” is set for any one of the “dynamic-pass-field-n”.
rewards-tier-label Optional, Alphanumeric (A-Za-z0-9) The label for the rewards-tier field. If not set, but an account-id value is provided, then a default value “REWARDS TIER” will be used on the Pass.
rewards-tier Optional, Alphanumeric (A-Za-z0-9) The rewards tier for the loyalty card.
message1-label Optional, Alphanumeric (A-Za-z0-9) The label for the message1 field.
message1 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message2-label Optional, Alphanumeric (A-Za-z0-9) The label for the message2 field.
message2 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message3-label Optional, Alphanumeric (A-Za-z0-9) The label for the message3 field.
message3 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message4-label Optional, Alphanumeric (A-Za-z0-9) The label for the message4 field.
message4 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message5-label Optional, Alphanumeric (A-Za-z0-9) The label for the message5 field.
message5 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message6-label Optional, Alphanumeric (A-Za-z0-9) The label for the message6 field.
message6 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message7-label Optional, Alphanumeric (A-Za-z0-9) The label for the message7 field.
message7 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message8-label Optional, Alphanumeric (A-Za-z0-9) The label for the message8 field.
message8 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message9-label Optional, Alphanumeric (A-Za-z0-9) The label for the message9 field.
message9 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
message10-label Optional, Alphanumeric (A-Za-z0-9) The label for the message10 field.
message10 Optional, Alphanumeric (A-Za-z0-9) This field is used to display any message. It is displayed on the back of the Apple Wallet Pass and below the Google Pay Pass.
text-module-label Optional, Alphanumeric (A-Za-z0-9) The label for the text-module field.
text-module-label Optional, Alphanumeric (A-Za-z0-9) The label for the text-module field.
text-module Optional, Alphanumeric (A-Za-z0-9) This field is also used to display any message like the message fields. It is displayed on the back of Apple Wallet Pass, and below the Pass for Google Pay.
info-module-label Optional, Alphanumeric (A-Za-z0-9) The label for the info-module field.
info-module Optional, Alphanumeric (A-Za-z0-9) This field is also used to display any message like the message fields. It is displayed on the back of Apple Wallet Pass, and below the Pass for Google Pay. When the Pass Status is updated, this field value is updated with the appropriate message reflecting the status.
home-page-uri-label Optional, Alphanumeric (A-Za-z0-9) The label for the home page URI.
home-page-uri Optional, Alphanumeric (A-Za-z0-9) This field is used to display any web page link which may contain any additional information about the Passes. The links are clickable on both Apple Wallet and Google Pay Passes and will open in a browser.
link1-label Optional, Alphanumeric (A-Za-z0-9) The label for the link1 field.
link1-type Optional, Alphabetic (A-Za-z). Accepted values: “email”, “geo-location”, “map-link”, “phone”, or “web-link” This field specifies what the type of link will be for link1 field value.
link1 Optional, Alphanumeric (A-Za-z0-9) Based on the value provided in the link1-type field, this field can have an email id, a geolocation, a google map link, a phone number or a web link. The value will be validated based on the type set in the link1-type field. On Google Pay Passes, an icon will be displayed beside the field value to identify the type of field. E.g. the map link/geolocation will have a map icon.
link2-label Optional, Alphanumeric (A-Za-z0-9) The label for the link2 field.
link2-type Optional, Alphabetic (A-Za-z). Accepted values: “email”, “geo-location”, “map-link”, “phone”, or “web-link” This field specifies what the type of link will be for link2 field value.
link2 Optional, Alphanumeric (A-Za-z0-9) Based on the value provided in the link2-type field, this field can have an email id, geolocation, a google map link, a phone number or a web link. The value will be validated based on the type set in the link2-type field. On Google Pay Passes, an icon will be displayed beside the field value to identify the type of field. E.g. the map link/geolocation will have a map icon.
text-color Mandatory, Numeric (0-9). 6 digit hexadecimal color code preceded by hash “#” This value defines the text color for Apple Wallet Passes only. Google controls the color for the values displayed on the Google Pay Pass, which is either black or white, based on the background color of the Pass.
description Mandatory, Alphanumeric (A-Za-z0-9) This field provides a description for the pass, which is used as a voice-over to describe Passes for blind or low vision users for Apple Wallet Passes only.
linked-apps Optional, Alphanumeric (A-Za-z0-9) This is a comma-separated list of iTunes apps, which are displayed on the back of the apple passes.
ibeacons Optional, Alphanumeric (A-Za-z0-9).Format:
“proximity-uuid”:”UUID VALUE”,
“major”:”MAJOR VALUE”,
“minor”:”MINOR VALUE”, “relevant-text”:”RELEVANCE TEXT”
ibeacons are only applicable for Apple Wallet Passes. They are used to display messages on the lock screens of IOS mobile devices based on the values set.
additional-image Optional, Alphanumeric (A-Za-z0-9). Web URL This image is displayed only on Google Pay Passes, in the area below the pass in between the additional details.
additional-image-text Optional, Alphanumeric (A-Za-z0-9) This value provides information that is linked to the additional image.
expiration-setting Optional. Alphabetic (A-Za-z). Accepted Values: “default” or “auto” If this is not set and expiry-date is set, then “default” will be considered by default.
expiry-date Optional, Alphanumeric (A-Za-z0-9)Format:
mm/dd/yyyy hour:min AM/PM
The date/time value for the Pass expiration, if not set specifically for individual Passes.
expiration-timezone Optional, Alphanumeric (A-Za-z0-9) The timezone name. E.g. America/New_York. Use the long names listed in the Appendix.
auto-expire-number-days Optional, Numeric (0-9) This is the number of days post install to expire passes. If “auto” is set for expiration-setting, then auto-expire-number-days or auto-expire-number-hours is mandatory.
auto-expire-number-hours Optional, Numeric (0-9) This is the number of hours post install to expire passes. If “auto” is set for expiration-setting, then auto-expire-number-days or auto-expire-number-hours is mandatory.
auto-expire-timezone Optional, Alphanumeric (A-Za-z0-9) The timezone name. E.g. America/New_York. Use the long names listed in the Appendix. If “auto” is set for expiration-setting, then this field is mandatory.
auto-expire-roundoff-midnight Optional. Alphabetic (A-Za-z). Accepted Values: “true” or “false” If this is set to true, then the expiration timestamp calculated based on the number of days/hours will be rounded off to midnight. If not set, false will be considered by default.
barcode-type Mandatory, Alphabetic (A-Za-z). Accepted values: “QRCODE”, “AZTEC”, “PDF417”, or “CODE128” The barcode type for all Passes installed using this Pass Template.
barcode-value Optional, Alphanumeric (A-Za-z0-9) This is the default barcode value, which will be used for Passes if no value is provided.
autogenerate-barcode-values Optional, Alphabetic (A-Za-z). Accepted values: “True” or “False”. This field defines if the barcode values will be generated automatically for Passes.
autogenerate-barcode-value-type Optional, Alphabetic (A-Za-z). Accepted values: “Numeric”, “Alphabet”, or “Alphanumeric”. This field defines the type of barcode values that will be auto-generated for Passes if the autogenerate-barcode-values is set to “True”.
autogenerate-barcode-value-length Optional, Numeric (0-9). Accepted values: 10 – 100 This field defines the length of the auto-generated barcode value for Passes if the autogenerate-barcode-values is set to “True”.
relevant-locations Optional, Alphanumeric (a-zA-Z0-9)Format:
“latitude”:”COORDINATES”, “longitude”:”COORDINATES”, “relevant-text”:”RELEVANCE TEXT”
These fields are used to display text information for Passes, when the device that the Pass is installed on is detected at the relevant location. The locations are defined by the latitude/longitude co-ordinates. The relevant-text is the message displayed for Apple Wallet Passes. For Google Pay Passes, a predefined message is displayed.
disable-pass-sharing Optional, Alphabetic (A-Za-z). Accepted values: “True” or “False” This field defines if Passes installed for this Pass Template can be installed on multiple devices or not.
never-installed-ttl Optional, Numeric (0-9) This field sets the number of hours post which an uninstalled pass will be archived.
never-installed-archive-timestamp Optional, Numeric (0-9) This field, if set, defines the timestamp post which an uninstalled timestamp will be archived. This value will be considered if never-installed-ttl is also set.
expired-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which an expired pass will be archived.
redeemed-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which a redeemed pass will be archived.
voided-pass-ttl Optional, Numeric (0-9) This field sets the number of hours post which a voided pass will be archived.

Request: Loyalty Card Layout 2

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXX

Request:
{
  	 "action": "createPassTemplate",
  	 "pass-template-type": "loyalty",
	 “pass-template-subtype” : “loyalty-card-type2”,
  	 "pass-template-name": "Pass Template Name",
	 "appearance": {
   	   "program-logo": "IMAGE PATH",
   	   "program-logo-gpay": "IMAGE PATH",
   	   "card-issuer": "MERCHANT NAME",
   	   "strip-image": "IMAGE PATH",
   	   "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
   	 "program-name": "LOYALTY PROGRAM NAME",
   	 "loyalty-points-label": "LOYALTY POINTS LABEL",
   	 "loyalty-points": "LOYALTY POINTS VALUE",
    	 "dynamic-pass-field-1" : "",
    	 "dynamic-pass-field-2" : "",
    	 "dynamic-pass-field-3" : "",
    	 "dynamic-pass-field-4" : "",   	
   	 "secondary-loyalty-points-label": "SECONDARY LOYALTY POINTS LABEL",
   	 "secondary-loyalty-points": "SECONDARY LOYALTY POINTS VALUE",
   	 "account-name-label": "ACCOUNT NAME LABEL",
   	 "account-name": "ACCOUNT NAME VALUE",
   	 "account-id-label": "ACCOUNT ID LABEL",   
   	 "account-id": "ACCOUNT ID VALUE",    
	 "expiration-timestamp-label" : "EXPIRATION TIMESTAMP LABEL",
	 "expiration-timestamp-display-time" : true,
	 "current-timestamp-label" : "CURRENT TIMESTAMP LABEL",
	 "current-timestamp-display-time" : true,
	 "current-timestamp-timezone" : "VALID TIMEZONE NAME",
	 "custom-field-1-label" : "CUSTOM FIELD 1 LABEL",
	 "custom-field-1" : "CUSTOM FIELD 1 VALUE",
	 "custom-field-2-label" : "CUSTOM FIELD 2 LABEL",
	 "custom-field-2" : "CUSTOM FIELD 2 VALUE",
	 "custom-field-3-label" : "CUSTOM FIELD 3 LABEL",
	 "custom-field-3" : "CUSTOM FIELD 3 VALUE",
   	 "rewards-tier-label": "REWARDS TIER LABEL",
   	 "rewards-tier": "REWARDS TIER VALUE",
     	 "message1-label": "MESSAGE 1 LABEL",
    	 "message1": "MESSAGE 1 TEXT",   	 
    	 "message2-label": "MESSAGE 2 LABEL",
    	 "message2": "MESSAGE 2 TEXT",
   	 "message3-label": "MESSAGE 3 LABEL",
    	 "message3": "MESSAGE 3 TEXT",
         "message4-label": "MESSAGE 4 LABEL",
       	 "message4": "MESSAGE 4 TEXT",   	 
    	 "message5-label": "MESSAGE 5 LABEL",
    	 "message5": "MESSAGE 5 TEXT",
   	 "message6-label": "MESSAGE 6 LABEL",
    	 "message6": "MESSAGE 6 TEXT",
	 "message7-label": "MESSAGE 7 LABEL",
    	 "message7": "MESSAGE 7 TEXT",   	 
    	 "message8-label": "MESSAGE 8 LABEL",
    	 "message8": "MESSAGE 8 TEXT",
         "message9-label": "MESSAGE 9 LABEL",
    	 "message9": "MESSAGE 9 TEXT",
         "message10-label": "MESSAGE 10 LABEL",
    	 "message10": "MESSAGE 10 TEXT",
    	 "text-module-label": "TEXT MODULE LABEL",
    	 "text-module": "TEXT MODULE VALUE",
    	 "info-module-label": "INFO MODULE LABEL",
    	 "info-module": "INFO MODULE VALUE",
    	 "home-page-uri-label": "TEXT FOR HOME PAGE URI",
    	 "home-page-uri": "HOME PAGE LINK",
  	 "link1-label": "TEXT FOR ADDITIONAL LINK 1",
    	 "link1": "ADDITIONAL LINK 1",
   	 "link1-type": "TYPE OF LINK",
  	 "link2-label": "TEXT FOR ADDITIONAL LINK 2",
  	 "link2": "ADDITIONAL LINK 2",
   	 "link2-type": "TYPE OF LINK"
    },
    "apple-wallet-fields": {
   	 "text-color": "COLOR HASH CODE",
   	 "description": "Pass description used for VoiceOver Information",
   	 "linked-apps": "COMMA SEPARATED LIST OF ITUNES STORE ID",
   	 "ibeacons": [{  
   		"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	   	"relevant-text":"RELEVANCE TEXT"
    	},
   	 {  
   	 	"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	 	"relevant-text":"RELEVANCE TEXT"
    	},
    	. . .
		 ]
    },
    "gpay-fields": {
   	 "additional-image": "ADDITIONAL IMAGE URL",
   	 "additional-image-text": "Image Description"
    },
    "expiration-fields": {
    	“expiration-setting” : “SETTING TYPE”,
       	"expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME",
        “auto-expire-number-days” : “NUMBER OF DAYS POST AUTO EXPIRE PASSES”,
        “auto-expire-number-hours” : “NUMBER OF HOURS POST AUTO EXPIRE PASSES”, 
        “auto-expire-timezone” : “VALID TIMEZONE NAME”,
        “auto-expire-roundoff-midnight” : false,
    },
    "barcode-fields": {
   	 "barcode-type": "BARCODE TYPE",
   	 "barcode-value": "DEFAULT BARCODE VALUE",    
   	 "autogenerate-barcode-values":true,
   	 "autogenerate-barcode-value-type": "VALUE TYPE FOR AUTO GENERATED BARCODES",
   	 "autogenerate-barcode-value-length": "LENGTH OF AUTO GENERATED BARCODE VALUES"
    },
    "relevant-locations": [{
    	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
},
{
   	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
	},
	. . .
	],
    "disable-pass-sharing":true,
    "pass-data-archive-settings": {
   	 "never-installed-ttl":"NUMBER OF HOURS POST WHICH PASS RECORDS WILL BE ARCHIVED IF NOT INSTALLED",
   	 "never-installed-archive-timestamp": "TIMESTAMP WHEN NON INSTALLED PASS RECORDS ARE TO BE ARCHIVED",
   	 "expired-pass-ttl": "NUMBER OF HOURS POST WHICH EXPIRED PASSES WILL BE ARCHIVED",
   	 "redeemed-pass-ttl": "NUMBER OF HOURS POST WHICH REDEEMED PASSES WILL BE ARCHIVED",
   	 "voided-pass-ttl": "NUMBER OF HOURS POST WHICH VOIDED PASSES WILL BE ARCHIVED"
    }
}

Request Example: Loyalty Card Layout 2

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{ 
    "action":"createPassTemplate",
    "pass-template-type":"loyalty",
    “pass-template-subtype” : “loyalty-card-type2”,
    "pass-template-name":"Loyalty card-5",
    "appearance":{ 
        "program-logo":"https://fake-content-url.com/program-logo.png",
        "program-logo-gpay":"https://fake-content-url.com/program-logo-gpay.png",
        "card-issuer":"Loyal-1",
        "strip-image":"https://fake-content-url.com/strip-image.png",
        "background-color":"#030000"
    },
    "universal-fields":{ 
         "dynamic-pass-field-1" : "expiration-timestamp", 
         "dynamic-pass-field-2" : "custom-field-1", 
         "dynamic-pass-field-3" : "custom-field-2",
        "dynamic-pass-field-4" : "custom-field-3",
        "loyalty-points-label":"Policy Number",
        "loyalty-points":"236502",
        "program-name":"Skycore Auto",
        "secondary-loyalty-points-label":"Valid Until",
        "secondary-loyalty-points":"10-22-2020",
        "account-name-label":"Insured",
        "account-name":"JOY",
        "account-id-label":"Owner",
        "account-id":"James",
        "expiration-timestamp-label" : "EXPIRES ON",  
        "expiration-timestamp-display-time" : true,
        "custom-field-1-label" : "LABEL 1", 
        "custom-field-1" : "VALUE 1", 
         "custom-field-2-label" : " LABEL 2", 
         "custom-field-2" : "VALUE 2", 
         "custom-field-3-label" : "LABEL 3", 
        "custom-field-3" : "VALUE 3",
        "rewards-tier-label":"Effective",
        "rewards-tier":"10/01/2018",
        "message1-label":"Vehicle Covered",
        "message1":"2012 Jeep Liberty Unlimited VIN:00279021",
        "message2-label":"Agent",
        "message2":"Matt Johnson Fake Address",
        "message3-label":"NAIC Number",
        "message3":"213213",
        "text-module-label":"Disclaimer",
        "text-module":"This insurance card was created for demo purposes only.",
        "info-module-label":"Check up center",
        "info-module":"Fake Address",
        "home-page-uri-label":"online website",
        "home-page-uri":"https://fake-home-page-uri.com",
        "link1-label":"Link-1",
        "link1":"fake.email@email.com",
        "link1-type":"email",
        "link2-label":"phone",
        "link2":"10000000000",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"",
        "description":"Pass wallet by skycore",
        "linked-apps":"123213",
        "ibeacons":[ 
            { 
                "proximity-uuid":"233233",
                "major":"123123",
                "minor":"34234",
                "relevant-text":"Come use your card"
            },
            { 
                "proximity-uuid":"2112312",
                "major":"23232",
                "minor":"231321",
                "relevant-text":"Come use your card!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2020 6:00 PM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"CODE128",
        "barcode-value":"123123",
        "autogenerate-barcode-values":true,
        "autogenerate-barcode-value-type":"Alphabet",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "latitude":"32.22",
            "longitude":"45.89",
            "relevant-text":"Come use your card!"
        },
        { 
            "latitude":"45.63",
            "longitude":"74.32",
            "relevant-text":"Come use your card!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"1",
        "never-installed-archive-timestamp":"2/1/2020 11:19 AM",
        "expired-pass-ttl":"1",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
    }
}

Response Success Example: Loyalty Card Layout 2

{ 
    "status":"Success",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Failure Example: Loyalty Card Layout 2

{ 
    "status":"Failure",
    "error-code":"E922",
    "error-message":"The link1-type value is invalid."
}

UpdatePassTemplate Layout 2 #

The UpdatePassTemplate API is used to update an existing Pass Template for a loyalty card layout 2 Pass. The param: pass-update-notification is used to display an update notification on already installed passes, when static data is updated on the template. This param is optional and alphanumeric (A-Za-z0-9).

Request: Loyalty Card Layout 2

Header: 
X-Api-Key : XXXXXXXXXXXXXXXXXXXXXXXXX

Request:
{
  	 "action": "UpdatePassTemplate",
  	 "pass-template-type": "loyalty",
  	 "pass-template-name": "Pass Template Name",
	"appearance": {
   	 "program-logo": "IMAGE PATH",
   	 "program-logo-gpay": "IMAGE PATH",
   	 "card-issuer": "MERCHANT NAME",
   	 "strip-image": "IMAGE PATH",
   	 "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
   	"program-name": "LOYALTY PROGRAM NAME",
   	 "loyalty-points-label": "LOYALTY POINTS LABEL",
   	 "loyalty-points": "LOYALTY POINTS VALUE",
    	 "dynamic-pass-field-1" : "",
    	 "dynamic-pass-field-2" : "",
    	 "dynamic-pass-field-3" : "",
    	 "dynamic-pass-field-4" : "",   	
   	 "secondary-loyalty-points-label": "SECONDARY LOYALTY POINTS LABEL",
   	 "secondary-loyalty-points": "SECONDARY LOYALTY POINTS VALUE",
   	 "account-name-label": "ACCOUNT NAME LABEL",
   	 "account-name": "ACCOUNT NAME VALUE",
   	 "account-id-label": "ACCOUNT ID LABEL",   
   	 "account-id": "ACCOUNT ID VALUE",    
	 "expiration-timestamp-label" : "EXPIRATION TIMESTAMP LABEL",
	 "expiration-timestamp-display-time" : true,
	 "current-timestamp-label" : "CURRENT TIMESTAMP LABEL",
	 "current-timestamp-display-time" : true,
	 "current-timestamp-timezone" : "VALID TIMEZONE NAME",
	 "custom-field-1-label" : "CUSTOM FIELD 1 LABEL",
	 "custom-field-1" : "CUSTOM FIELD 1 VALUE",
	 "custom-field-2-label" : "CUSTOM FIELD 2 LABEL",
	 "custom-field-2" : "CUSTOM FIELD 2 VALUE",
	 "custom-field-3-label" : "CUSTOM FIELD 3 LABEL",
	 "custom-field-3" : "CUSTOM FIELD 3 VALUE",
   	 "rewards-tier-label": "REWARDS TIER LABEL",
   	 "rewards-tier": "REWARDS TIER VALUE",
     	 "message1-label": "MESSAGE 1 LABEL",
    	 "message1": "MESSAGE 1 TEXT",   	 
    	 "message2-label": "MESSAGE 2 LABEL",
    	 "message2": "MESSAGE 2 TEXT",
   	 "message3-label": "MESSAGE 3 LABEL",
    	 "message3": "MESSAGE 3 TEXT",
         "message4-label": "MESSAGE 4 LABEL",
       	 "message4": "MESSAGE 4 TEXT",   	 
    	 "message5-label": "MESSAGE 5 LABEL",
    	 "message5": "MESSAGE 5 TEXT",
   	 "message6-label": "MESSAGE 6 LABEL",
    	 "message6": "MESSAGE 6 TEXT",
	 "message7-label": "MESSAGE 7 LABEL",
    	 "message7": "MESSAGE 7 TEXT",   	 
    	 "message8-label": "MESSAGE 8 LABEL",
    	 "message8": "MESSAGE 8 TEXT",
         "message9-label": "MESSAGE 9 LABEL",
    	 "message9": "MESSAGE 9 TEXT",
         "message10-label": "MESSAGE 10 LABEL",
    	 "message10": "MESSAGE 10 TEXT",
    	 "text-module-label": "TEXT MODULE LABEL",
    	 "text-module": "TEXT MODULE VALUE",
    	 "info-module-label": "INFO MODULE LABEL",
    	 "info-module": "INFO MODULE VALUE",
    	 "home-page-uri-label": "TEXT FOR HOME PAGE URI",
    	 "home-page-uri": "HOME PAGE LINK",
  	 "link1-label": "TEXT FOR ADDITIONAL LINK 1",
    	 "link1": "ADDITIONAL LINK 1",
   	 "link1-type": "TYPE OF LINK",
  	 "link2-label": "TEXT FOR ADDITIONAL LINK 2",
  	 "link2": "ADDITIONAL LINK 2",
   	 "link2-type": "TYPE OF LINK"
    },
    "apple-wallet-fields": {
   	 "text-color": "COLOR HASH CODE",
   	 "description": "Pass description used for VoiceOver Information",
   	 "linked-apps": "COMMA SEPARATED LIST OF ITUNES STORE ID",
   	 "ibeacons": [{  
                "key":"ibeacon-1",
   		"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	   	"relevant-text":"RELEVANCE TEXT"
    	},
   	 {  
                "key":"ibeacon-2",
   	 	"proximity-uuid":"UUID VALUE",
   	 	"major":"MAJOR VALUE",
   	 	"minor":"MINOR VALUE",
   	 	"relevant-text":"RELEVANCE TEXT"
    	},
    	. . .
		 ]
    },
    "gpay-fields": {
   	 "additional-image": "ADDITIONAL IMAGE URL",
   	 "additional-image-text": "Image Description"
    },
    "expiration-fields": {
    	“expiration-setting” : “SETTING TYPE”,
       	"expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME",
        “auto-expire-number-days” : “NUMBER OF DAYS POST AUTO EXPIRE PASSES”,
        “auto-expire-number-hours” : “NUMBER OF HOURS POST AUTO EXPIRE PASSES”, 
        “auto-expire-timezone” : “VALID TIMEZONE NAME”,
        “auto-expire-roundoff-midnight” : false,
    },
    "barcode-fields": {
   	 "barcode-type": "BARCODE TYPE",
   	 "barcode-value": "DEFAULT BARCODE VALUE",    
   	 "autogenerate-barcode-values":true,
   	 "autogenerate-barcode-value-type": "VALUE TYPE FOR AUTO GENERATED BARCODES",
   	 "autogenerate-barcode-value-length": "LENGTH OF AUTO GENERATED BARCODE VALUES"
    },
    "relevant-locations": [{
        "key":"relevant-1",
    	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
	},
	{
        "key":"relevant-2",
   	"latitude":"COORDINATES",
    	"longitude":"COORDINATES",
    	"relevant-text":"RELEVANCE TEXT"
	},
	. . .
	],
    "disable-pass-sharing":true,
    "pass-data-archive-settings": {
   	 "never-installed-ttl":"NUMBER OF HOURS POST WHICH PASS RECORDS WILL BE ARCHIVED IF NOT INSTALLED",
   	 "never-installed-archive-timestamp": "TIMESTAMP WHEN NON INSTALLED PASS RECORDS ARE TO BE ARCHIVED",
   	 "expired-pass-ttl": "NUMBER OF HOURS POST WHICH EXPIRED PASSES WILL BE ARCHIVED",
   	 "redeemed-pass-ttl": "NUMBER OF HOURS POST WHICH REDEEMED PASSES WILL BE ARCHIVED",
   	 "voided-pass-ttl": "NUMBER OF HOURS POST WHICH VOIDED PASSES WILL BE ARCHIVED"
     },
    “pass-update-notification” : “UPDATE NOTIFICATION MESSAGE”
}

Request Example: Loyalty Card Layout 2

Header: 
X-Api-Key : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request:
{ 
    "action":"UpdatePassTemplate",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "appearance":{ 
        "program-logo":"https://fake-content-url.com/program-logo.png",
        "program-logo-gpay":"https://fake-content-url.com/program-logo-gpay.png",
        "card-issuer":"Loyal-1",
        "strip-image":"https://fake-content-url.com/strip-image.png",
        "background-color":"#030000"
    },
    "universal-fields":{ 
         "dynamic-pass-field-1" : "expiration-timestamp", 
         "dynamic-pass-field-2" : "custom-field-1", 
         "dynamic-pass-field-3" : "custom-field-2",
        "dynamic-pass-field-4" : "custom-field-3",
        "loyalty-points-label":"Policy Number",
        "loyalty-points":"236502",
        "program-name":"Skycore Auto",
        "secondary-loyalty-points-label":"Valid Until",
        "secondary-loyalty-points":"10-22-2020",
        "account-name-label":"Insured",
        "account-name":"JOY",
        "account-id-label":"Owner",
        "account-id":"James",
        "expiration-timestamp-label" : "EXPIRES ON",  
        "expiration-timestamp-display-time" : true,
        "custom-field-1-label" : "LABEL 1", 
        "custom-field-1" : "VALUE 1", 
        "custom-field-2-label" : " LABEL 2", 
        "custom-field-2" : "VALUE 2", 
        "custom-field-3-label" : "LABEL 3", 
        "custom-field-3" : "VALUE 3",
        "rewards-tier-label":"Effective",
        "rewards-tier":"10/01/2018",
        "message1-label":"Vehicle Covered",
        "message1":"2012 Jeep Liberty Unlimited VIN:00279021",
        "message2-label":"Agent",
        "message2":"Matt Johnson Fake Address",
        "message3-label":"NAIC Number",
        "message3":"213213",
        "text-module-label":"Disclaimer",
        "text-module":"This insurance card was created for demo purposes only.",
        "info-module-label":"Check up center",
        "info-module":"Fake Address",
        "home-page-uri-label":"online website",
        "home-page-uri":"https://fake-home-page-uri.com",
        "link1-label":"Link-1",
        "link1":"fake.email@email.com",
        "link1-type":"email",
        "link2-label":"phone",
        "link2":"10000000000",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"",
        "description":"Pass wallet by skycore",
        "linked-apps":"123213",
        "ibeacons":[{ 
                "key":"ibeacon-1",
                "proximity-uuid":"233233",
                "major":"123123",
                "minor":"34234",
                "relevant-text":"Come use your card"
            },
            { 
                "key":"ibeacon-2",
                "proximity-uuid":"2112312",
                "major":"23232",
                "minor":"231321",
                "relevant-text":"Come use your card!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://fake-content-url.com/additional-image.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2020 6:00 PM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"CODE128",
        "barcode-value":"123123",
        "autogenerate-barcode-values":true,
        "autogenerate-barcode-value-type":"Alphabet",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "key":"relevant-1",
            "latitude":"32.22",
            "longitude":"45.89",
            "relevant-text":"Come use your card!"
        },
        { 
            "key":"relevant-2",
            "latitude":"45.63",
            "longitude":"74.32",
            "relevant-text":"Come use your card!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"1",
        "never-installed-archive-timestamp":"2/1/2020 11:19 AM",
        "expired-pass-ttl":"1",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
     },
    “pass-update-notification” : “Your pass has been updated.”
}

Response Success Example: Loyalty Card Layout 2

{ 
    "status":"Success",
    "pass-template-type":"loyalty",
    "pass-template-name":"Loyalty card-5",
    "pass-template-id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Failure Example: Loyalty Card Layout 2

{ 
    "status":"Failure",
    "error-code":"E922",
    "error-message":"The link1-type value is invalid."
}

 

Go to Top