Gift Card API

Introduction to Gift Cards

The following image shows where the fields used in the API calls will appear on gift cards for both Apple Wallet and Google Pay. Any fields shown on gift cards 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 Merchant Name and the ‘Last Updated’ field.

mobile wallet gift card

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

Params/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-idMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThe unique Pass Template ID used to reference a particular Pass Template.
pass-idMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThe identifier from your system to identify the pass or pass data uniquely.
reference-dataOptional, Alphanumeric (a-zA-Z0-9)This is used for adding additional information related to the pass.
barcode-valueOptional, Alphanumeric (a-zA-Z0-9)The unique barcode value associated with a specific pass-id.
expiration-timestampOptional. “expiration-timestamp” should be in UTC. Example: 2013-02-19T15:54:50ZThe timezone offset is ignored and always considers the timestamp in UTC.
expiration-timezoneOptional. “expiration-timezone” should be in long name format. Example: America/New_YorkUse the long names listed in section 9.1 for your reference
card-numberMandatory, Alphanumeric (a-zA-Z0-9)The gift card number. This number appears below the barcode on both Apple Wallet and Google Pay Passes.
card-balanceOptional, Numeric (0-9)The monetary value or balance of the gift card.
card-pinOptional, Alphanumeric (a-zA-Z0-9)The PIN number for the gift card. Most gift cards use a PIN number as an additional security method for authentication purposes.
event-idOptional, Alphanumeric (a-zA-Z0-9)The event id field is used by some merchants to further identify the gift card.
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..

GeneratePass

The generate pass API will generate a unique installation link for a gift 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 gift card. To call this API again successfully, you will need to use a different ‘pass-id’. Please note that the ‘pass-id’ is unique per account, not per Pass Template.

Request: Gift card

{
    "action":"generatepass",
    "api-key":"QX4G4ijIIkutK2exyAY1iwA3y8cwwmEj",
    "pass-template-id":"b2ab2c28987f9f759b1dfc473e261330410a0f41",
    "pass-id":"Gift Card_1",
    "reference-data": {
  "email": "joy@gmail.com",
  "phone": "61855742",
  "transaction-id": "96"
          },
    "pass-data":{
        "barcode-value":"ASDE96325",
        "card-number":"9632545",
        "card-balance":"65",
        "card-pin":"4236",
        "event-id":"JAN_456",
                "additional-image":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c209c86a91aa.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!"
            }
        ]
    }
}
{
   "action":"generatepass",
   "api-key":"API KEY",
   "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",
        "card-number":"CARD NUMBER VALUE",
        "card-balance":"GIFT CARD BALANCE",
        "card-pin":"PIN VALUE",
        "event-id":"EVENT ID VALUE",
        "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"
         },
         …
      ]
   }
}

Request Example: Gift card

{  
    "action":"generatepass",
    "api-key":"QX4G4ijIIkutK2exyAY1iwA3y8cwwmEj",
    "pass-template-id":"b2ab2c28987f9f759b1dfc473e261330410a0f41",
    "pass-id":"Gift Card_1",
    "reference-data": {
 "email": "joy@gmail.com",
 "phone": "61855742",
 "transaction-id": "96"
       },
    "pass-data":{  
        "barcode-value":"ASDE96325",
        "card-number":"9632545",
        "card-balance":"65",
        "card-pin":"4236",
        "event-id":"JAN_456",
                "additional-image":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c209c86a91aa.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!"
            }
        ]
    }
}

Response Success Example:

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "pass-install-url":"https://dev-d2c.skycore.com/wallet/dc/eazt0sq3r4",
   "tracking-id":"EDRZKf-JTDiY-EJZ"
}

Response Failure Example:

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

UpdatePassData

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

Request Example: Gift card

