The template for your boarding pass holds the design elements of the boarding pass. This includes field placements, static field values, images and links.
Terminology
Template
A JSON object that defines the design and structure of a boarding pass. It includes information about field placements, static values, images, and links.
Payload
The specific JSON data used to create a template. This data contains all the configurable elements for the boarding pass design.
Fields
Individual data elements on the boarding pass
Creating Your Template
Example Payload
Below is an example of a template that can be used to create your boarding pass template.
β
{
"name": "PK Airways",
"protocol": "FLIGHT_PROTOCOL",
"revision": 1,
"defaultLanguage": "EN",
"organizationName": "PK Airways",
"description": "PK Airways Boarding Pass",
"data": {
"dataFields": [
{
"uniqueName": "flights.carrierFlightNumber",
"fieldType": "PROTOCOL_FIELDS",
"label": "Flight",
"dataType": "TEXT",
"defaultValue": "${flights.carrierFlightNumber}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "HEADER_FIELDS",
"priority": 1
},
"changeMessage": "Flight changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.departureDate",
"fieldType": "PROTOCOL_FIELDS",
"label": "Date",
"dataType": "DATE_YYYYMMDD",
"defaultValue": "${flights.departureDate}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "HEADER_FIELDS",
"priority": 2
},
"changeMessage": "Flight Date changed to %@.",
"localizedChangeMessage": {},
"dateStyle": "DATE_TIME_STYLE_SHORT"
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.originCode",
"fieldType": "PROTOCOL_FIELDS",
"label": "${flights.originName}",
"dataType": "TEXT",
"defaultValue": "${flights.originCode}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "PRIMARY_FIELDS",
"priority": 1
},
"changeMessage": "Origin changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.destinationCode",
"fieldType": "PROTOCOL_FIELDS",
"label": "${flights.destinationName}",
"dataType": "TEXT",
"defaultValue": "${flights.destinationCode}",
"appleWalletFieldRenderOptions": {
"textAlignment": "RIGHT",
"positionSettings": {
"section": "PRIMARY_FIELDS",
"priority": 2
},
"changeMessage": "Destination changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "custom.passenger.name",
"fieldType": "PII",
"label": "Passenger Name",
"dataType": "TEXT",
"defaultValue": "${person.salutation} ${person.displayName} ${passenger.infantFlag}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "AUXILIARY_FIELDS",
"priority": 1
},
"changeMessage": "Passenger Name changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.seatNumber",
"fieldType": "PROTOCOL_FIELDS",
"label": "Seat",
"dataType": "TEXT",
"defaultValue": "${flights.seatNumber}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "AUXILIARY_FIELDS",
"priority": 2
},
"changeMessage": "Seat changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.departureGate",
"fieldType": "PROTOCOL_FIELDS",
"label": "Gate",
"dataType": "TEXT",
"defaultValue": "${flights.departureGate}",
"appleWalletFieldRenderOptions": {
"textAlignment": "RIGHT",
"positionSettings": {
"section": "AUXILIARY_FIELDS",
"priority": 3
},
"changeMessage": "Boarding gate changed to %@."
},
"dataCollectionFieldRenderOptions": {},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.boardingTime",
"fieldType": "PROTOCOL_FIELDS",
"label": "Boarding",
"dataType": "TIME",
"defaultValue": "${flights.boardingTime}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "SECONDARY_FIELDS",
"priority": 1
},
"changeMessage": "Boarding time changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "custom.flights.departureDate",
"fieldType": "PROTOCOL_FIELDS",
"label": "Departing",
"dataType": "TIME",
"defaultValue": "${flights.departureDate}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "SECONDARY_FIELDS",
"priority": 2
},
"changeMessage": "Boarding time changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.class",
"fieldType": "PROTOCOL_FIELDS",
"label": "Cabin",
"dataType": "TEXT",
"defaultValue": "${flights.class}",
"appleWalletFieldRenderOptions": {
"textAlignment": "RIGHT",
"positionSettings": {
"section": "SECONDARY_FIELDS",
"priority": 3
},
"changeMessage": "Cabin changed to %@."
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "flights.operatingCarrierPNR",
"fieldType": "PROTOCOL_FIELDS",
"isRequired": false,
"label": "Booking Reference",
"dataType": "TEXT",
"defaultValue": "${flights.operatingCarrierPNR}",
"appleWalletFieldRenderOptions": {
"textAlignment": "LEFT",
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 1
},
"changeMessage": "Booking Reference changed to %@.",
"suppressLinkDetection": [
"LINK_DETECTOR_PHONE",
"LINK_DETECTOR_DATE",
"LINK_DETECTOR_ADDRESS"
]
},
"usage": [
"USAGE_APPLE_WALLET",
"USAGE_GOOGLE_PAY"
],
"googlePayFieldRenderOptions": {
"googlePayPosition": "GOOGLE_PAY_TEXT_MODULE",
"textModulePriority": 1
}
},
{
"uniqueName": "custom.passenger.frequentFlyer.number",
"fieldType": "CUSTOM_FIELDS",
"label": "Velocity Membership Number",
"dataType": "TEXT",
"defaultValue": "${passenger.frequentFlyer.number} ${passenger.frequentFlyer.tier}",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 2
},
"changeMessage": "Velocity Membership Number changed to %@.",
"suppressLinkDetection": [
"LINK_DETECTOR_PHONE",
"LINK_DETECTOR_DATE",
"LINK_DETECTOR_ADDRESS"
]
},
"usage": [
"USAGE_APPLE_WALLET",
"USAGE_GOOGLE_PAY"
],
"googlePayFieldRenderOptions": {
"googlePayPosition": "GOOGLE_PAY_TEXT_MODULE",
"textModulePriority": 2
}
},
{
"uniqueName": "custom.flight.status",
"fieldType": "CUSTOM_FIELDS",
"label": "Flight Status",
"dataType": "TEXT",
"defaultValue": "<a href='https://passkit.com'>Tap for flight status</a>",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 3
},
"suppressLinkDetection": [
"LINK_DETECTOR_PHONE",
"LINK_DETECTOR_DATE",
"LINK_DETECTOR_ADDRESS"
]
},
"usage": [
"USAGE_APPLE_WALLET"
]
},
{
"uniqueName": "custom.baggage.checked",
"fieldType": "CUSTOM_FIELDS",
"label": "Checked Baggage",
"dataType": "TEXT",
"defaultValue": "Please take any checked baggage to the Bag Drop counter at the airport.",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 4
}
},
"usage": [
"USAGE_APPLE_WALLET",
"USAGE_GOOGLE_PAY"
],
"googlePayFieldRenderOptions": {
"googlePayPosition": "GOOGLE_PAY_TEXT_MODULE",
"textModulePriority": 3
}
},
{
"uniqueName": "custom.baggage.carryon",
"fieldType": "CUSTOM_FIELDS",
"label": "Carry-on Baggage",
"dataType": "TEXT",
"defaultValue": "Please note that a total of 7kg of carry-on baggage is permitted per guest.",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 5
}
},
"usage": [
"USAGE_APPLE_WALLET",
"USAGE_GOOGLE_PAY"
],
"googlePayFieldRenderOptions": {
"googlePayPosition": "GOOGLE_PAY_TEXT_MODULE",
"textModulePriority": 4
}
},
{
"uniqueName": "custom.extras",
"fieldType": "PROTOCOL_FIELDS",
"label": "Travel Extras",
"dataType": "TEXT",
"defaultValue": "<a href='https://passkit.com'>Car Hire</a>\n<a href='https://passkit.com'>Hotel</a>\n<a href='hhttps://passkit.com'>Insurance</a>\n<a href='https://passkit.com'>Activities</a>",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 6
}
},
"usage": [
"USAGE_APPLE_WALLET"
]
}
]
},
"imageIds": {
"icon": "1PdCobtmt9Uldw5wsU1eiJ",
"logo": "6VNQDDQ53Nt1AO9IMN2lF2",
"appleLogo": "6xjzIVJaecDmInwn1Erbyn",
"appImage": "7HB1zQZpnHnNuQ8tAdPDVA"
},
"colors": {
"backgroundColor": "#0d0a2b",
"labelColor": "#3286d9",
"textColor": "#FFFFFF"
},
"barcode": {
"payload": "${flights.barcodePayload}",
"format": "AZTEC",
"altText": "Seq: ${flights.sequenceNumber}",
"messageEncoding": "iso-8859-1"
},
"nfcEnabled":
{
"enabled": false,
"certificateId": "",
"payload": ""
},
"sharing": {
"prohibitSharing": true,
"url": "",
"description": ""
},
"appleWalletSettings": {
"passType": "BOARDING_PASS",
"transitType": "TRANSIT_TYPE_AIR",
"groupingIdentifier": "${flights.pnr}",
"appStoreIdentifiers": [1060472593]
},
"googlePaySettings": {
"passType": "FLIGHT",
"androidApp": {
"url": {
"url": "hhttps://play.google.com/store/apps/details?id=com.passkit.passreader&hl=en",
"title": "PK Airways"
},
"title": "PK Airways",
"description": "The PK Airways app is your perfect travel companion. Check into your flight, view your boarding pass, watch movies, and track your bags all from your phone."
},
"classTemplateInfo": "{\"cardTemplateOverride\":{\"cardRowTemplateInfos\":[{\"threeItems\":{\"startItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.passengerName\"}]}},\"middleItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.boardingAndSeatingInfo.seatNumber\"}]}},\"endItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"class.origin.gate\"}]}}}},{\"threeItems\":{\"startItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"class.localBoardingDateTime\",\"dateFormat\":\"TIME_ONLY\"}]}},\"middleItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"class.localScheduledDepartureDateTime\",\"dateFormat\":\"DATE_TIME\"}]}},\"endItem\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.boardingAndSeatingInfo.seatClass\"}]}}}}]},\"detailsTemplateOverride\":{\"detailsItemInfos\":[{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"class.Messages\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.Messages\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.textModulesData[0]\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.textModulesData[1]\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.textModulesData[2]\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.textModulesData[3]\"}]}}},{\"item\":{\"firstValue\":{\"fields\":[{\"fieldPath\":\"object.linksModuleData\"}]}}}]}}",
"backgroundColor": "#0d0a2b"
},
"timezone": "Australia/Brisbane",
"links": [
{
"url": "https://passkit.com",
"title": "Flight Status",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 1
},
{
"url": "https://passkit.com",
"title": "Car Hire",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 2
},
{
"url": "https://passkit.com",
"title": "Hotel",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 3
},
{
"url": "https://passkit.com",
"title": "Insurance",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 4
},
{
"url": "https://passkit.com",
"title": "Activities",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 5
}
],
"landingPageSettings": {
"landingLocalizationOverride": [
"EN",
"JA",
"KO",
"TH",
"ID",
"VI",
"ZH_HANT",
"ZH_HANS"
]
}
}
Editing the Template
You will need to edit the template to fit your branding, this is done in the following sections.
Template Name and Description
Change the name, organizationName and description to reflect your details.
"name": "PK Airways",
"protocol": "FLIGHT_PROTOCOL",
"revision": 1,
"defaultLanguage": "EN",
"organizationName": "PK Airways",
"description": "PK Airways Boarding Pass",
Images and colours
Add the image ID's you created in the previous step, and select the colours you wish to use on your design.
"imageIds": {
"icon": "1PdCobtmt9Uldw5wsU1eiJ",
"logo": "6VNQDDQ53Nt1AO9IMN2lF2",
"appleLogo": "6xjzIVJaecDmInwn1Erbyn",
"appImage": "7HB1zQZpnHnNuQ8tAdPDVA"
},
"colors": {
"backgroundColor": "#0d0a2b",
"labelColor": "#3286d9",
"textColor": "#FFFFFF"
},
Apple Wallet Links
Find the link sections for Apple Wallet, and edit the links for your website and required links. Below is one example.
{
"uniqueName": "custom.extras",
"fieldType": "PROTOCOL_FIELDS",
"label": "Travel Extras",
"dataType": "TEXT",
"defaultValue": "<a href='https://passkit.com'>Car Hire</a>\n<a href='https://passkit.com'>Hotel</a>\n<a href='hhttps://passkit.com'>Insurance</a>\n<a href='https://passkit.com'>Activities</a>",
"appleWalletFieldRenderOptions": {
"positionSettings": {
"section": "BACK_FIELDS",
"priority": 6
}
},
Google Pay Settings
In the Google Pay Settings, change the url, title and description
"googlePaySettings": {
"passType": "FLIGHT",
"androidApp": {
"url": {
"url": "hhttps://play.google.com/store/apps/details?id=com.passkit.passreader&hl=en",
"title": "PK Airways"
},
"title": "PK Airways",
"description": "The PK Airways app is your perfect travel companion. Check into your flight, view your boarding pass, watch movies, and track your bags all from your phone."
And change the Google Wallet theme colour.
"backgroundColor": "#0d0a2b"
Google Wallet Links
Find the link sections for Google Wallet, and edit the links for your website and required links. Below is one example.
"links": [
{
"url": "https://passkit.com",
"title": "Flight Status",
"type": "URI_WEB",
"usage": [
"USAGE_GOOGLE_PAY"
],
"position": 1
},
Using the Postman Collection
You can find the Create Template (Flights) endpoint with an example in the Postman Collection.
PassKit v4 SDK/Flights/Create Template (Flights)
Edit the payload as explained above, and click Invoke to run the request.
A successful request will return the Template ID.
Make a note of the Template ID you just created, it will be needed when you create the Flight