Boarding pass overrides
You can customize fields in the Card Template area of Google boarding passes, providing flexibility when designing your boarding passes.
Boarding pass templates rely on Google’s default pass designs. You can override the placement and order of fields on your templates through the wallet template editor or the wallet API.
If you are using the Update Template API to override the layout of a pass, it may help you to first view the template in the template editor to better understand its current layout.
Google Pass Layout
Google passes are organized into sections, each of which has a default layout. You can pass overrides
when creating your boarding pass template to customize the labels and layout of fields in the sections listed below.
When you override the label or position of a field in one of these sections, you must override all the fields in that section.
You cannot override the Card Title section.
You can override the following sections:
cardTemplate
: Supports 2 rows, 3 columns of information. You can override the area in this part of the template.barcodeSection
: The barcode area of the template.detailsTemplate
: A list of pass details below the barcode.listTemplate
: The pass details that users see in their wallet before they open their pass.
The Card Title
You can’t override fields in the card title section of a boarding pass template. This includes the fields shown below. In the case of the departureAirport
, and arrivalAirport
, we show both the label
and value
on the pass.
Fields on the card template are all populated from the flight object — either in the /flights
API or as a part of an object within an array of payload.flights
in an adaptive link request. The table below lists the items on the template and the flight object values that populate the template field when you create a pass.
Required items in the table below represent the required properties in the adaptive link payload, and are therefore required to be on a pass. While other fields may not be required, and you can hide them if empty, you may want to leave them blank and populate them as the departureTime
approaches so your passengers know where to look on the pass to find new information.
Moving a template on a field moves both the label
and value
keys, if both keys exist, for a flight or passenger.
While the API allows for label
values at the template field and flight object level, Google does not typically allow you to override field labels for boarding passes. In most cases, label
overrides at the flight level apply to Apple Wallet passes only.
The table below relates template field names to the keys that populate the template in the adaptive link payload.flights[]
array of objects.
Template field | Adaptive Link keypayload.flights[] | Default label | Required | |
---|---|---|---|---|
1 | image | ✅ | ||
2 | airlineName | fields.airlineName.value | ✅ | |
3 | flightNumber 1 | fields.flightNumber.value | ✅ | |
4 | departureAirport | fields.departureAirport.label 2 | ✅ | |
5 | fields.departureAirport.value | ✅ | ||
6 | arrivalAirport | fields.arrivalAirport.label 2 | ✅ | |
7 | fields.arrivalAirport.value | ✅ |
1 This field also appears in the detailsTemplate
. You can override this field to change its placement elsewhere on the pass, but you cannot remove or change its placement on the card title.
2Typically set by the corresponding value
property. You can override the Airport name using the label
field, but you don’t have to set this value manually when creating flights.
The Card Template
The Card Template consists of 2 rows. The first row supports three columns. The second row supports 2 columns. All row
/col
combinations support subcol
, allowing for 2 template fields per rectangle in the image below.
Required items in the table below represent the required properties in the adaptive link payload, and are therefore required to be on a pass. While other fields may not be required, and you can hide them if empty, you may want to leave them blank and populate them as the departureTime
approaches so your passengers know where to look on the pass to find new information.
Moving a template on a field moves both the label
and value
keys, if both keys exist, for a flight or passenger.
While the API allows for label
values at the template field and flight object level, Google does not typically allow you to override field labels for boarding passes. In most cases, label
overrides at the flight level apply to Apple Wallet passes only.
The table below relates template field names to the keys that populate the template in the adaptive link payload.flights[]
array of objects.
Template field | Adaptive Link keypayload.flights[] | Default label | Required | |
---|---|---|---|---|
1 | departureTerminal | fields.departureTerminal.label | TERMINAL | |
2 | fields.departureTerminal.value | |||
3 | departureGate | fields.departureGate.label | GATE | |
4 | fields.departureGate.value | |||
5 | seatClassPolicy 1 | fields.seatClass.label | CABIN | |
6 | seatClass | passengers[].fields.seatClass | ||
7 | boardingTime 2 | fields.boardingTime.label | ||
8 | fields.boardingTime.value | |||
9 | passengerName | passengers[].fields.passengerName.label | PASSENGER | |
10 | passengers[].fields.passengerName.value | ✅ | ||
11 | boardingGroup | passengers[].fields.boardingGroup.label | GROUP | |
12 | passengers[].fields.boardingGroup.value | |||
13 | seatNumber | passengers[].fields.seatNumber.label | SEAT | |
14 | passengers[].fields.seatNumber |
1The label changes based on the seatClassPolicy
set on the flight.
2This field also appears on the detailsTemplate
.
The Barcode Template
The barcode template consists of four rows. You can set default values for a few items on the template, but the barcode value itself is populated from the headers
in your template or adaptive link with a confirmationCode
value set for each passenger.
Required items in the table below represent the required properties in the adaptive link payload, and are therefore required to be on a pass. While other fields may not be required, and you can hide them if empty, you may want to leave them blank and populate them as the departureTime
approaches so your passengers know where to look on the pass to find new information.
Moving a template on a field moves both the label
and value
keys, if both keys exist, for a flight or passenger.
While the API allows for label
values at the template field and flight object level, Google does not typically allow you to override field labels for boarding passes. In most cases, label
overrides at the flight level apply to Apple Wallet passes only.
The table below relates template field names to the keys that populate the template in the adaptive link payload.flights[]
array of objects.
Template field | Adaptive Link keypayload.flights[] | Default label | Required | |
---|---|---|---|---|
1 | headers.securityProgramLogo |
| ||
2 | headers.boardingPrivilegeImage |
| ||
3 | headers.barcode_value | passengers[].fields.confirmationCode | ||
4 |
| headers.barcodeAltText | ||
5 | headers.airlineAllianceLogo | fields.airlineAllianceLogo |
The Details Template
The detailsTemplate
supports a number of single-column rows, each supporting subcol
— two items separated by a /
. Generally, website and image rows on the details template, are set at the template level, though you can set them within an adaptive link payload by providing a field object (with label
and/or value
keys) outside of the flights object.
Required items in the table below represent the required properties in the flight or passenger objects when creating adaptive links, and are therefore required to be on a pass. While other fields may not be required, and you can hide them if empty, you may want to populate these fields as the departureTime
approaches.
Moving a template on a field moves both the label
and value
keys, if both keys exist, for a flight or passenger.
While the API allows for label
values at the template field and flight object level, Google does not typically allow you to override field labels for boarding passes. In most cases, label
overrides at the flight level apply to Apple Wallet passes only.
The table below relates template field names to the keys that populate the template in the adaptive link payload.flights[]
array of objects.
Template field | Adaptive Link keypayload.flights[] | Default label | Required | |
---|---|---|---|---|
1 | boardingPosition | Position | ||
2 | passengers[].fields.boardingPosition.value | |||
3 | sequenceNumber | Sequence | ||
4 | passengers[].fields.sequenceNumber.value | |||
5 | boardingDoor | Boarding Door | ||
6 | passengers[].fields.boardingDoor.value | |||
7 | flightNumber | Flight Number | ||
8 | fields.flightNumber.value | ✅ | ||
9 | confirmationCode | Confirmation Code | ||
10 | passengers[].fields.confirmationCode.value | ✅ | ||
11 | eticketNumber | Ticket Number | ||
12 | passengers[].fields.eticketNumber.value | ✅ | ||
13 | frequentFlyerNumber frequentFlyerProgramName | Frequent Flyer Number1 | ||
14 | passengers[].fields.frequentFlyerProgramName.value passengers[].fields.frequentFlyerNumber.value | |||
15 | boardingTime | fields.boardingTime.label | Boarding Time | |
16 | fields.boardingTime.value | |||
17 | gateClosingTime | fields.gateClosingTime.label | Gate Closes | |
18 | fields.gateClosingTime.value | |||
19 | departureTime | fields.departureTime.label | Scheduled | |
20 | fields.departureTime.value | |||
21 | actualDepartureTime | fields.actualDepartureTime.label | Estimated Departure | |
22 | fields.actualDepartureTime.value | |||
23 | arrivalTime | fields.arrivalTime.label | Scheduled | |
24 | fields.arrivalTime.value | |||
25 | actualArrivalTime | fields.actualArrivalTime.label | Estimated Arrival | |
26 | fields.actualArrivalTime.value | |||
27 | arrivalTerminal | fields.arrivalTerminal.label | Arrival Terminal | |
28 | fields.arrivalTerminal.value | |||
29 | arrivalGate | fields.arrivalGate.label | Gate | |
30 | fields.arrivalGate.value | |||
31 | boardingPrivilegeImage |
| ||
32 | Random Information 1 | |||
33 | Website 1 |
1These fields are part of default templates created through the Airship user interface. You can set their values at the template level or set them at the adaptive link level, if you want the value(s) should change.
Template Overrides
You can override the order of items in a section of your template, or the information in a template section, by specifying an overrides
object. This object contains the section(s) that you want a field to appear in and the order or placement of a field in that section using row
, col
, and subcol
properties.
Two fields can occupy the same row
and col
. Use the subcol
to determine the order of fields in the same row and column positions.
In the example below, we’ll move the boardingTime
and departureGate
to the second row (index 1) and first column on the card template. Because these two fields will occupy the same space on the template, we’ll also set the subcol
to ensure that the boarding time appears first.
If you override a field in a template section, you must set overrides for all fields in that section. Fields without an override in a section that uses overrides will not appear in a section or on your passes.
{
"boardingTime": {
"fieldType": "flightModule",
"value": "",
"formatType": "String",
"label": "",
"hideEmpty": false,
"required": false,
"overrides": {
"cardTemplate": {
"row": 1,
"col": 0,
"subCol": 0,
"dateStyle": "timeOnly"
}
}
},
"departureGate": {
"fieldType": "flightModule",
"value": "",
"formatType": "String",
"label": "",
"hideEmpty": false,
"required": false,
"overrides": {
"cardTemplate": {
"row": 1,
"col": 0,
"subCol": 1
}
}
}
}
Boarding pass with default fields | Boarding pass with overrides |
Override a Template
The card template consists of up to two rows, with up to three items per row (left, center, and right). You can add or move fields around the cardTemplate
to better organize your passes.
We recommend testing overrides with a duplicate template before modifying a template that is associated with live passes. The steps here include duplication, creating an Adaptive LinkA vendor-agnostic, shortened mobile wallet pass link that supports templates for both Google Wallet and Apple Wallet. When a user taps the link, Airship determines the user’s platform and generates the right pass for that platform., and viewing the passes on local devices to verify that your overrides perform the way you expect.
You must have at least one Apple Wallet and one Google Wallet template to create an adaptive link.
Duplicate an Apple Wallet or Google Wallet template you want to override, and use its
templateId
in the following steps.Use the
/templates
API to get your template payload. This call, as opposed to the/v1/template
endpoints, returns a template payload in exactly the same format as you would use in aPOST
orPUT
operation.GET /templates/160571 HTTP/1.1 Authorization: Basic <authorization string> Content-Type: application/json
Update your template with
overrides
using aPATCH
against the/templates/{templateId}
endpoint. In the payload, you only need to provide the fields in your template that you want to override.Note If your template contains fields that aren’t a part of the default template design, like
fareType
ordepartureGate
, they must containlabel
andvalue
keys. You can set empty strings in your template and replace these values when you generate passes, but failing to setlabel
orvalue
keys will prevent those fields from rendering properly on your pass.PATCH /templates/<templateId> HTTP/1.1 Authorization: Basic <authorization string> Content-Type: application/json { "fields": { "passengerInfo": { "fieldType": "infoModuleData", "value": "First/Last", "formatType": "String", "label": "PASSENGER", "order": 5, "overrides": { "cardTemplate": { "row": 0, "col": 0 } } }, "boardingPosition": { "fieldType": "flightModule", "value": "___", "formatType": "String", "label": "POSITION", "hideEmpty": false, "required": false, "overrides": { "cardTemplate": { "row": 0, "col": 1 } } }, "departureGate": { "fieldType": "flightModule", "value": "__", "formatType": "String", "label": "", "hideEmpty": false, "required": false, "overrides": { "cardTemplate": { "row": 0, "col": 2 } } }, "fareType": { "fieldType": "infoModuleData", "value": "__", "formatType": "String", "label": "FARE", "hideEmpty": false, "required": false, "order": 2, "overrides": { "cardTemplate": { "row": 1, "col": 0 } } }, "boardsOrEmptyInfo": { "fieldType": "infoModuleData", "value": "", "formatType": "String", "label": "BOARDS", "hideEmpty": false, "required": false, "order": 6, "overrides": { "cardTemplate": { "row": 1, "col": 1 } } }, "boardsOrSecurityInfo": { "fieldType": "infoModuleData", "value": "__", "formatType": "String", "label": "__", "hideEmpty": false, "required": false, "order": 7, "overrides": { "cardTemplate": { "row": 1, "col": 2 } } } } }
Repeat steps 2 and 3 for the other platform so that you have will have updated templates for both Apple Wallet and Google Wallet.
Create an adaptive link for the updated template IDs, using the API or dashboard. Your adaptive link must include passenger information:
- For
passengers
, bothpassengerName
andconfirmationCode
are required fields. - For
flights
,departureTime
,departureAirport
,arrivalAirport
,flightNumber
, andairlineCode
are required fields.
- For
Paste the adaptive link in local Android and iOS devices, save the passes, and confirm they appear as you expected.
If the passes appear as expected, repeat steps 1-2 for your original templates.
(Optional) Confirm the appearance of the passes based on your original templates, and delete the duplicate templates you used for testing.
Reverting Boarding Pass Template Overrides
If you want to revert a template section to the default layout, update your template with an empty overrides
object.
{
"departureGate": {
"fieldType": "flightModule",
"value": "",
"formatType": "String",
"label": "",
"hideEmpty": false,
"required": false,
"overrides": {}
}
}
Override properties
The overrides
a group of objects, each representing an individual override for the field. All Integer properties are 0-indexed.
overrides
: an object with child properties for each section where a field will appears on a pass. Supported child objects: cardTemplate
, barcodeSection
, detailsTemplate
, listTemplate
. Set an empty object to reset a field to the default layout.
row
: Integer; the row the field should appear in. The number of available rows depends on the template type
.
col
: Integer; the column the field should appear in. There are 3 columns in the card template, 0 is the left column, 1 is the center, and 2 is the right column.
subcol
: Integer, 0 or 1; when multiple fields use the same row
and col
, this determines whether a field appears on the left or the right in the column.
dateStyle
: String; for fields that take ISO date-times, use dateStyle
to override the default format for dates and times. Different fields have different default date styles. Accepted values:
date-time
: Show both date and timedateOnly
: Display only the datetimeOnly
: Display only the timedateTimeYear
: Display the date, time, and yeardateYear
: Display the date and year
{
"boardingTime": {
"fieldType": "flightModule",
"value": "",
"formatType": "String",
"label": "",
"hideEmpty": false,
"required": false,
"overrides": {
"cardTemplate": {
"col": 0,
"row": 1,
"subcol": 0,
"dateStyle": "timeOnly"
}
}
}
}
Date and Time Styles
Several fields in the flight object take date-time string values. By default board pass templates shape date-time values to fit their placement on the pass. For example, boardingTime
only shows the time when the user boards a plane, rather than the full date and time. However, you can override the default date-time format for any field using the dateStyle
key in an override object setting the following styles:
date-time
: Show both date and timedateOnly
: Display only the datetimeOnly
: Display only the timedateTimeYear
: Display the date, time, and yeardateYear
: Display the date and year
If you override the dateStyle
for a field, you must also set overrides for all of the fields within a template section.
You can use dateStyle
with the following boarding pass fields.
Field | Default style |
---|---|
boardingTime | timeOnly |
arrivalTime | date-time |
actualArrivalTime | timeOnly |
departureTime | date-time |
actualDepartureTime | timeOnly |
Categories