{  
    "action":"updatepassdata",
    "api-key":"API KEY",
    "pass-id":"UNIQUE CUSTOMER PASS ID",
    "new-pass-id":"NEW UNIQUE CUSTOMER PASS ID",
    "priority":"PRIORITY",
    "pass-data":{  
        "barcode-value":"BARCODE VALUE",
        "card-number":"PASS CARD VALUE",
        "card-balance":"GIFT CARD BALANCE",
        "card-pin":"PIN VALUE",
        "event-id":"EVENT ID VALUE",
        "additional-image":"ADDITIONAL IMAGE",
        "pass-status":"STATUS OF THE PASS",
        "pass-update-notification":"NOTIFICATION FOR PASS UPDATE",
        "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"
         },
         …
      ]
   }
}


Request Example: Gift card

{  
    "action":"updatepassdata",
    "api-key":"API KEY",
    "pass-id":"UNIQUE CUSTOMER PASS ID",
    "new-pass-id":"NEW UNIQUE CUSTOMER PASS ID",
    "priority":"PRIORITY",
    "pass-data":{  
        "barcode-value":"BARCODE VALUE",
        "card-number":"PASS CARD VALUE",
        "card-balance":"GIFT CARD BALANCE",
        "card-pin":"PIN VALUE",
        "event-id":"EVENT ID VALUE",
        "additional-image":"ADDITIONAL IMAGE",
        "pass-status":"STATUS OF THE PASS",
        "pass-update-notification":"NOTIFICATION FOR PASS UPDATE",
        "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"
         },
         …
      ]
   }
}


Response Success Example:

{  
   "status":"Success",
   "pass-id":"rockonrock2020",
   "tracking-id":"EDRYpq-GAxbE-EKE"
}

Response Failure Example:

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

GetPassData

The get pass data API is used to retrieve data for a specific gift card that has already been installed on a device. This data may include the gift card holder’s name or the gift card balance. If you do not enter the correct ‘pass-id’ for the gift card that you are trying to retrieve, you will receive an error code. Please note that the ‘pass-id’ is unique per account, not per Pass Template.

Request

{
    "action":"getpassdata",
    "api-key":"API KEY",
    "pass-id":"UNIQUE CUSTOMER PASS ID"
}

Request Example

{  
   "action":"getpassdata",
   "api-key":"QX4G4ijIIkutK2exyAY1iwA3y8cdFmEj",
   "pass-id":"rockonrock2020"
}

Response Success Example: Gift card

