Passes
Schemas used when creating passes (as opposed to adaptive links).
Apple Wallet pass request
A pass for Apple Wallet.
OBJECT PROPERTIES- beacons array
Beacons for an Apple pass.
- fields object
Fields for an Apple Wallet pass. Provide only the field objects and values you want to differentiate or personalize from the template.
- headers object
Headers on an Apple Wallet pass. Provide only the header objects and values you want to differentiate or personalize from the template. See Apple Template Headers for information about available header objects for Apple Wallet templates and passes.
OBJECT PROPERTIES- expirationDate string
May contain
valueandlabelfields.valueindicates the expiration date of the pass.labelcan be set to eithervalidorvoided, wherevalidindicates a non-expired pass andvoidedindicates that the pass is no longer accepted. - sharingStatus object
A
fielddetermining whether passes can be shared across users, devices, or not at all. By default, there are no restrictions with regard to users or devices (multipleHolders). While this setting uses the same format as otherfields, you only need to set thevaluewithin the object. Most other keys are irrelevant this setting, even though they appear in responses; this field should not be visible on passes, so you should not populate label, order, etc.On iOS devices,
oneUserOneDeviceprohibits sharing ("sharingProhibited": true); all other values allow sharing.You can override the template setting on Apple Wallet passes. If you set this field in an adaptive link payload, it will only apply to Apple Wallet passes resulting from the adaptive link; Google Wallet passes will always use the sharing setting set at the template level.
OBJECT PROPERTIES- changeMessage string
The message that appears when you update this field.
- value stringREQUIRED
Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting:
oneUserOneDeviceprohibits sharing; all other values allow sharing.Possible values:
multipleHolders,oneUserAllDevices,oneUserOneDevice
- locations array
A list of locations associated with a pass.
- nfc object
If your Apple certificate is NFC-enabled, and your terminals use Apple’s Value Added Services protocol, you can include this object in Loyalty passes to identify pass holders and provide their credentials over NFC.
OBJECT PROPERTIES- encryptionPublicKey stringREQUIRED
The public encryption key for NFC communications. Use a Base64 encoded X.509
SubjectPublicKeyInfostructure containing a ECDH public key for group P256. - message stringREQUIRED
The payload for an Apple Pay terminal, 64 bytes or less. Messages longer than 64 bytes are truncated.
- publicUrl object
A public URL from which users can download a pass.
For Google Wallet, the public URL deep-links to the Google Wallet store with credentials to download a pass, facilitating pass installation without a browser window. When creating Google Wallet passes, this field is required and you must specify
type: singlein the request to create a pass. If the request does not contain a Public URL, the operation will not return a URL and users will not be able to access the resulting pass.For Apple Wallet, this URL points to a .pkpass file. We recommend using a Public URL when creating Apple Wallet passes. If you do not provide a public URL, users will not be able to install the pass without the API key.
OBJECT PROPERTIES- installs integer
The number of users who have installed the pass from the URL specified in the
pathfield. - path string
The URL for the pass.
- type stringREQUIRED
Determines whether a user can access the link to install a pass one time or multiple times. The response indicates the number of times the publicUrl has been used to install a pass.
Possible values:
single,multiple - used boolean
If true, a user has accessed the
pathURL.
- semantics object<Boarding pass semantics>
Apple boarding pass only, top-level semantics.
For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data that enhances passes. You can nest this object within
fields. An array of tags associated with the pass.
- templateId integer
The identifier for the template. You can recall the template by ID in other operations.
Used in:
- Create pass
- Create pass
- Create pass from a template
- Generates a pass
- Get pass
- Get pass
- Update pass
- Update pass for a template
Examples
Example pass for Apple Wallet
{
"headers": {
"expirationDate": {
"value": "2014-08-20T09:41-08:00"
},
"barcodeAltText": {
"changeMessage": null,
"value": "abc1234567890",
"label": ""
},
"barcode_value": {
"changeMessage": null,
"value": "abc1234567890",
"label": ""
}
},
"fields": {
"Coupon": {
"changeMessage": "Enjoy %@ off your next order!",
"value": "20%",
"label": "Coupon"
},
"SiteAddress": {
"changeMessage": "Check out things we think you would like at %@",
"value": "https://www.example.com/new?custnumb=123456",
"label": "personal deals"
},
"InStore": {
"changeMessage": "Or visit your nearest store at %@",
"value": "1234 Fake St.",
"label": "nearestStore"
},
"thumbnail_image": {
"value": "https:\/\/wallet.urbanairship.com\/assets\/favicon.png"
}
},
"beacons":[
{
"uuid": "55502220-A123-A88A-F321-555A444B333C",
"relevantText": "You are near the Ship",
"major": 2,
"minor": 346
}
],
"locations":[
{
"longitude": -122.374,
"latitude": 37.618,
"relevantText": "Hello loc0",
"streetAddress1": "address line #1",
"streetAddress2": "address line #2",
"city": "San Francisco",
"region": "CA",
"regionCode": "94404",
"country": "US"
}
],
"publicUrl": {
"type": "single"
}
}
Apple Wallet pass response
A pass response includes both identifiers and the content of all fields on a pass.
All ofA pass for Apple Wallet.
- OBJECT PROPERTIES
- createdAt string
The date and time when the item was created.
- externalId string
The external ID for the pass, returned only if you created the pass using an external ID.
- id integer
The internal identifier for the pass. Use this ID to get or modify the pass in other calls.
- publicUrl object
A public URL from which users can download a pass.
For Google Wallet, the public URL deep-links to the Google Wallet store with credentials to download a pass, facilitating pass installation without a browser window. When creating Google Wallet passes, this field is required and you must specify
type: singlein the request to create a pass. If the request does not contain a Public URL, the operation will not return a URL and users will not be able to access the resulting pass.For Apple Wallet, this URL points to a .pkpass file. We recommend using a Public URL when creating Apple Wallet passes. If you do not provide a public URL, users will not be able to install the pass without the API key.
OBJECT PROPERTIES- installs integer
The number of users who have installed the pass from the URL specified in the
pathfield. - path string
The URL for the pass.
- type stringREQUIRED
Determines whether a user can access the link to install a pass one time or multiple times. The response indicates the number of times the publicUrl has been used to install a pass.
Possible values:
single,multiple - used boolean
If true, a user has accessed the
pathURL.
- serialNumber string
- status string
Indicates whether a pass has been installed or not.
Possible values:
installed,not_been_installed Tags associated with the pass.
- uaEntityId string
- updatedAt string
The date and time when the item was last updated.
- url string
The URL for the pass.
Used in:
Examples
Example Apple Wallet pass response
{
"id": 12345,
"templateId": 123,
"createdAt": "2012-11-01 12:37:07.0",
"url": "https:\/\/wallet-api.urbanairship.com\/v1\/pass\/888\/download",
"publicUrl": {
"path": "https:\/\/wallet-api.urbanairship.com\/v1\/download\/pass\/9c9c9c7d-c6b6-9c9c-9d2b-9c9c9c54c89c",
"used": false,
"type": "Single",
"installs": 0
},
"passFields": {
"sale": {
"changeMessage": "Hey %@, check out our new sale!",
"fieldType": "HEADER",
"value": "20%",
"label": "Percent off",
"required": false
},
"logo_text": {
"changeMessage": null,
"fieldType": "TOP_LEVEL",
"value": "Test Value",
"label": "",
"required": false
},
"boarding_time": {
"changeMessage": "Be at your new gate by %@",
"fieldType": "PRIMARY",
"value": "08:45",
"label": "",
"required": false
},
"thumbnail_image": {
"formatType": "String",
"changeMessage": null,
"fieldType": "image",
"value": "https:\/\/s3.amazonaws.com\/passtools...0bb4_favicon.png",
"label": "",
"required": false,
"hideEmpty": false
}
},
"beacons":[
{
"uuid": "55502220-A123-A88A-F321-555A444B333C",
"relevantText": "You are near the Ship",
"major": 2,
"minor": 346
}
],
"locations":[
{
"relevantText":"Hello loc0",
"latitude":37.618,
"id":30473906,
"longitude":-122.374
}
]
}
Beacon object
Associates a pass with an iBeacon. Apple Wallet supports up to 10 beacons per pass. When the pass holder comes into proximity with an iBeacon bearing the same UUID, the pass becomes relevant (displayed on the lock screen).
OBJECT PROPERTIES- major integerREQUIRED
Major identifier of a beacon.
- minor integerREQUIRED
Minor identifier of a beacon.
- relevantText stringREQUIRED
Text displayed on the lock screen.
- uuid stringREQUIRED
Unique identifier of a beacon.
Used in:
- Add or update beacons for Apple Wallet pass
- Create pass
- Create pass
- Create pass from a template
- Generates a pass
- Get pass
- Get pass
- List beacons on Apple Wallet pass
- Update pass
- Update pass
- Update pass for a template
- Update passes from Adaptive Link
- Update passes from Adaptive Link
Examples
Example beacon object
{
"uuid": "55502220-A123-A88A-F321-555A444B333C",
"relevantText": "You are near the Ship",
"major": 2,
"minor": 346
}
Google Wallet pass request
A pass for Google Wallet. Unlike templates, in which the fieldsModel contains fields nested inside module objects, fields are collapsed in pass requests and responses. The fieldType corresponds to the template field module that the field belongs to.
Aside from differences in field composition, and a lack of beacons, Google Wallet passes are very similar to Apple Wallet passes.
OBJECT PROPERTIES- fields object
Fields for the pass. The template defines a field’s location on the pass and its default value(s). When creating a pass, you only need to populate the fields you want to update, and even then, you only need to provide the
valueyou want to change for the field and thechangeMessageif you want to notify pass holders of the change in the value. - headers object
Include objects from the template
OBJECT PROPERTIESheadersobject if you want to change thelabel,value, orchangeMessagefor fields in the pass header — like barcodes and titles.- expirationDate string
May contain
valueandlabelfields.valueindicates the expiration date of the pass.labelcan be set to eithervalidorvoided, wherevalidindicates a non-expired pass andvoidedindicates that the pass is no longer accepted.
- locations array
A list of locations associated with a pass.
- publicUrl objectREQUIRED
A public URL from which users can download a pass.
For Google Wallet, the public URL deep-links to the Google Wallet store with credentials to download a pass, facilitating pass installation without a browser window. When creating Google Wallet passes, this field is required and you must specify
type: singlein the request to create a pass. If the request does not contain a Public URL, the operation will not return a URL and users will not be able to access the resulting pass.For Apple Wallet, this URL points to a .pkpass file. We recommend using a Public URL when creating Apple Wallet passes. If you do not provide a public URL, users will not be able to install the pass without the API key.
OBJECT PROPERTIES- installs integer
The number of users who have installed the pass from the URL specified in the
pathfield. - path string
The URL for the pass.
- type stringREQUIRED
Determines whether a user can access the link to install a pass one time or multiple times. The response indicates the number of times the publicUrl has been used to install a pass.
Possible values:
single,multiple - used boolean
If true, a user has accessed the
pathURL.
- templateId integer
The identifier for the template. You can recall the template by ID in other operations.
Used in:
Examples
Example Google pass request
{
"headers": {
"expirationDate":{
"value":"2014-08-20T9:41-08:00"
},
"barcodeAltText": {
"changeMessage": null,
"value": "abc1234567890",
"label": ""
},
"barcode_value": {
"changeMessage": null,
"value": "abc1234567890",
"label": ""
}
},
"fields": {
"Coupon": {
"changeMessage": "Enjoy %@ off your next order!",
"value": "20%",
"label": "Coupon"
},
"SiteAddress": {
"changeMessage": "Check out things we think you would like at %@",
"value": "https://www.example.com/new?custnumb=123456",
"label": "personal deals"
},
"InStore": {
"changeMessage": "Or visit your nearest store at %@",
"value": "1234 Fake St.",
"label": "nearestStore"
}
},
"locations":[
{
"longitude": -122.374,
"latitude": 37.618,
"relevantText": "Hello loc0",
"streetAddress1": "address line #1",
"streetAddress2": "address line #2",
"city": "San Francisco",
"region": "CA",
"regionCode": "94404",
"country": "US"
}
],
"publicUrl": {
"type": "single"
}
}
Google Wallet pass response
A pass response for Google Wallet. A pass is a populated template. Therefore, the pass includes all headers and fields from the template, along with identifiers for the pass and URLs to access it.
Unlike templates, in which the fieldsModel contains fields nested inside module objects, fields are collapsed in pass requests and responses. The fieldType corresponds to the template field module (an object) that the field belongs to.
Aside from differences in field composition, and a lack of beacons, Google Wallet passes are very similar to Apple Wallet passes.
OBJECT PROPERTIES- createdAt string
The date and time when the item was created.
- externalId string
The external ID for the pass, returned only if you created the pass using an external ID.
- fields object
Contains all populated fields from the template. The
fieldTypewithin each object indicates themoduleit belonged to.While all fields take a similar shape, the response may contain different keys to represent the
OBJECT PROPERTIESvalueorlabelfrom the originating template field. This has to do with the way that Google Wallet interprets templates and passes.- offerModule object
Specific to google coupons, this module contains information about redeeming the coupon.
OBJECT PROPERTIES- endTime string
The expiration date for the offer.
- multiUseOffer boolean
Indicates whether the coupon/offer is available for multiple users or just a single user.
- provider string
The offer provider name.
- redemptionChannel string
Indicates whether the user can redeem the offer at a physical location or online.
Possible values:
online,instore,both,temporaryPriceReduction
- headers object<Google headers>
Fields appearing in the
headersobject for a Google pass template. Header fields typically follow the same model as other fields for Google Wallet templates and passes, but often have specificvalue,fieldType, andformatTypevalues. - id integer
The internal identifier for the pass. Use this ID to get or modify the pass in other calls.
- publicUrl object
A public URL from which users can download a pass.
For Google Wallet, the public URL deep-links to the Google Wallet store with credentials to download a pass, facilitating pass installation without a browser window. When creating Google Wallet passes, this field is required and you must specify
type: singlein the request to create a pass. If the request does not contain a Public URL, the operation will not return a URL and users will not be able to access the resulting pass.For Apple Wallet, this URL points to a .pkpass file. We recommend using a Public URL when creating Apple Wallet passes. If you do not provide a public URL, users will not be able to install the pass without the API key.
OBJECT PROPERTIES- installs integer
The number of users who have installed the pass from the URL specified in the
pathfield. - path string
The URL for the pass.
- type stringREQUIRED
Determines whether a user can access the link to install a pass one time or multiple times. The response indicates the number of times the publicUrl has been used to install a pass.
Possible values:
single,multiple - used boolean
If true, a user has accessed the
pathURL.
- serialNumber string
- status string
Indicates whether a pass has been installed or not.
Possible values:
installed,not_been_installed Tags associated with the pass.
- uaEntityId string
- updatedAt string
The date and time when the item was last updated.
- url string
The URL for the pass.
Used in:
Examples
Example Google pass response
{
"createdAt": "2018-10-25T19:13:14Z",
"headers": {
"background_color": {
"ignoresTimeZone": null,
"changeMessage": null,
"label": "",
"hideEmpty": false,
"formatType": "String",
"value": "#006491",
"fieldType": "topLevel",
"required": false
},
"strip_image": {
"ignoresTimeZone": null,
"changeMessage": null,
"label": "",
"hideEmpty": false,
"formatType": "String",
"value": "https://s3.amazonaws.com/passtools_prod/1169167/images/587ac4e3d188b0fcd4f05038d8814fefd82ac834_iOS_Logo_320x100_WHITE.png",
"fieldType": "image",
"required": false
},
"expirationDate": {
"ignoresTimeZone": null,
"changeMessage": null,
"label": "",
"hideEmpty": false,
"formatType": "String",
"value": "2019-10-25T19:13:14Z",
"fieldType": "topLevel",
"required": false
}
},
"serialNumber": "06bad8bd-b399-4c86-83b6-06fcee2e52b6",
"uaEntityId": "9e3bf713-f6e6-4d6e-b2d4-c9ab6028892e",
"id": "47400533",
"templateId": "63621",
"fields": {
"image": {
"ignoresTimeZone": null,
"title.string": "https://s3.amazonaws.com/passtools_prod/1169167/images/9af688aea35f473e29ca187438c12083202f1eeb_Android_Logo_660x660.png",
"hideEmpty": false,
"formatType": "String",
"fieldType": "titleModule",
"description.string": "Logo Image"
},
"Details": {
"col": 0,
"ignoresTimeZone": null,
"header": "Coupon Details",
"hideEmpty": false,
"row": 0,
"formatType": "String",
"body": "25% off when you spend £20 or more online using code WNTRBLOG",
"fieldType": "textModulesData"
},
"FinePrint": {
"col": 0,
"ignoresTimeZone": null,
"header": "Terms & Conditions ",
"hideEmpty": false,
"row": 0,
"formatType": "String",
"body": "Please go to http://www.dominos.co.uk and click on “Boring Legal Stuff”",
"fieldType": "textModulesData"
},
"offerModule": {
"multiUserOffer": false,
"redemptionChannel": "both",
"provider": "Domino's Snap Offer",
"endTime": "2018-01-31T00:00:00.000Z"
},
"Merchant Website": {
"ignoresTimeZone": null,
"description": "Visit Us Online",
"hideEmpty": false,
"formatType": "URL",
"uri": "https://www.dominos.co.uk/?vc=WNTRBLOG",
"fieldType": "linksModuleData",
"order": 1
},
"imageModulesData": {
"image": "https://s3.amazonaws.com/passtools_prod/1169167/images/834420d3cbf287f56c8be46806e58e23e8296e94_Android_Hero_1032x336_Opt1.png",
"ignoresTimeZone": null,
"imageDescription": "Logo Image",
"hideEmpty": false,
"formatType": "String",
"fieldType": "imageModulesData"
},
"Coupon Title": {
"col": 0,
"ignoresTimeZone": null,
"title.string": "Coupon",
"hideEmpty": false,
"row": 0,
"formatType": "String",
"fieldType": "titleModule",
"description.string": "25% Off Online "
}
},
"url": "https://wallet-api.urbanairship.com/v1/pass/47400533/download",
"updatedAt": "2018-10-25T19:13:14Z",
"tags": [],
"status": "installed"
}