Add actions to a pass
Add links to a pass that open relevant content or services, such as an event schedule or online store.
How actions work
Actions appear on passes as styled sections with a visual element and text. Selecting the section opens your defined link.
For each action, you set its type and provide the URL it should open. The same set of action types is available for both platforms. This provides a consistent action model while preserving each platform’s native appearance.
Passes support up to two actions, and the platform determines where they appear and supplies the label, icon, or other display content based on its type:
| Platform | Location | Field mapping reference |
|---|---|---|
| Apple Wallet | Up to two on the front of the pass | Apple Wallet Featured Actions |
| Google Wallet | One on the front of the pass, or both on the details screen on the back of the pass if there are two | Google Wallet Value Added Opportunities |
You can add actions to passes using the API. Set them on a template so every generated pass shares the same values, or override them for an individual pass, even if the template didn’t include any.
Action types
The following action types are supported:
| Type | Display name | Purpose | Recommended Airship pass types |
|---|---|---|---|
addToBalance | Add to Balance | Open a page where the pass holder can add funds. | Member card, Gift card, Loyalty |
bookAppointment | Book an Appointment | Open a scheduling service. | Member card, Loyalty, Generic |
bookCar | Book a Car | Open a car rental booking service. | Member card, Gift card, Loyalty, Boarding pass |
bookFlight | Book a Flight | Open an airline booking service. | Member card, Gift card, Loyalty, Boarding pass |
bookStay | Book a Stay | Open a hotel or hospitality booking service. | Member card, Gift card, Loyalty, Boarding pass |
call | Call | Open the phone app to call support. | Generic, Boarding pass |
listenToMusic | Listen to Music | Open an artist playlist. | Event ticket |
membershipBenefits | View Membership Benefits | Open membership benefits, points, or tier information. | Member card, Gift card, Loyalty |
order | Order Delivery or Pickup | Open an ordering service. | Member card, Gift card, Loyalty |
place | Go to Location | Open a location in Maps. | Generic, Event ticket, Boarding pass |
shop | Shop Online or In-App | Open an online store or app. | Member card, Gift card, Loyalty, Coupon |
viewOffersRewards | View Offers and Rewards | Open membership offers or rewards. | Member card, Gift card, Loyalty, Coupon, Event ticket, Boarding pass, Generic |
viewSchedule | View Schedule | Open an event schedule. | Event ticket |
watchTrailer | Watch Trailer | Open an event trailer. | Event ticket |
For a boarding pass, choose an action that is relevant to the passenger’s context, such as booking a flight, car, or stay, opening an airport location, or contacting customer support.
Add actions
Set actions in a top-level customActions array in a template or pass payload. It is a sibling of the fields object.
Each action must contain these properties:
type— The action type. See the list of Action types for supported values.url— The absolute web link or deep link that opens when the pass holder selects the action.
You can also add an id, which is your identifier for the action. Airship does not send this value to Apple or Google.
Airship ignores actions with a missing type or invalid URL, without returning an API error. Apple Wallet ignores unsupported types. If you provide more than two valid actions, Airship uses the first two.
See the Actions object in the Wallet API.
Add an action to a template
Add customActions to a template, with each action’s type and url, so passes generated from it use those actions as defaults. Use the Patch template endpoint to update just the actions without replacing the complete template. Install a test pass for each platform to confirm changes.
PATCH /templates/12345 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
{
"fields": {},
"customActions": [
{
"type": "viewSchedule",
"url": "https://example.com/events/zebra-waves/schedule"
}
]
}Override actions on a pass
Add customActions to individual passes to use different actions than those defined for their template. Use the Create pass or Update pass endpoint to send the change.
PUT /v1/pass/67890 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2
{
"fields": {
"eventName": {
"value": "Zebra Waves Tour"
},
"venueTitle": {
"value": "Succor Concert Center"
}
},
"customActions": [
{
"type": "viewSchedule",
"url": "https://example.com/events/zebra-waves/schedule"
},
{
"type": "listenToMusic",
"url": "https://example.com/artists/zebra-waves/music"
}
]
}