{  
    "status":"Success",
    "pass-id":"161783893285c2f4bcc68660",
    "pass-template-id":"59c4fb740f5a3a4c6bb7f1170d8b982b0ceb6b4",
    "pass-data":{  
        "logo-url":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c206bde7531a.png",
        "merchant-name":"GIFT CARD - 24-12",
        "barcode-value":"ASDH678",
        "card-number":"8965",
        "card-balance":"AFN9",
        "card-pin":"334234",
        "event-id":"C",
        "additional-image":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c209c86a91aa.png",
        "message1":"hiii",
        "message2":"hiii",
        "message3":"price",
        "text-message":"hi all",
        "info-message":"deals",
        "link1-URI":"tel://90290",
        "link2-URI":"geo://36.9665,45.6666",
        "home-page-URI":"https://dev-app.skycore.com/platform/wallet/pass-template-builder-wallet.php#",
        "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:

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

GetPassTemplate

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

Request

{
    "action":"getpasstemplate",
    "api-key":"API KEY",
    "pass-template-id":"CARD TEMPLATE ID"
}

Request Example:

{  
   "action":"getpasstemplate",
   "api-key":"QX4G4ijIIkutK2exyAY1iwA3y8cdFmEj",
   "pass-template-id":"b2ab2c28987f9f759b1dfc473e261330410a0f41"
}

Response Success Example: Gift card

{  
    "status":"Success",
    "pass-template-id":"182258f43033a386202e86e68213b584e64762fa",
    "pass-template":{  
        "pass-name":"Gift Card 24-12",
        "pass-type":"Gift Card",
        "organization":"JOY",
        "description":"Mobile Wallet Card by JOY",
        "logo-url":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c206bde7531a.png",
        "merchant-name":"GIFT CARD - 24-12",       
        "barcode-value":"ASDH678",       
        "card-number":"8965",
        "card-balance":"AFN9",
        "card-pin":"334234",
        "event-id":"C",
        "additional-image":"https://messagecontent-dev-public.s3.amazonaws.com/userdata/KIyP1igJTbDm/passes/images/0a1efdaa60c78c46cdee036c2f0858de-5c209c86a91aa.png",
        "message1":"hiii",
        "message2":"hiii",
        "message3":"price",
        "text-message":"hi all",
        "info-message":"deals",
        "link1-URI":"tel://90290",
        "link2-URI":"geo://36.9665,45.6666",
        "home-page-URI":"https://dev-app.skycore.com/platform/wallet/pass-template-builder-wallet.php#",
        "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:

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

CreatePassIssuanceLink

The CreatePassIssuanceLink API is used to create an issuance link for a gift card Pass. To create a gift 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 gift cards.

Params/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API and is Case-Insensitive.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-nameMandatory, Alphanumeric (a-zA-Z0-9)The name of the Pass Issuance Link to be created.
link-expiration-timestampOptional. “link-expiration-timestamp” should be in Date/Time ISO 8601 formatThe 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-timezoneRequired if link-expiration-timestamp is set. The “link-expiration-timezone” should be in long name format. Example: America/New_YorkUse the long names listed in section 10.1 for your reference.
link-generation-limitOptional, 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-statusOptional. Accepted values: “ACTIVE” or “INACTIVE”Status of the Pass Issuance Link for a specific Pass Template.
encryption-settingsOptionalDefine Pass Issuance Link encryption settings.
encryption-nameOptional. Accepted values: “AES-CBC”Standard Encryption Algorithms supported. Only 256 bit is supported in the API.
secret-keyRequired if “encryption-name” is provided. Alphanumeric (a-zA-Z0-9)This is a 32 character long password for encrypting data within the issuance link.
ivRequired 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-protectionOptionalDefine Pass Issuance Link protection settings.
checksumOptional. Accepted values: “CRC32”, “SHA256”, “SHA384”, or “SHA512”Standard data integrity check algorithms are supported.
checksum-appliedRequired 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-idRequired, Alphanumeric (a-zA-Z0-9)This is the ID of the Pass Template that the Pass Issuance Link will be generated for.
pass-variablesRequiredDefine the list of Pass variables and their required properties to be used in the Pass Issuance Link.

Request: Gift Card

{
"action": "createPassIssuanceLink",
"api-key": "API KEY",
"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",
"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":{
"gift-card-number": {
"is-required": true,
"value-encryption": true / false
},
"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
},
"card-balance-value": {
"is-required": true / false,
"value-encryption": true / false
},
"card-pin-value": {
"is-required": true / false,
"value-encryption": true / false
},
"event-number": {
"is-required": true / false,
"value-encryption": true / false
},
"barcode-value": {
"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: Gift Card

{
	"action": "createpassissuancelink",
	"api-key": "nFel9m06R7bR7HkrhZIXIzeqTAnrCugBw",
	"issuance-link-name": "TestIssuanceLink",
	"pass-template-id": "39cfcd38b1205ca3ac492851cb3bd6056d94581f",
	"link-expiration-timestamp": "2020/10/23T00:00-10:00",
	"link-expiration-timezone": "America/New_York",
	"link-generation-limit": 100,
	"link-status": "active",
	"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
		},
		"gift-card-number": {
			"is-required": true,
			"value-encryption": true
		},
		"card-balance-value":{
			"is-required": true,
			"value-encryption": true
		},
		"card-pin-value":{
			"is-required": true,
			"value-encryption": true
		}
	}
}

Response Success Example:

{

"status": "Success", "pass-issuance-link-template-id": "95f8ce07f404d96d6ecdc13583eacf53", "preview-url": "https://d2c.skycore.com/wallet/gc/95f8ce07f404d96d6ecdc13583eacf53?pass-id={ Parameter Value }&gift-card-number=Encrypted({ Parameter Value })&card-balance-value=Encrypted({ Parameter Value })&card-pin-value=Encrypted({ Parameter Value })"

}

Response Failure Example:

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

UpdatePassIssuanceLink

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

Request: Gift Card

{
	"action": "UpdatePassIssuanceLink",
	"api-key": "API KEY",
	"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",
	"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":{
                "gift-card-number": {
   	                "is-required": true,
   	                "value-encryption": true / false
                },
                "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
                },
                "card-balance-value": {
   	                "is-required": true / false,
   	                "value-encryption": true / false
                },
                "card-pin-value": {
   	                "is-required": true / false,
   	                "value-encryption": true / false
                },
                "event-number": {
   	                "is-required": true / false,
   	                "value-encryption": true / false
                },
                "barcode-value": {
   	                "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: Gift Card

{
	"action": "UpdatePassIssuanceLink",
	"api-key": "nFel9m06R7bR7HkrhZIXIzeqTAnrCugBw",
	"issuance-link-name": "TestIssuanceLink",
	"pass-template-id": "39cfcd38b1205ca3ac492851cb3bd6056d94581f",
	"link-expiration-timestamp": "2020/10/23T00:00-10:00",
	"link-expiration-timezone": "America/New_York",
	"link-generation-limit": 100,
	"link-status": "active",
	"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
		},
		"gift-card-number": {
			"is-required": true,
			"value-encryption": true
		},
		"card-balance-value":{
			"is-required": true,
			"value-encryption": true
		},
		"card-pin-value":{
			"is-required": true,
			"value-encryption": true
		}
	}
}

Response Success Example:

{
    "status": "Success",
    "pass-issuance-link-template-id": "95f8ce07f404d96d6ecdc13583eacf53",
    "preview-url": "https://d2c.skycore.com/wallet/gc/95f8ce07f404d96d6ecdc13583eacf53?pass-id={ Parameter Value }&gift-card-number=Encrypted({ Parameter Value })&card-balance-value=Encrypted({ Parameter Value })&card-pin-value=Encrypted({ Parameter Value })"
}

Response Failure Example:

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

CreatePassTemplate

The CreatePassTemplate API is used to create a Pass Template for a gift card 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 gift cards. The required params for a gift card Pass Template are: action, api-key, pass-template-type, pass-template-name, merchant-name, background-color, card-number, barcode-type, text-color, and description.

Params/VariablesFormatDescription
actionMandatory, Alphabetic (a-zA-Z)This is the name of the function you want to execute with the API.
api-keyMandatory, Alphanumeric (a-zA-Z0-9), Case-SensitiveThis 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-typeMandatory. The expected value is “gift-card”This defines the type of Pass that will be used for creating the Pass Template.
pass-template-nameMandatory. Alphanumeric (A-Za-z0-9)This is used as an internal name to identify the Pass Template.
merchant-logoOptional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images onlyThis PNG image is used only for Apple Wallet Passes. Rectangular images are required
merchant-logo-gpayOptional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images onlyThis 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.
merchant-nameMandatory, Alphanumeric (A-Za-z0-9)This is the Merchant Name for the Gift Card. If “merchant-logo” is set then this value won’t be displayed on Apple Wallet Passes.
strip-imageOptional, Alphanumeric (A-Za-z0-9). Web URL – Accepts PNG images onlyThe 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-colorMandatory, 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.
card-numberMandatory, Alphanumeric (A-Za-z0-9)The gift card number appears below the barcode on both Apple Wallet and Google Pay Passes.
card-balanceOptional, Numeric (0-9)The monetary value or balance of the gift card. The currency will always be considered as US$.
card-pin-labelOptional, Alphanumeric (A-Za-z0-9)The label for the card-pin field. If not set but “card-pin” is set, then a default value “PIN” will be used on the Pass.
card-pinOptional, Alphanumeric (A-Za-z0-9)The PIN number for the gift card. Most gift cards use a PIN number as an additional security method for authentication purposes.
event-number-labelOptional, Alphanumeric (A-Za-z0-9)The label for “event-number” field. If not set and “event-number” is set, then a default value “EVENT NUMBER” will be used on the pass.
event-numberOptional, Alphanumeric (A-Za-z0-9)The event number field is used by some merchants to further identify the gift card.
message1-labelOptional, Alphanumeric (A-Za-z0-9)The label for the message1 field.
message1Optional, Alphanumeric (A-Za-z0-9)This field is used to display any message. It is displayed on the back of apple pass, and below the pass for Google.
message2-labelOptional, Alphanumeric (A-Za-z0-9)The label for the message2 field.
message2Optional, Alphanumeric (A-Za-z0-9)This field is used to display any message. It is displayed on the back of apple pass, and below the pass for Google.
text-module-labelOptional, Alphanumeric (A-Za-z0-9)The label for the text-module field.
text-moduleOptional, 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-labelOptional, Alphanumeric (A-Za-z0-9)The label for the info-module field.
info-moduleOptional, 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-labelOptional, Alphanumeric (A-Za-z0-9)The label for the home page URI.
home-page-uriOptional, 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-labelOptional, Alphanumeric (A-Za-z0-9)The label for the link1 field.
link1-typeOptional, 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.
link1Optional, 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-labelOptional, Alphanumeric (A-Za-z0-9)The label for the link2 field.
link2-typeOptional, 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.
link2Optional, 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-colorMandatory, 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.
descriptionMandatory, 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-appsOptional, Alphanumeric (A-Za-z0-9)This is a comma-separated list of iTunes apps, which are displayed on the back of the apple passes.
ibeaconsOptional, 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-imageOptional, Alphanumeric (A-Za-z0-9). Web URLThis image is displayed only on Google Pay Passes, in the area below the pass in between the additional details.
additional-image-textOptional, Alphanumeric (A-Za-z0-9)This value provides information that is linked to the additional image.
expiry-dateOptional, 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-timezoneOptional, Alphanumeric (A-Za-z0-9)The timezone name. E.g. America/New_York. Use the long names listed in section 9.1.
barcode-typeMandatory, Alphabetic (A-Za-z). Accepted values: “QRCODE”, “AZTEC”, “PDF417”, or “CODE128”The barcode type for all Passes installed using this Pass Template.
barcode-valueOptional, Alphanumeric (A-Za-z0-9)This is the default barcode value, which will be used for Passes if no value is provided.
autogenerate-barcode-valuesOptional, 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-typeOptional, 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-lengthOptional, Numeric (0-9). Accepted values: 10 – 100This field defines the length of the auto-generated barcode value for Passes if the autogenerate-barcode-values is set to “True”.
relevant-locationsOptional, 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-sharingOptional, 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-ttlOptional, Numeric (0-9)This field sets the number of hours post which an uninstalled pass will be archived.
never-installed-archive-timestampOptional, 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-ttlOptional, Numeric (0-9)This field sets the number of hours post which an expired pass will be archived.
redeemed-pass-ttlOptional, Numeric (0-9)This field sets the number of hours post which a redeemed pass will be archived.
voided-pass-ttlOptional, Numeric (0-9)This field sets the number of hours post which a voided pass will be archived.

Request: Gift Card

{
   "action": "createPassTemplate",
   "api-key": "ApiKey",
   "pass-template-type": "gift-card",
   "pass-template-name": "PassTemplateName",
   "appearance" : {
        "merchant-logo": "IMAGE PATH",
        "merchant-logo-gpay": "IMAGE PATH",
        "merchant-name": "MERCHANT NAME",
        "strip-image": "IMAGE PATH",
        "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
        "card-number": "GIFT CARD NUMBER"
        "card-balance": "CARD BALANCE VALUE", 
        "card-pin-label": "PIN LABEL",
        "card-pin": "PIN VALUE", 
        “event-number-label” : “EVENT NUMBER LABEL”,
        "event-number": "EVENT NUMBER VALUE",
        "message1-label" : "MESSAGE 1 LABEL",
        "message1": "MESSAGE 1 TEXT",     
        "message2-label" : "MESSAGE 2 LABEL",
        "message2": "MESSAGE 2 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"
 },
    "gpay-fields" : {
 "additional-image": "ADDITIONAL IMAGE URL",
 "additional-image-text": "Image Description"
    },    
    "expiration-fields" : {
        "expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME" 
    },
    "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"
    },
    "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: Gift Card

{ 
    "action":"createPassTemplate",
    "api-key":"UX4G4ijIIkutK2ex1q2wY1iwA3y8cdFmEj",
    "pass-template-type":"gift-card",
    "pass-template-name":"GIft-card-1",
    "appearance":{ 
        "merchant-logo":"https://www.freepngimg.com/thumb/usa/2-2-america-flag-png-file.png",
        "merchant-logo-gpay":"https://www.cryptoninjas.net/wp-content/uploads/2017/07/dash-apple-768x432.png",
        "merchant-name":"MERCHANT NAME",
        "strip-image":"https://www.cryptoninjas.net/wp-content/uploads/2017/07/dash-apple-768x432.png",
        "background-color":"#c24e4e"
    },
    "universal-fields":{ 
        "card-number":"1233123",
        "card-balance":"12",
        "card-pin":"12123",
        "event-number":"221",
        "message1-label":"Disclaimer",
        "message1":"This gift card was created for demo purposes only and has no real monetary value.",
        "message2-label":"Online Redemption Instructions",
        "message2":"Enter the number shown below the barcode when prompted",
        "text-module-label":"Terms",
        "text-module":"Save $1 on any drink! Excludes milkshakes and bottled beverages.",
        "info-module-label":"Information",
        "info-module":"Pull up this coupon at checkout",
        "home-page-uri-label":"Website",
        "home-page-uri":"https://www.google.com",
        "link1-label":"Support",
        "link1":"joy@gmail.com",
        "link1-type":"email",
        "link2-label":"Call",
        "link2":"2312312",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"#ffffff",
        "description":"Mobile Wallet Pass by ABC-1",
        "linked-apps":"123123",
        "ibeacons":[ 
            { 
                "proximity-uuid":"33333",
                "major":"123123",
                "minor":"123123",
                "relevant-text":"Come grab some popcorn!"
            },
            { 
                "proximity-uuid":"111111",
                "major":"1236541",
                "minor":"156321",
                "relevant-text":"Come grab some popcorn!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://www.freepngimg.com/thumb/usa/2-2-america-flag-png-file.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2019 11:16 AM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"QRCODE",
        "barcode-value":"12025511",
        "autogenerate-barcode-values":false,
        "autogenerate-barcode-value-type":"numeric",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "latitude":"45.30",
            "longitude":"72.86",
            "relevant-text":"Come grab some popcorn!"
        },
        { 
            "latitude":"19.30",
            "longitude":"72.86",
            "relevant-text":"Come grab some popcorn!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"12",
        "never-installed-archive-timestamp":"1/1/2020 11:19 AM",
        "expired-pass-ttl":"12",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
    }
}


Response Success Example:

{ 
    "status":"Success",
    "pass-template-type":"gift-card",
    "pass-template-name":"GIft-card-1",
    "pass-template-id":"f346b2e48123c000e56d0dba08455ae77488c7b7"
}

Response Failure Example:

{ 
    "status":"Failure",
    "error-code":"E816",
    "error-message":"card-number is invalid. Please remove if any special characters and try again."
}

UpdatePassTemplate

The UpdatePassTemplate API is used to update an existing Pass Template for a gift card Pass.

Request: Gift Card

{
   "action": "updatePassTemplate",
   "api-key": "ApiKey",
   "pass-template-type": "gift-card",
   "pass-template-name": "PassTemplateName",
   "appearance" : {
        "merchant-logo": "IMAGE PATH",
        "merchant-logo-gpay": "IMAGE PATH",
        "merchant-name": "MERCHANT NAME",
        "strip-image": "IMAGE PATH",
        "background-color": "COLOR HASH CODE"
    },
    "universal-fields": {
        "card-number": "GIFT CARD NUMBER"
        "card-balance": "CARD BALANCE VALUE", 
        "card-pin-label": "PIN LABEL",
        "card-pin": "PIN VALUE", 
        “event-number-label” : “EVENT NUMBER LABEL”,
        "event-number": "EVENT NUMBER VALUE",
        "message1-label" : "MESSAGE 1 LABEL",
        "message1": "MESSAGE 1 TEXT",     
        "message2-label" : "MESSAGE 2 LABEL",
        "message2": "MESSAGE 2 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"
 },
    "gpay-fields" : {
 "additional-image": "ADDITIONAL IMAGE URL",
 "additional-image-text": "Image Description"
    },    
    "expiration-fields" : {
        "expiry-date": "EXPIRATION TIMESTAMP",
        "expiry-timezone": "VALID TIMEZONE NAME" 
    },
    "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"
    },
    "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: Gift Card

{ 
    "action":"updatePassTemplate",
    "api-key":"UX4G4ijIIkutK2ex1q2wY1iwA3y8cdFmEj",
    "pass-template-type":"gift-card",
    "pass-template-name":"GIft-card-1",
    "appearance":{ 
        "merchant-logo":"https://www.freepngimg.com/thumb/usa/2-2-america-flag-png-file.png",
        "merchant-logo-gpay":"https://www.cryptoninjas.net/wp-content/uploads/2017/07/dash-apple-768x432.png",
        "merchant-name":"MERCHANT NAME",
        "strip-image":"https://www.cryptoninjas.net/wp-content/uploads/2017/07/dash-apple-768x432.png",
        "background-color":"#c24e4e"
    },
    "universal-fields":{ 
        "card-number":"1233123",
        "card-balance":"12",
        "card-pin":"12123",
        "event-number":"221",
        "message1-label":"Disclaimer",
        "message1":"This gift card was created for demo purposes only and has no real monetary value.",
        "message2-label":"Online Redemption Instructions",
        "message2":"Enter the number shown below the barcode when prompted",
        "text-module-label":"Terms",
        "text-module":"Save $1 on any drink! Excludes milkshakes and bottled beverages.",
        "info-module-label":"Information",
        "info-module":"Pull up this coupon at checkout",
        "home-page-uri-label":"Website",
        "home-page-uri":"https://www.google.com",
        "link1-label":"Support",
        "link1":"joy@gmail.com",
        "link1-type":"email",
        "link2-label":"Call",
        "link2":"2312312",
        "link2-type":"phone"
    },
    "apple-wallet-fields":{ 
        "text-color":"#ffffff",
        "description":"Mobile Wallet Pass by ABC-1",
        "linked-apps":"123123",
        "ibeacons":[ 
            { 
                "proximity-uuid":"33333",
                "major":"123123",
                "minor":"123123",
                "relevant-text":"Come grab some popcorn!"
            },
            { 
                "proximity-uuid":"111111",
                "major":"1236541",
                "minor":"156321",
                "relevant-text":"Come grab some popcorn!"
            }
        ]
    },
    "gpay-fields":{ 
        "additional-image":"https://www.freepngimg.com/thumb/usa/2-2-america-flag-png-file.png",
        "additional-image-text":"Image Description"
    },
    "expiration-fields":{ 
        "expiry-date":"12/30/2019 11:16 AM",
        "expiry-timezone":"Asia/Kolkata"
    },
    "barcode-fields":{ 
        "barcode-type":"QRCODE",
        "barcode-value":"12025511",
        "autogenerate-barcode-values":false,
        "autogenerate-barcode-value-type":"numeric",
        "autogenerate-barcode-value-length":"10"
    },
    "relevant-locations":[ 
        { 
            "latitude":"45.30",
            "longitude":"72.86",
            "relevant-text":"Come grab some popcorn!"
        },
        { 
            "latitude":"19.30",
            "longitude":"72.86",
            "relevant-text":"Come grab some popcorn!"
        }
    ],
    "disable-pass-sharing":false,
    "pass-data-archive-settings":{ 
        "never-installed-ttl":"12",
        "never-installed-archive-timestamp":"1/1/2020 11:19 AM",
        "expired-pass-ttl":"12",
        "redeemed-pass-ttl":"1",
        "voided-pass-ttl":"1"
    }
}


Response Success Example:

{ 
    "status":"Success",
    "pass-template-type":"gift-card",
    "pass-template-name":"GIft-card-1",
    "pass-template-id":"f346b2e48123c000e56d0dba08455ae77488c7b7"
}

Response Failure Example:

{  
    "status":"Failure", 
    "error-code":"E816", 
    "error-message":"card-number is invalid. Please remove if any special characters and try again."
}