Add actions to a pass

Add links to a pass that open relevant content or services, such as an event schedule or online store.

View as Markdown

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:

PlatformLocationField mapping reference
Apple WalletUp to two on the front of the passApple Wallet Featured Actions
Google WalletOne on the front of the pass, or both on the details screen on the back of the pass if there are twoGoogle 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:

TypeDisplay namePurposeRecommended Airship pass types
addToBalanceAdd to BalanceOpen a page where the pass holder can add funds.Member card, Gift card, Loyalty
bookAppointmentBook an AppointmentOpen a scheduling service.Member card, Loyalty, Generic
bookCarBook a CarOpen a car rental booking service.Member card, Gift card, Loyalty, Boarding pass
bookFlightBook a FlightOpen an airline booking service.Member card, Gift card, Loyalty, Boarding pass
bookStayBook a StayOpen a hotel or hospitality booking service.Member card, Gift card, Loyalty, Boarding pass
callCallOpen the phone app to call support.Generic, Boarding pass
listenToMusicListen to MusicOpen an artist playlist.Event ticket
membershipBenefitsView Membership BenefitsOpen membership benefits, points, or tier information.Member card, Gift card, Loyalty
orderOrder Delivery or PickupOpen an ordering service.Member card, Gift card, Loyalty
placeGo to LocationOpen a location in Maps.Generic, Event ticket, Boarding pass
shopShop Online or In-AppOpen an online store or app.Member card, Gift card, Loyalty, Coupon
viewOffersRewardsView Offers and RewardsOpen membership offers or rewards.Member card, Gift card, Loyalty, Coupon, Event ticket, Boarding pass, Generic
viewScheduleView ScheduleOpen an event schedule.Event ticket
watchTrailerWatch TrailerOpen 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.

Add a single action to a template
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.

Add two actions to a pass
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"
    }
  ]
}