# Wallet API Use Airship's REST APIs to create and manage Apple Wallet and Google Wallet passes for your customers. # Introduction > The Wallet API provides programmatic access to Airship Wallet service, where you can create passes for Apple Wallet and Google Wallet. Passes are: * Created from templates within a project. The project determines the types of templates and passes you create; your templates determine the style and default data for your passes. * Distributed as links—When creating a pass or an adaptive link, you are creating a link. Users tap this link (or scan a QR code representing the link, etc.) to install the pass on their device. * Customizable—Add relevant data to your users when they install your pass. * Updatable with relevant field and value changes. After users install your passes, you can update passes with relevant field and values so your users' passes are always up to date. For a better understanding of Airship Wallet projects and passes, see [How mobile wallet works](/docs/guides/wallet/getting-started/how-mobile-wallet-works/). See the [Getting Started Guide](/docs/guides/wallet/getting-started/wallet/) for help setting up an Airship Wallet project. ## API Request Format All API requests are HTTP requests. For all requests with a body, the body may be in [JSON](https://www.json.org/json-en.html) format or other formats like CSV as specified for the endpoint. The proper Content-Type for JSON is `application/json` and the proper content type for CSV is `text/csv`. ## Date/Time Format All date/time values are represented according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) in UTC. A `T` separator is preferred but not required. It will be included in all date/time values generated by the API. Example: `2023-01-28T15:00-05:00` ## Security {#intro-security} * Our APIs only work under 2048-bit HTTPS encrypted connections to ensure your data is private from client to server connections. * Access is authenticated through a unique secret API key which we provide to you in your Wallet dashboard. It is your responsibility to keep this key well-guarded, as it represents your identity. * You will use your own Apple Pass Type Certificate or Google Pay certificate to sign production passes. ## Specifying a version The current version of the Wallet API is 1.2. The versioning for the Wallet API is currently distinct from the versioning for the Airship Engage API. Always specify the version of the API you want to use by adding an HTTP header called `Api-Revision`. The value of that header should be in the format x.y where x is the API version and y the sub-revision. For instance, 1.2 is for the /v1 API, revision 2. ## External IDs Most endpoints support an `externalId` parameter in the path. While all assets within this API typically have an internal `id`, you can use the `externalId` parameter to grant custom identifiers to your assets — projects, templates, passes, etc. These identifiers can make your assets more recognizable and help you integrate with an external application or system. If you want to use external IDs, you should use them for all assets — projects, templates, passes, etc. In general you can support external IDs by appending `/id/{externalId}` to an endpoint path that would either take or generate a standard `id`. ## Base URL {#servers} Select the domain associated with your Airship project. | URL | Description | |-----|-------------| | `https://wallet-api.urbanairship.com/v1` | The North American base URL for Wallet endpoints, including the API major version number. In addition to the major version, all requests must include an `Api-Revision` header, with a more specific version number, e.g., `1.2`. | | `https://wallet-api.asnapieu.com/v1` | The European base URL for Wallet endpoints, including the API major version number. In addition to the major version, all requests must include an `Api-Revision` header, with a more specific version number, e.g., `1.2`. | | `https://oauth2.asnapius.com` | The North American base URL for OAuth token requests and public key verification. Use this when requesting an access token or verifying a key for the North American cloud site. | | `https://oauth2.asnapieu.com` | The European base URL for OAuth token requests and public key verification. Use this when requesting an access token or verifying a key for the European cloud site. | | `https://reach-api.urbanairship.com/v1` | The deprecated base URL for Wallet (formerly known as Reach) endpoints. Use `https://wallet-api.urbanairship.com/v1` instead. | ## Authentication {#security} ### Basic Auth (OAuth) {#security-basicOauth} Type: `http` (basic) Authorization header containing the word `Basic` followed by a space and a Base64-encoded string generated from your OAuth Client ID and Client Secret in `client_id:client_secret` format. For example, `Basic YXBwX2tleTptYXN0ZXJfc2VjcmV0`. Used only for requesting OAuth tokens. See [OAuth](/docs/developer/rest-api/wallet/operations/oauth/). ### Basic Auth {#security-httpBasic} Type: `http` (basic) All Wallet operations support [basic authorization](https://en.wikipedia.org/wiki/Basic_access_authentication). The authorization header contains the word `Basic` followed by a space and a Base64-encoded string generated from your Project Key and Project Secret in `projectKey:projectSecret` format. For example, `Basic YXBwX2tleTptYXN0ZXJfc2VjcmV0`. You can copy your Project Key and Secret from your Wallet project. Go to **Settings**, then **API**. For TLS and cipher requirements, see [TLS and supported ciphers](#tls-and-supported-ciphers) below. ### OAuth 2.0 {#security-oauth2Token} Type: `oauth2` Authorization header containing the word `Bearer` followed by a space and an OAuth 2.0 JWT bearer token provided by our authorization server. See [OAuth](/docs/developer/rest-api/wallet/operations/oauth/). Make sure your requests are using the appropriate [domain in the base URL](/docs/developer/rest-api/wallet/introduction/#servers). | Scope | Description | |-------|-------------| | `wadl` | Adaptive Links | | `wevt` | Events | | `wfli` | Flights | | `wnot` | Notifications | | `wpas` | Passes | | `wprj` | Projects | | `wrpt` | Statistics | | `wsch` | Schedules | | `wseg` | Segments | | `wtmp` | Templates | # Wallet API Authorization Reference > Find which authentication methods are supported for each Wallet API endpoint. For information about each authentication method, see [Wallet API Security](https://www.airship.com/docs/guides/wallet/api-security/). ## Authorization per authentication method The following table indicates supported authentication methods per endpoint in the [Wallet API](https://www.airship.com/docs/developer/rest-api/wallet/operations/). See the column for each authentication method to understand what access it allows. For OAuth 2.0, it lists the scope that allows access to the endpoint. | Operation | Endpoint | Public | Basic Auth | OAuth 2.0 | | --- | --- | :---: | :---: | :---: | | [Create Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#createadaptivelink) | `POST` /links/adaptive | × | ✓ | [Adaptive Links](#adaptive-links) | | [Create boarding pass or event ticket Adaptive Links](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#createboardingpassoreventticketadaptivelinks) | `POST` /links/adaptive/multiple/project/{projectId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Delete Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#deleteadaptivelink) | `DELETE` /links/adaptive/{adaptiveLinkId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Generate multiple passes from a single Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#generatemultipassfromadaptivelink) | `GET` /pass/adaptive | ✓ | × | × | | [Generate pass from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#generatepassfromadaptivelink) | `GET` /pass/adaptive/{adaptiveLinkId}/{deviceType} | ✓ | × | × | | [Get Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [List Adaptive Links](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#listadaptivelinks) | `GET` /links/adaptive | × | ✓ | × | | [List Adaptive Links for a project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#listadaptivelinksforproject) | `GET` /links/adaptive/projects/{projectId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [List Adaptive Links for a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#listadaptivelinksfortemplate) | `GET` /links/adaptive/projects/{projectId}/templates/{templateId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [List passes for an Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId}/passes | × | ✓ | [Passes](#passes) | | [List passes for an Adaptive Link for a project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelinkforproject) | `GET` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}/passes | × | ✓ | [Passes](#passes) | | [List passes for an Adaptive Link for an external project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelinkforexternalproject) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes | × | ✓ | [Adaptive Links](#adaptive-links) | | [Update Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#updateadaptivelink) | `PUT` /links/adaptive/{adaptiveLinkId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Create Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#createadaptivelinkexternalid) | `POST` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Create Adaptive Link in project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#createadaptivelinkexternalprojectid) | `POST` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Get Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getadaptivelinkexternalid) | `GET` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Get Adaptive Link from project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getadaptivelinkexternalprojectid) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId} | × | ✓ | [Adaptive Links](#adaptive-links) | | [Get pass from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getpassfromadaptivelinkexternalid) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Get passes from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getpassesexternalid) | `GET` /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Update passes from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesexternalid) | `PUT` /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Update passes from Adaptive Link for an external project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesfromadaptivelinkexternalid) | `PUT` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Add or update beacons for Apple Wallet pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#addreplacebeaconsforpassexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId}/beacons | × | ✓ | [Passes](#passes) | | [Download an Apple Wallet .pkpass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpass) | `GET` /pass/{passId}/download | × | ✓ | [Passes](#passes) | | [Download an Apple Wallet .pkpass by external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassfortemplateexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/download | × | ✓ | [Passes](#passes) | | [Download multiple Apple Wallet passes in a single .pkpasses file](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpasses) | `GET` /pass/download | × | ✓ | [Passes](#passes) | | [Download multiple Apple Wallet passes in a single .pkpasses file by external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletmultipassfortemplateexternalid) | `GET` /pass/template/{templateId}/download | × | ✓ | [Passes](#passes) | | [List beacons on Apple Wallet pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getbeaconsforpassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/beacons | × | ✓ | [Passes](#passes) | | [View Apple Wallet JSON](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassjson) | `GET` /pass/{passId}/viewJSONPass | × | ✓ | [Passes](#passes) | | [View Apple Wallet JSON with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassjsonexternalid) | `GET` /pass/id/{passExternalId}/viewJSONPass | × | ✓ | [Passes](#passes) | | [Add personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#addpersonalizationrequirements) | `POST` /template/{templateId}/personalization | × | ✓ | [Templates](#templates) | | [Delete personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#removepersonalizationrequirements) | `DELETE` /template/{templateId}/personalization | × | ✓ | [Templates](#templates) | | [Get personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#getpersonalizationrequirements) | `GET` /template/{templateId}/personalization | × | ✓ | [Templates](#templates) | | [Update personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#updatepersonalizationrequirements) | `PUT` /template/{templateId}/personalization | × | ✓ | [Templates](#templates) | | [Create callback specification](https://www.airship.com/docs/developer/rest-api/wallet/operations/callbacks/#createcallbackspecification) | `POST` /project/{projectId}/settings/callback | × | ✓ | × | | [Delete callback specification](https://www.airship.com/docs/developer/rest-api/wallet/operations/callbacks/#deletecallbackspecification) | `DELETE` /project/{projectId}/settings/callback | × | ✓ | × | | [Get callback specification](https://www.airship.com/docs/developer/rest-api/wallet/operations/callbacks/#getcallbackspecification) | `GET` /project/{projectId}/settings/callback | × | ✓ | × | | [Update callback specification](https://www.airship.com/docs/developer/rest-api/wallet/operations/callbacks/#updatecallbackspecification) | `PUT` /project/{projectId}/settings/callback | × | ✓ | × | | [Add new certificate](https://www.airship.com/docs/developer/rest-api/wallet/operations/certificates/#addcertificate) | `POST` /certificates | × | ✓ | × | | [Get certificate](https://www.airship.com/docs/developer/rest-api/wallet/operations/certificates/#getcertificate) | `GET` /certificates/{id} | × | ✓ | × | | [List certificates](https://www.airship.com/docs/developer/rest-api/wallet/operations/certificates/#getcertificates) | `GET` /certificates | × | ✓ | × | | [Remove certificate](https://www.airship.com/docs/developer/rest-api/wallet/operations/certificates/#removecertificate) | `DELETE` /certificates/{id} | × | ✓ | × | | [Update certificate](https://www.airship.com/docs/developer/rest-api/wallet/operations/certificates/#updatecertificate) | `PUT` /certificates/{id} | × | ✓ | × | | [List event passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/event-passes/#getpassesbyevent) | `GET` /events/project/{projectId}/{eventId}/passes | × | ✓ | [Passes](#passes) | | [Add event to pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#addeventtopassgroup) | `POST` /events/project/{projectId}/{eventId}/passGroups | × | ✓ | [Events](#events) | | [Create event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#createevent) | `POST` /events/project/{projectId} | × | ✓ | [Events](#events) | | [Create event with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#createeventexternalid) | `POST` /events/project/id/{projectExternalId}/id/{eventExternalId} | × | ✓ | [Events](#events) | | [Delete event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#deleteevent) | `DELETE` /events/project/{projectId}/{eventId} | × | ✓ | [Events](#events) | | [Get event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#getevent) | `GET` /events/project/{projectId}/{eventId} | × | ✓ | [Events](#events) | | [List pass groups for event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#listpassgroupsforevent) | `GET` /events/project/{projectId}/{eventId}/passGroups | × | ✓ | [Events](#events) | | [Remove event from pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#removeeventfrompassgroup) | `DELETE` /events/project/{projectId}/{eventId}/passGroups/{passGroup} | × | ✓ | [Events](#events) | | [Update event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#updateevent) | `PUT` /events/project/{projectId}/{eventId} | × | ✓ | [Events](#events) | | [Update events in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#updateeventsinpassgroup) | `PUT` /events/project/{projectId}/passGroups/{passGroup} | × | ✓ | [Events](#events) | | [List flight passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/flight-passes/#getpassesbyflight) | `GET` /flights/project/{projectId}/{flightId}/passes | × | ✓ | [Passes](#passes) | | [Add flight to a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#addflighttopassgroup) | `POST` /flights/project/{projectId}/{flightId}/passGroups | × | ✓ | [Flights](#flights) | | [Create flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#createflight) | `POST` /flights/project/{projectId} | × | ✓ | [Flights](#flights) | | [Create flight with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#createflightexternalid) | `POST` /flights/project/id/{projectExternalId}/id/{flightExternalId} | × | ✓ | [Flights](#flights) | | [Delete flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#deleteflight) | `DELETE` /flights/project/{projectId}/{flightId} | × | ✓ | [Flights](#flights) | | [Get flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#getflight) | `GET` /flights/project/{projectId}/{flightId} | × | ✓ | [Flights](#flights) | | [List pass groups for a flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#listpassgroupsforflight) | `GET` /flights/project/{projectId}/{flightId}/passGroups | × | ✓ | [Flights](#flights) | | [Remove flight from pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#removeflightfrompassgroup) | `DELETE` /flights/project/{projectId}/{flightId}/passGroups/{passGroup} | × | ✓ | [Flights](#flights) | | [Update flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflight) | `PUT` /flights/project/{projectId}/{flightId} | × | ✓ | [Flights](#flights) | | [Update flights in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflightsinpassgroup) | `PUT` /flights/project/{projectId}/passGroups/{passGroup} | × | ✓ | [Flights](#flights) | | [Update flights with external ID in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflightsinpassgroupexternalid) | `PUT` /flights/project/id/{projectExternalId}/id/passGroups/{passGroup} | × | ✓ | [Flights](#flights) | | [Add message to Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#addmessagetogooglepass) | `POST` /pass/{passId}/message | × | ✓ | [Passes](#passes) | | [Add message to Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#addmessagetogooglepassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/message | × | ✓ | [Passes](#passes) | | [Auto link passes to existing Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassid) | `POST` /pass/{passId}/linkedPasses | × | ✓ | [Passes](#passes) | | [Auto link passes to Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/linkedPasses | × | ✓ | [Passes](#passes) | | [Auto link passes to Google Pass with external template ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassandtemplateexternalid) | `POST` /pass/template/id/{templateExternalId}/id/{passExternalId}/linkedPasses | × | ✓ | [Passes](#passes) | | [Get messages for Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#getmessagesforgooglepass) | `GET` /pass/{passId}/message | × | ✓ | [Passes](#passes) | | [Get messages for Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#getmessagesforgooglepassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/message | × | ✓ | [Passes](#passes) | | [Save to Google Wallet](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#createpassfromtemplate) | `POST` /pass/{templateId}/saveToWallet | × | ✓ | [Passes](#passes) | | [Verify public key](https://www.airship.com/docs/developer/rest-api/wallet/operations/oauth/#getkeyverification) | `GET` /verify/public_key/{kid} | ✓ | × | × | | [Add locations to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#addlocationstopass) | `POST` /pass/{passId}/locations | × | ✓ | [Passes](#passes) | | [Create pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#createpass) | `POST` /pass/{id} | × | ✓ | [Passes](#passes) | | [Delete locations from pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#deletelocationfrompass) | `DELETE` /pass/{passId}/location/{passLocationId} | × | ✓ | [Passes](#passes) | | [Delete pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#deletepass) | `DELETE` /pass/{id} | × | ✓ | [Passes](#passes) | | [Generates a pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#createdynamiclink) | `POST` /pass/{id}/dynamic | × | ✓ | [Passes](#passes) | | [Get pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpass) | `GET` /pass/{id} | × | ✓ | [Passes](#passes) | | [List passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpasses) | `GET` /pass | × | ✓ | [Passes](#passes) | | [List passes for a tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#listpassesfortag) | `GET` /tag/{tag}/passes | × | ✓ | [Passes](#passes) | | [List passes for an Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpassesbyadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId}/passes | × | ✓ | [Passes](#passes) | | [Update pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass) | `PUT` /pass/{id} | × | ✓ | [Passes](#passes) | | [Add locations to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#addlocationstopassfromtemplateexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/locations | × | ✓ | [Passes](#passes) | | [Create pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#createpassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Create pass from a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#createpassfromtemplateexternalid) | `POST` /pass/id/{templateExternalId}/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Delete locations from pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#deletelocationfrompassfromtemplateexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId}/location/{locationId} | × | ✓ | [Passes](#passes) | | [Delete pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#deletepassfromtemplateexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Get pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#getpassfromtemplateexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Update pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassexternalid) | `PUT` /pass/id/{externalId} | × | ✓ | [Passes](#passes) | | [Update pass for a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassfromtemplateexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId} | × | ✓ | [Passes](#passes) | | [Add NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#addnfcmerchant) | `POST` /project/{projectId}/nfcMerchants | × | ✓ | [Projects](#projects) | | [Create project](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#createproject) | `POST` /project | × | ✓ | × | | [Create project with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#createprojectexternalid) | `POST` /project/id/{externalId} | × | ✓ | × | | [Delete NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#deletenfcmerchant) | `DELETE` /project/{projectId}/nfcMerchants/{merchantId} | × | ✓ | [Projects](#projects) | | [Duplicate project](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#duplicateproject) | `POST` /project/duplicate/{projectId} | × | ✓ | × | | [Get NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#getnfcmerchant) | `GET` /project/{projectId}/nfcMerchants/{merchantId} | × | ✓ | [Projects](#projects) | | [Get project](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#getproject) | `GET` /project/{projectId} | × | ✓ | × | | [List NFC merchants](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#listnfcmerchants) | `GET` /project/{projectId}/nfcMerchants | × | ✓ | [Projects](#projects) | | [List projects](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#listprojects) | `GET` /project | × | ✓ | × | | [Update NFC merchant information](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#updatenfcmerchant) | `PUT` /project/{projectId}/nfcMerchants/{merchantId} | × | ✓ | [Projects](#projects) | | [Update project](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#updateproject) | `PUT` /project/{projectId} | × | ✓ | × | | [Delete notification by pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletepassnotification) | `DELETE` /pass/{passId}/notify | × | ✓ | [Notifications](#notifications) | | [Delete notification by pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletepassnotificationbyexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId}/notify | × | ✓ | [Notifications](#notifications) | | [Delete notification by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletesegmentpassnotification) | `DELETE` /segments/{projectId}/{segmentId}/notify | × | ✓ | [Notifications](#notifications) | | [Delete notification by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletetagpassnotification) | `DELETE` /tag/{tag}/notify | × | ✓ | [Notifications](#notifications) | | [Delete notification by template](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletetemplatepassnotification) | `DELETE` /template/{templateId}/notify | × | ✓ | [Notifications](#notifications) | | [Send notification by pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendpassnotification) | `POST` /pass/{passId}/notify | × | ✓ | [Notifications](#notifications) | | [Send notification by pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendpassnotificationbyexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/notify | × | ✓ | [Notifications](#notifications) | | [Send notification by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendsegmentpassnotification) | `POST` /segments/{projectId}/{segmentId}/notify | × | ✓ | [Notifications](#notifications) | | [Send notification by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendtagpassnotification) | `POST` /tag/{tag}/notify | × | ✓ | [Notifications](#notifications) | | [Send notification by template](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendtemplatepassnotification) | `POST` /template/{templateId}/notify | × | ✓ | [Notifications](#notifications) | | [Delete schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#deleteschedule) | `DELETE` /schedules/{projectId}/{scheduleId} | × | ✓ | [Schedules](#schedules) | | [Get schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#getschedule) | `GET` /schedules/{projectId}/{scheduleId} | × | ✓ | [Schedules](#schedules) | | [List schedules](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#listschedules) | `GET` /schedules/{projectId} | × | ✓ | [Schedules](#schedules) | | [Schedule an update or push notification](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#scheduleupdate) | `POST` /schedules/{projectId} | × | ✓ | [Schedules](#schedules) | | [Update schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#updateschedule) | `PUT` /schedules/{projectId}/{scheduleId} | × | ✓ | [Schedules](#schedules) | | [Create segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#createsegment) | `POST` /segments/{projectId} | × | ✓ | [Segments](#segments) | | [Delete segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#deletesegment) | `DELETE` /segments/{projectId}/{segmentId} | × | ✓ | [Segments](#segments) | | [List segments](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#listsegments) | `GET` /segments/{projectId} | × | ✓ | [Segments](#segments) | | [Look up segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#getsegment) | `GET` /segments/{projectId}/{segmentId} | × | ✓ | [Segments](#segments) | | [Update passes by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#updatepassesbysegment) | `PUT` /segments/{projectId}/{segmentId}/passes | × | ✓ | [Passes](#passes) | | [Update segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#updatesegment) | `PUT` /segments/{projectId}/{segmentId} | × | ✓ | [Segments](#segments) | | [Pass statistics with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getpassstatisticsexternalid) | `GET` /pass/id/{externalId}/stats | × | ✓ | [Statistics](#statistics) | | [Project activity](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getprojectactivity) | `GET` /project/{projectId}/activity | × | ✓ | [Statistics](#statistics) | | [Project statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getprojectstatistics) | `GET` /project/{projectId}/stats | × | ✓ | [Statistics](#statistics) | | [Tag statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettagstatistics) | `GET` /tag/{tag}/stats | × | ✓ | [Statistics](#statistics) | | [Template activity](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettemplateactivity) | `GET` /template/{templateId}/activity | × | ✓ | [Statistics](#statistics) | | [Template statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettemplatestatistics) | `GET` /template/{templateId}/stats | × | ✓ | [Statistics](#statistics) | | [Add tags to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#addtagstopass) | `PUT` /pass/{passId}/tags | × | ✓ | [Passes](#passes) | | [Delete tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#deletetag) | `DELETE` /tag/{tag} | × | ✓ | × | | [List all tags](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#listalltags) | `GET` /tag | × | ✓ | × | | [List passes for a tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#listpassesfortag) | `GET` /tag/{tag}/passes | × | ✓ | [Passes](#passes) | | [List tags for pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#listtagsforpass) | `GET` /pass/{passId}/tags | × | ✓ | [Passes](#passes) | | [List tags for pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#gettagsforpassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/tags | × | ✓ | [Passes](#passes) | | [Remove tag from a pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#removetagfrompass) | `DELETE` /tag/{tag}/pass/{pass} | × | ✓ | [Passes](#passes) | | [Remove tag from all passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#removetagfromallpasses) | `DELETE` /tag/{tag}/passes | × | ✓ | [Passes](#passes) | | [Update passes by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatepassesfortags) | `PUT` /tag/{tag}/passes | × | ✓ | [Passes](#passes) | | [Update tags for pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatetagsforpassexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId}/tags | × | ✓ | [Passes](#passes) | | [Add locations to template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#addlocationstotemplate) | `POST` /template/{templateId}/locations | × | ✓ | [Templates](#templates) | | [Create template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#createtemplate) | `POST` /template/{id} | × | ✓ | [Templates](#templates) | | [Create template with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#createexternaltemplate) | `POST` /template/{projectId}/id/{templateExternalId} | × | ✓ | [Templates](#templates) | | [Delete location from template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#deletelocationfromtemplate) | `DELETE` /template/{templateId}/location/{locationId} | × | ✓ | [Templates](#templates) | | [Delete template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#deletetemplate) | `DELETE` /template/{id} | × | ✓ | [Templates](#templates) | | [Duplicate template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#duplicatetemplate) | `POST` /template/duplicate/{templateId} | × | ✓ | [Templates](#templates) | | [Get template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#gettemplate) | `GET` /template/{id} | × | ✓ | [Templates](#templates) | | [Get template passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#getpassesbytemplate) | `GET` /template/{templateId}/passes | × | ✓ | [Passes](#passes) | | [Get template v2](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#gettemplatesv2) | `GET` /templates/{id} | × | ✓ | [Templates](#templates) | | [List templates](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#listtemplates) | `GET` /template/headers | × | ✓ | [Templates](#templates) | | [Patch template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#patchtemplates) | `PATCH` /templates/{id} | × | ✓ | [Templates](#templates) | | [Publish a bulk update to passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatepassesbytemplate) | `PUT` /template/{templateId}/passes | × | ✓ | [Passes](#passes) | | [Update template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatetemplate) | `PUT` /template/{id} | × | ✓ | [Templates](#templates) | | [Update template v2](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatetemplatesv2) | `PUT` /templates/{id} | × | ✓ | [Templates](#templates) | | [Check system status](https://www.airship.com/docs/developer/rest-api/wallet/operations/tickets/#getsystemstatus) | `GET` /system/status | × | ✓ | × | | [Get ticket status](https://www.airship.com/docs/developer/rest-api/wallet/operations/tickets/#getticketstatus) | `GET` /ticket/{ticketId} | × | ✓ | × | {class="table-col-2-wrap"} ## OAuth token scopes Refer to the following sections when setting permissions for [OAuth client credentials](https://www.airship.com/docs/guides/wallet/api-security/#oauth-20). ### Adaptive Links The Adaptive Links (`wadl`) scope includes endpoints that manage adaptive links. | Operation | Endpoint | | --- | --- | | [Create Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#createadaptivelink) | `POST` /links/adaptive | | [Create boarding pass or event ticket Adaptive Links](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#createboardingpassoreventticketadaptivelinks) | `POST` /links/adaptive/multiple/project/{projectId} | | [Delete Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#deleteadaptivelink) | `DELETE` /links/adaptive/{adaptiveLinkId} | | [Get Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId} | | [List Adaptive Links for a project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#listadaptivelinksforproject) | `GET` /links/adaptive/projects/{projectId} | | [List Adaptive Links for a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#listadaptivelinksfortemplate) | `GET` /links/adaptive/projects/{projectId}/templates/{templateId} | | [List passes for an Adaptive Link for an external project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelinkforexternalproject) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes | | [Update Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#updateadaptivelink) | `PUT` /links/adaptive/{adaptiveLinkId} | | [Create Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#createadaptivelinkexternalid) | `POST` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId} | | [Create Adaptive Link in project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#createadaptivelinkexternalprojectid) | `POST` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId} | | [Get Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getadaptivelinkexternalid) | `GET` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId} | | [Get Adaptive Link from project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getadaptivelinkexternalprojectid) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId} | {class="table-col-1-40 table-col-2-wrap"} ### Events The Events (`wevt`) scope includes endpoints that manage events for event tickets. | Operation | Endpoint | | --- | --- | | [Add event to pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#addeventtopassgroup) | `POST` /events/project/{projectId}/{eventId}/passGroups | | [Create event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#createevent) | `POST` /events/project/{projectId} | | [Create event with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#createeventexternalid) | `POST` /events/project/id/{projectExternalId}/id/{eventExternalId} | | [Delete event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#deleteevent) | `DELETE` /events/project/{projectId}/{eventId} | | [Get event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#getevent) | `GET` /events/project/{projectId}/{eventId} | | [List pass groups for event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#listpassgroupsforevent) | `GET` /events/project/{projectId}/{eventId}/passGroups | | [Remove event from pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#removeeventfrompassgroup) | `DELETE` /events/project/{projectId}/{eventId}/passGroups/{passGroup} | | [Update event](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#updateevent) | `PUT` /events/project/{projectId}/{eventId} | | [Update events in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/events/#updateeventsinpassgroup) | `PUT` /events/project/{projectId}/passGroups/{passGroup} | {class="table-col-1-40 table-col-2-wrap"} ### Flights The Flights (`wfli`) scope includes endpoints that manage flights for boarding passes. | Operation | Endpoint | | --- | --- | | [Add flight to a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#addflighttopassgroup) | `POST` /flights/project/{projectId}/{flightId}/passGroups | | [Create flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#createflight) | `POST` /flights/project/{projectId} | | [Create flight with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#createflightexternalid) | `POST` /flights/project/id/{projectExternalId}/id/{flightExternalId} | | [Delete flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#deleteflight) | `DELETE` /flights/project/{projectId}/{flightId} | | [Get flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#getflight) | `GET` /flights/project/{projectId}/{flightId} | | [List pass groups for a flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#listpassgroupsforflight) | `GET` /flights/project/{projectId}/{flightId}/passGroups | | [Remove flight from pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#removeflightfrompassgroup) | `DELETE` /flights/project/{projectId}/{flightId}/passGroups/{passGroup} | | [Update flight](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflight) | `PUT` /flights/project/{projectId}/{flightId} | | [Update flights in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflightsinpassgroup) | `PUT` /flights/project/{projectId}/passGroups/{passGroup} | | [Update flights with external ID in a pass group](https://www.airship.com/docs/developer/rest-api/wallet/operations/flights/#updateflightsinpassgroupexternalid) | `PUT` /flights/project/id/{projectExternalId}/id/passGroups/{passGroup} | {class="table-col-1-40 table-col-2-wrap"} ### Notifications The Notifications (`wnot`) scope includes endpoints that send pass notifications. | Operation | Endpoint | | --- | --- | | [Delete notification by pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletepassnotification) | `DELETE` /pass/{passId}/notify | | [Delete notification by pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletepassnotificationbyexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId}/notify | | [Delete notification by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletesegmentpassnotification) | `DELETE` /segments/{projectId}/{segmentId}/notify | | [Delete notification by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletetagpassnotification) | `DELETE` /tag/{tag}/notify | | [Delete notification by template](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#deletetemplatepassnotification) | `DELETE` /template/{templateId}/notify | | [Send notification by pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendpassnotification) | `POST` /pass/{passId}/notify | | [Send notification by pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendpassnotificationbyexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/notify | | [Send notification by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendsegmentpassnotification) | `POST` /segments/{projectId}/{segmentId}/notify | | [Send notification by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendtagpassnotification) | `POST` /tag/{tag}/notify | | [Send notification by template](https://www.airship.com/docs/developer/rest-api/wallet/operations/push-notifications/#sendtemplatepassnotification) | `POST` /template/{templateId}/notify | {class="table-col-1-40 table-col-2-wrap"} ### Passes The Passes (`wpas`) scope includes endpoints that manage passes. | Operation | Endpoint | | --- | --- | | [List passes for an Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId}/passes | | [List passes for an Adaptive Link for a project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links/#getpassesbyadaptivelinkforproject) | `GET` /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}/passes | | [Get pass from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getpassfromadaptivelinkexternalid) | `GET` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId} | | [Get passes from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#getpassesexternalid) | `GET` /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId} | | [Update passes from Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesexternalid) | `PUT` /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId} | | [Update passes from Adaptive Link for an external project](https://www.airship.com/docs/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/#updatepassesfromadaptivelinkexternalid) | `PUT` /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId} | | [Add or update beacons for Apple Wallet pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#addreplacebeaconsforpassexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId}/beacons | | [Download an Apple Wallet .pkpass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpass) | `GET` /pass/{passId}/download | | [Download an Apple Wallet .pkpass by external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassfortemplateexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/download | | [Download multiple Apple Wallet passes in a single .pkpasses file](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpasses) | `GET` /pass/download | | [Download multiple Apple Wallet passes in a single .pkpasses file by external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletmultipassfortemplateexternalid) | `GET` /pass/template/{templateId}/download | | [List beacons on Apple Wallet pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getbeaconsforpassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/beacons | | [View Apple Wallet JSON](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassjson) | `GET` /pass/{passId}/viewJSONPass | | [View Apple Wallet JSON with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-passes-only/#getapplewalletpassjsonexternalid) | `GET` /pass/id/{passExternalId}/viewJSONPass | | [List event passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/event-passes/#getpassesbyevent) | `GET` /events/project/{projectId}/{eventId}/passes | | [List flight passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/flight-passes/#getpassesbyflight) | `GET` /flights/project/{projectId}/{flightId}/passes | | [Add message to Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#addmessagetogooglepass) | `POST` /pass/{passId}/message | | [Add message to Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#addmessagetogooglepassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/message | | [Auto link passes to existing Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassid) | `POST` /pass/{passId}/linkedPasses | | [Auto link passes to Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/linkedPasses | | [Auto link passes to Google Pass with external template ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#autolinkedpassesforpassandtemplateexternalid) | `POST` /pass/template/id/{templateExternalId}/id/{passExternalId}/linkedPasses | | [Get messages for Google Pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#getmessagesforgooglepass) | `GET` /pass/{passId}/message | | [Get messages for Google Pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#getmessagesforgooglepassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/message | | [Save to Google Wallet](https://www.airship.com/docs/developer/rest-api/wallet/operations/google-passes-only/#createpassfromtemplate) | `POST` /pass/{templateId}/saveToWallet | | [Add locations to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#addlocationstopass) | `POST` /pass/{passId}/locations | | [Create pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#createpass) | `POST` /pass/{id} | | [Delete locations from pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#deletelocationfrompass) | `DELETE` /pass/{passId}/location/{passLocationId} | | [Delete pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#deletepass) | `DELETE` /pass/{id} | | [Generates a pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#createdynamiclink) | `POST` /pass/{id}/dynamic | | [Get pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpass) | `GET` /pass/{id} | | [List passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpasses) | `GET` /pass | | [List passes for a tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#listpassesfortag) | `GET` /tag/{tag}/passes | | [List passes for an Adaptive Link](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#getpassesbyadaptivelink) | `GET` /links/adaptive/{adaptiveLinkId}/passes | | [Update pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes/#updatepass) | `PUT` /pass/{id} | | [Add locations to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#addlocationstopassfromtemplateexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId}/locations | | [Create pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#createpassexternalid) | `POST` /pass/template/{templateId}/id/{passExternalId} | | [Create pass from a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#createpassfromtemplateexternalid) | `POST` /pass/id/{templateExternalId}/id/{passExternalId} | | [Delete locations from pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#deletelocationfrompassfromtemplateexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId}/location/{locationId} | | [Delete pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#deletepassfromtemplateexternalid) | `DELETE` /pass/template/{templateId}/id/{passExternalId} | | [Get pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#getpassfromtemplateexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId} | | [Update pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassexternalid) | `PUT` /pass/id/{externalId} | | [Update pass for a template](https://www.airship.com/docs/developer/rest-api/wallet/operations/passes-with-external-ids/#updatepassfromtemplateexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId} | | [Update passes by segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#updatepassesbysegment) | `PUT` /segments/{projectId}/{segmentId}/passes | | [Add tags to pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#addtagstopass) | `PUT` /pass/{passId}/tags | | [List passes for a tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#listpassesfortag) | `GET` /tag/{tag}/passes | | [List tags for pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#listtagsforpass) | `GET` /pass/{passId}/tags | | [List tags for pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#gettagsforpassexternalid) | `GET` /pass/template/{templateId}/id/{passExternalId}/tags | | [Remove tag from a pass](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#removetagfrompass) | `DELETE` /tag/{tag}/pass/{pass} | | [Remove tag from all passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#removetagfromallpasses) | `DELETE` /tag/{tag}/passes | | [Update passes by tag](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatepassesfortags) | `PUT` /tag/{tag}/passes | | [Update tags for pass with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/tags/#updatetagsforpassexternalid) | `PUT` /pass/template/{templateId}/id/{passExternalId}/tags | | [Get template passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#getpassesbytemplate) | `GET` /template/{templateId}/passes | | [Publish a bulk update to passes](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatepassesbytemplate) | `PUT` /template/{templateId}/passes | {class="table-col-1-40 table-col-2-wrap"} ### Projects The Projects (`wprj`) scope includes endpoints that manage projects. | Operation | Endpoint | | --- | --- | | [Add NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#addnfcmerchant) | `POST` /project/{projectId}/nfcMerchants | | [Delete NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#deletenfcmerchant) | `DELETE` /project/{projectId}/nfcMerchants/{merchantId} | | [Get NFC merchant](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#getnfcmerchant) | `GET` /project/{projectId}/nfcMerchants/{merchantId} | | [List NFC merchants](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#listnfcmerchants) | `GET` /project/{projectId}/nfcMerchants | | [Update NFC merchant information](https://www.airship.com/docs/developer/rest-api/wallet/operations/projects/#updatenfcmerchant) | `PUT` /project/{projectId}/nfcMerchants/{merchantId} | {class="table-col-1-40 table-col-2-wrap"} ### Statistics The Statistics (`wrpt`) scope includes endpoints that read pass statistics. | Operation | Endpoint | | --- | --- | | [Pass statistics with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getpassstatisticsexternalid) | `GET` /pass/id/{externalId}/stats | | [Project activity](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getprojectactivity) | `GET` /project/{projectId}/activity | | [Project statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#getprojectstatistics) | `GET` /project/{projectId}/stats | | [Tag statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettagstatistics) | `GET` /tag/{tag}/stats | | [Template activity](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettemplateactivity) | `GET` /template/{templateId}/activity | | [Template statistics](https://www.airship.com/docs/developer/rest-api/wallet/operations/statistics/#gettemplatestatistics) | `GET` /template/{templateId}/stats | {class="table-col-1-40 table-col-2-wrap"} ### Schedules The Schedules (`wsch`) scope includes endpoints that manage schedules. | Operation | Endpoint | | --- | --- | | [Delete schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#deleteschedule) | `DELETE` /schedules/{projectId}/{scheduleId} | | [Get schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#getschedule) | `GET` /schedules/{projectId}/{scheduleId} | | [List schedules](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#listschedules) | `GET` /schedules/{projectId} | | [Schedule an update or push notification](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#scheduleupdate) | `POST` /schedules/{projectId} | | [Update schedule](https://www.airship.com/docs/developer/rest-api/wallet/operations/schedules/#updateschedule) | `PUT` /schedules/{projectId}/{scheduleId} | {class="table-col-1-40 table-col-2-wrap"} ### Segments The Segments (`wseg`) scope includes endpoints that manage segments. | Operation | Endpoint | | --- | --- | | [Create segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#createsegment) | `POST` /segments/{projectId} | | [Delete segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#deletesegment) | `DELETE` /segments/{projectId}/{segmentId} | | [List segments](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#listsegments) | `GET` /segments/{projectId} | | [Look up segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#getsegment) | `GET` /segments/{projectId}/{segmentId} | | [Update segment](https://www.airship.com/docs/developer/rest-api/wallet/operations/segments/#updatesegment) | `PUT` /segments/{projectId}/{segmentId} | {class="table-col-1-40 table-col-2-wrap"} ### Templates The Templates (`wtmp`) scope includes endpoints that manage templates. | Operation | Endpoint | | --- | --- | | [Add personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#addpersonalizationrequirements) | `POST` /template/{templateId}/personalization | | [Delete personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#removepersonalizationrequirements) | `DELETE` /template/{templateId}/personalization | | [Get personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#getpersonalizationrequirements) | `GET` /template/{templateId}/personalization | | [Update personalization requirements](https://www.airship.com/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/#updatepersonalizationrequirements) | `PUT` /template/{templateId}/personalization | | [Add locations to template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#addlocationstotemplate) | `POST` /template/{templateId}/locations | | [Create template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#createtemplate) | `POST` /template/{id} | | [Create template with external ID](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#createexternaltemplate) | `POST` /template/{projectId}/id/{templateExternalId} | | [Delete location from template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#deletelocationfromtemplate) | `DELETE` /template/{templateId}/location/{locationId} | | [Delete template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#deletetemplate) | `DELETE` /template/{id} | | [Duplicate template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#duplicatetemplate) | `POST` /template/duplicate/{templateId} | | [Get template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#gettemplate) | `GET` /template/{id} | | [Get template v2](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#gettemplatesv2) | `GET` /templates/{id} | | [List templates](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#listtemplates) | `GET` /template/headers | | [Patch template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#patchtemplates) | `PATCH` /templates/{id} | | [Update template](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatetemplate) | `PUT` /template/{id} | | [Update template v2](https://www.airship.com/docs/developer/rest-api/wallet/operations/templates/#updatetemplatesv2) | `PUT` /templates/{id} | {class="table-col-1-40 table-col-2-wrap"} ## Operations API endpoints organized by functionality. Each section groups related operations for managing different aspects of the platform. # Adaptive Links > A link that detects the platform of a recipient and installs the correct pass. You can send adaptive links to both Apple and Google platform users; When a user on either platform taps the link, Airship detects the user's device platform and returns the correct pass. To send an adaptive link to both Google and Apple platforms, you must have configured templates for both platforms. You can send an adaptive link to an individual platform, and define the behavior for the unsupported platform. ## Create Adaptive Link {#createadaptivelink} If a template for a device type is not provided, the adaptive link will not be able to create passes for that device. Visiting the adaptive link URL associated with an unsupported device will redirect to the landingPageUrl, if present. Templates can be provided either implicitly as part of Dynamic Link objects or explicitly with IDs. So either one or both of iosPassLinkId and androidPassLinkId must be present, or payload must be present along with one or both of iosTemplateId and androidTemplateId. [Jump to examples ↓](#createadaptivelink-examples) ### `POST /links/adaptive` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkrequest) **Responses** **`200`** A successful request results in an adaptive link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** Could not find template(s), or could not find or create Dynamic Link object(s). **Examples** *Example request* ```http POST /v1/links/adaptive HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "landingPageUrl": "https://example.com/landing.html", "availablePasses": 100000, "payload": {} } ``` *Example request with expiration date* ```http POST /v1/links/adaptive HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "landingPageUrl": "https://example.com/landing.html", "expirationDate": "2022-10-01", "availablePasses": 100000, "ttlInDays": 730, "payload": {} } ``` *Example request with payload* ```http POST /v1/links/adaptive HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "payload": {"fields": {"tier": {"value": "gold"}}} } ``` *Example request with locations* ```http POST /v1/links/adaptive HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "landingPageUrl": "https://example.com/landing.html", "availablePasses": 100000, "ttlInDays": 30, "parameterEncoding": "base64", "locationRadius": 10, "maxResultLocations": 5, "payload": {}, "locations": [ { "latitude": 45.5898, "longitude": -122.5951, "city": "Portland", "country": "US", "region": "OR", "regionCode": "97218", "relevantText": "Welcome to Portland... Voodoo Donuts is only 11 miles away", "streetAddress1": "7000 NE Airport Way" }, { "latitude": 45.525492, "longitude": -122.686092, "city": "San Francisco", "country": "US", "region": "CA", "regionCode": "94140", "relevantText": "Welcome to the Ship!", "streetAddress1": "548 Market St. Suite 698370", "streetAddress2": "" }, { "latitude": 45.5205, "longitude": -122.6788, "relevantText": "See you at dinner tonight...or did you already fill up on donuts?" } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "abchd345678", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": "true", "isExpired": false, "availablePasses": 100000, "ttlInDays": 30 } ``` --- ## Create boarding pass or event ticket Adaptive Links {#createboardingpassoreventticketadaptivelinks} Create boarding pass or event ticket adaptive links. Creating boarding passes or event tickets is similar to other adaptive links, with a few additional items in the request and response payloads. [Jump to examples ↓](#createboardingpassoreventticketadaptivelinks-examples) ### `POST /links/adaptive/multiple/project/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to create the boarding pass in. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** An adaptive link request where the `fields` object can include an array of flights or events, each with an array of `passengers` or `attendees`, respectively. **Content-Type:** `application/json` **One of:** - [Event ticket Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventticketrequest) An event ticket requires similar information to other adaptive link types, but does not support some of the same fields, and requires event and attendee information. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. You can create the event within this request or specify an event by `eventId` or `eventExternalId`. In either case, you must also provide an array of attendees for the event. - [Boarding pass Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpassrequest) A boarding pass adaptive link requires similar information to other adaptive link types, but the payload includes flight information and an array of passengers for each flight. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. **Responses** **`200`** A successful request returns an array of adaptive links. Each object in the array represents an individual passenger or attendee in the request payload. Passes in the response appear in same order as objects in in the `flights` or `events` array. Response body: **Content-Type:** `application/json` - **`links`** `array` An array of adaptive links. **One of:** - [Boarding pass Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpassresponse) The boarding pass operations return responses like other adaptive links, with the addition of the identifier of the event and an HTTP status for each individual adaptive link. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. - [Event ticket Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventticketresponse) The response for event ticket operations is much like any other adaptive link, with the addition of the identifier of the event and an HTTP status for each individual adaptive link. **Examples** *Example boarding pass request* ```http POST /v1/links/adaptive/multiple/project/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateExternalId": "ios123ExtId", "androidTemplateExternalId": "android123ExtId", "payload": { "flights": [ { "flightExternalId": "flight123ExtId", "fields": { "flightNumber": { "value": "815" }, "airlineCode": { "value": "OA" }, "airlineName": { "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "value": "2018-07-30T08:35:00" }, "departureTime": { "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalTime": { "value": "2018-07-30T11:00:00" }, "flightStatus": { "value": "scheduled" } }, "passengers": [ { "adaptiveLinkExternalId": "abch3ExtId1", "fields": { "seatNumber": { "value": "13A" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/JOE" }, "specialAssistance": { "label": "Special Assistance", "value": "Wheelchair" }, "barcode_value": { "value": "12345" }, "barcodeAltText": { "value": "12345" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13B" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SALLY" }, "barcode_value": { "value": "12346" }, "barcodeAltText": { "value": "12346" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13C" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SAM" }, "barcode_value": { "value": "12347" }, "barcodeAltText": { "value": "12347" } } } ], "passGroups": ["sfo-pdx-20180730"] } ] } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "links": [ { "status": 200, "adaptiveLinkId": "abchd345678", "adaptiveLinkExternalId": "abch3ExtId1", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "isExpired": false, "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "eb94e8e0-4353-4e0b-bfe9-cfd21c52a540", "androidPassLinkId": "41c1ea48-f469-4968-b610-a98629ea19bc" }, { "status": 200, "adaptiveLinkId": "abchd345Id2", "adaptiveLinkExternalId": "abch3ExtId2", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "isExpired": false, "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "5d370e0d-0aa9-45c3-b7ab-eff0a3d4995b", "androidPassLinkId": "c60bd6c0-8f1e-4419-abb0-9f6fcb8a6fab" }, { "status": 200, "adaptiveLinkId": "abchd345Id2", "adaptiveLinkExternalId": "abch3ExtId2", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "isExpired": false, "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "5d370e0d-0aa9-45c3-b7ab-eff0a3d4995b", "androidPassLinkId": "c60bd6c0-8f1e-4419-abb0-9f6fcb8a6fab" }, ] } ``` --- ## Delete Adaptive Link {#deleteadaptivelink} Deletes an adaptive link. [Jump to examples ↓](#deleteadaptivelink-examples) ### `DELETE /links/adaptive/{adaptiveLinkId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The ID of the adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The adaptive link was successfully deleted. A successful operation returns no content. **`404`** Could not find an entry with specified `adaptiveLinkId`. **Examples** *Example request* ```http DELETE /v1/links/adaptive/rthBWAWDaAA HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json {} ``` --- ## Generate multiple passes from a single Adaptive Link {#generatemultipassfromadaptivelink} Generates a multi-pass bundle from an Adaptive Link. [Jump to examples ↓](#generatemultipassfromadaptivelink-examples) ### `GET /pass/adaptive` **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `ids` | `string` | Required | Comma-separated Adaptive Link IDs to bundle. | | `deviceType` | `string` | Required | The device type the user needs to install. Only required when targeting a specific platform, otherwise, if a device type is not specified in the query, Airship detects the device type from the request headers. If the device type cannot be detected, Airship redirects the request to a landing page URL provided by the client as part of the Adaptive Link metadata. In your landing page, provide buttons that link to the explicit device-specific URLs for iOS and Android pass generation. For example, `/pass/adaptive?ids={comma_separated_adaptive_link_ids}&deviceType=ios`. Possible values: `ios`, `android`, `web` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Requests for iOS passes return a .pkpass file. Requests for Android passes redirect to a Google Pay URL containing the Google pass JSON Web Token (JWT). Requests for `web` devices or without a device type specified return the landing page URL that a user can access to manually select a device type and install the pass. Response body: **Content-Type:** `application/json` Type: `object` **Content-Type:** `application/vnd.apple.pkpass` Type: `object` **`404`** Could not find an entry with specified `adaptiveLinkId`. **Examples** *Example iOS request* ```http GET /v1/pass/adaptive?ids=rthBWAWDaAA,Y0E6EXuTx5i&deviceType=ios HTTP/1.1 ``` *iOS response* ```http HTTP/1.1 200 OK Content-Type: application/vnd.apple.pkpass [.pkpass] ``` *Example Android request* ```http GET /v1/pass/adaptive?ids=rthBWAWDaAA,Y0E6EXuTx5i&deviceType=android HTTP/1.1 ``` *Android response* ```http HTTP/1.1 301 Redirect ``` --- ## Generate pass from Adaptive Link {#generatepassfromadaptivelink} Generates a pass from an adaptive link. When generating passes this way, you can append request parameters mapping to pass fields to the URL to add or update values to the pass at creation time. While this document lists reserved parameters, you can provide the `fieldName=value` for any field contained in the adaptive link. If you configured your adaptive link object with the `isPersonalized` flag set to false (or the flag is absent), the first request will create a pass, and subsequent requests will create new instances of this same pass. If the `isPersonalized` flag is true, every request will create a new pass. If a request includes url-encoded parameters, the `isPersonalized` flag is considered true and Airship will always create a new pass for every request (instead of a pass instance). [Jump to examples ↓](#generatepassfromadaptivelink-examples) ### `GET /pass/adaptive/{adaptiveLinkId}/{deviceType}` **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The identifier of the adaptive link you want to create a pass from. | | `deviceType` | `string` | Required | The device type the user needs to install. Only required when targeting a specific platform, otherwise, if a device type is not specified in the path, Airship detects the device type from the request headers. If the device type cannot be detected, Airship redirects the request to a landing page URL provided by the client as part of the adaptive link metadata. In this landing page, provide buttons that link to the explicit device-specific URLs for iOS and Android pass generation. For example, `/pass/adaptive/{adaptiveLinkId}/{ios}`. Possible values: `ios`, `android`, `web` | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `barcode` | `string` | | Sets the barcode value for the new pass. | | `barcodeAltText` | `string` | | The alternative text for the barcode on the pass. If unspecified, the barcode value is used as the barcodeAltText. | | `tags` | `string` | | Tags you want to associate with the pass. Multiple tags may be separated by `~`, e.g., `&tags=tag1~tag2~tag3`. | | `exid` | `string` | | The external_id you want to set for this pass. | | `lat` | `string` | | The latitude of the device installing the pass, used to calculate distance to locations specified in the adaptive link. | | `long` | `string` | | The longitude of the device installing the pass, used to calculate distance to locations specified in the adaptive link. | | `nfc` | `string` | | The value you want to set for the NFC message field on the pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Requests for iOS passes return a .pkpass file. Requests for Android passes redirect to a Google Pay URL containing the Google pass JSON Web Token (JWT). Requests for `web` devices or without a device type specified return the landing page URL that a user can access to manually select a device type and install the pass. Response body: **Content-Type:** `application/json` Type: `object` **Content-Type:** `application/vnd.apple.pkpass` Type: `object` **`404`** Could not find an entry with specified `adaptiveLinkId`. **Examples** *Example iOS request* ```http GET /v1/pass/adaptive/rthBWAWDaAA/ios HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *iOS response* ```http HTTP/1.1 200 OK Content-Type: application/vnd.apple.pkpass [.pkpass] ``` *Example Android request* ```http GET /v1/pass/adaptive/rthBWAWDaAA/android HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Android response* ```http HTTP/1.1 301 Redirect ``` --- ## Get Adaptive Link {#getadaptivelink} Returns information about a single adaptive link. [Jump to examples ↓](#getadaptivelink-examples) ### `GET /links/adaptive/{adaptiveLinkId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The ID of the adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Lists urls and available passes for an individual link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** Could not find an entry with specified `adaptiveLinkId`. **Examples** *Example request* ```http GET /v1/links/adaptive/abchd345678 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "abchd345678", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "landingPageUrl": "https://example.com/landing.html", "isExpired": false, "availablePasses": 100000, "ttlInDays": 30 } ``` --- ## List Adaptive Links {#listadaptivelinks} Returns a list of adaptive links. [Jump to examples ↓](#listadaptivelinks-examples) ### `GET /links/adaptive` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of all adaptive links for the account. Response body: **Content-Type:** `application/json` - **`links`** `array` <[Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse)> **Examples** *Example request* ```http GET /v1/links/adaptive HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "links": [ { "adaptiveLinkId": "0bDEgyJEko", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/0bDEgyJEko", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/0bDEgyJEko/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/0bDEgyJEko/android", "isPersonalized": true, "isExpired": false, "availablePasses": 999999, "ttlInDays": 30, "iosTemplateId": 4834, "androidTemplateId": 4840 }, { "adaptiveLinkId": "58HTBeYkqg", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/58HTBeYkqg", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/58HTBeYkqg/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/58HTBeYkqg/android", "landingPageUrl": "https://www.urbanairship.com/", "isPersonalized": false, "isExpired": true, "expirationDate": "2020-10-01", "availablePasses": 1000000, "ttlInDays": 30, "iosTemplateId": 4393, "androidTemplateId": 4387 }, { "adaptiveLinkId": "7Qxf5ar9P6", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/7Qxf5ar9P6", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/7Qxf5ar9P6/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/7Qxf5ar9P6/android", "isPersonalized": false, "isExpired": false, "availablePasses": 1000000, "ttlInDays": 30, "iosTemplateId": 4682, "androidTemplateId": 4680 } ] } ``` --- ## List Adaptive Links for a project {#listadaptivelinksforproject} Returns a list of adaptive links for a project. [Jump to examples ↓](#listadaptivelinksforproject-examples) ### `GET /links/adaptive/projects/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `pageSize` | `integer` | | The maximum items to return per page. Defaults to 10. Default: `10` | | `nextPageToken` | `string` | | The token for the next page of results. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of all adaptive links for a project. Response body: **Content-Type:** `application/json` - **`links`** `array` <[Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse)> Max items: 1000 **Examples** *Example request* ```http GET /v1/links/adaptive/projects/7331?pageSize=2 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "links": [ { "adaptiveLinkId": "7XRMaSpcEQk", "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/adaptive/7XRMaSpcEQk", "isPersonalized": false, "availablePasses": 998, "iosTemplateId": 106178, "projectId": 7331, "createdAt": "2023-05-23T20:21:10.446Z", "updatedAt": "2023-05-23T20:21:10.446Z", "status": 200, "isExpired": false, "doesAllowUrlParameters": true, "expiry": "2023-11-19", "isAvailablePassesUnlimited": false }, { "adaptiveLinkId": "Y0E6EXuTx5i", "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/adaptive/Y0E6EXuTx5i", "isPersonalized": false, "availablePasses": 998, "iosTemplateId": 106178, "projectId": 7331, "createdAt": "2023-05-23T20:20:39.808Z", "updatedAt": "2023-05-23T20:20:39.808Z", "status": 200, "isExpired": false, "doesAllowUrlParameters": true, "expiry": "2023-11-19", "isAvailablePassesUnlimited": false } ], "nextPageToken": "XGMuDpx2RDs.1684443368127" } ``` --- ## List Adaptive Links for a template {#listadaptivelinksfortemplate} Returns a list of adaptive links for a template. [Jump to examples ↓](#listadaptivelinksfortemplate-examples) ### `GET /links/adaptive/projects/{projectId}/templates/{templateId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | | `templateId` | `string` | Required | The ID of the template. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `pageSize` | `integer` | | The maximum items to return per page. Defaults to 10. Default: `10` | | `nextPageToken` | `string` | | The token for the next page of results. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of all adaptive links for a template. Response body: **Content-Type:** `application/json` - **`links`** `array` <[Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse)> Max items: 1000 **Examples** *Example request* ```http GET /v1/links/adaptive/projects/7331/templates/106178 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "links": [ { "adaptiveLinkId": "7XRMaSpcEQk", "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/adaptive/7XRMaSpcEQk", "isPersonalized": false, "availablePasses": 998, "iosTemplateId": 106178, "projectId": 7331, "createdAt": "2023-05-23T20:21:10.446Z", "updatedAt": "2023-05-23T20:21:10.446Z", "status": 200, "isExpired": false, "doesAllowUrlParameters": true, "expiry": "2023-11-19", "isAvailablePassesUnlimited": false } ], "nextPageToken": "Y0E6EXuTx5i.1684873239808" } ``` --- ## List passes for an Adaptive Link {#getpassesbyadaptivelink} List passes for an adaptive link. [Jump to examples ↓](#getpassesbyadaptivelink-examples) ### `GET /links/adaptive/{adaptiveLinkId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The adaptive link ID used for pass creation. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular adaptive link. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with an adaptive link. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. **`404`** The adaptive link ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/rthBWAWDaAA/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 616, "templateId": 1000057, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/616/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da0b8", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 610, "templateId": 1000083, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/610/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e216", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## List passes for an Adaptive Link for a project {#getpassesbyadaptivelinkforproject} List passes for an adaptive link for a project. [Jump to examples ↓](#getpassesbyadaptivelinkforproject-examples) ### `GET /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project, generated by Airship, containing the adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The adaptive link external ID used for pass creation. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. * `unknown` — passes that have an unknown status. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed`, `unknown` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular adaptive link. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with an adaptive link. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. **`404`** The project ID or adaptive link external ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/project/6884/id/my_ext_121924_2/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [ { "id": 1574695, "templateId": 5483, "url": "https://wallet-staging-gcp.urbanairship.com/v1/pass/1474695/download", "serialNumber": "a1c69eaf-754c-4eed-8124-6c0090c66b31", "createdAt": "2024-11-19T17:42:52.000Z", "updatedAt": "2024-11-19T17:46:24.000Z", "status": "installed", "headers": { }, "fields": { }, "installedAt": "2024-11-19T17:43:10.000Z", "platform": "ios" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 10 } } ``` --- ## List passes for an Adaptive Link for an external project {#getpassesbyadaptivelinkforexternalproject} List passes for an adaptive link for an external project. [Jump to examples ↓](#getpassesbyadaptivelinkforexternalproject-examples) ### `GET /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project containing an adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The adaptive link external ID used for pass creation. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. * `unknown` — passes that have an unknown status. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed`, `unknown` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular adaptive link. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with an adaptive link. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. **`404`** The project ID or adaptive link external ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/project/id/exid_7294/id/my_ext_flight_111924_2/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [ { "id": 1474695, "templateId": 5383, "url": "https://wallet-staging-gcp.urbanairship.com/v1/pass/1474695/download", "serialNumber": "a1c69eaf-754c-4eed-8124-6c0090c66b31", "createdAt": "2024-11-19T17:42:52.000Z", "updatedAt": "2024-11-19T17:46:24.000Z", "status": "installed", "headers": { }, "fields": { }, "installedAt": "2024-11-19T17:43:10.000Z", "platform": "ios" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 10 } } ``` --- ## Update Adaptive Link {#updateadaptivelink} Updates an individual adaptive link. You can provide any part of an adaptive link body. Adaptive link fields that you do not provide in this request remain unchanged. [Jump to examples ↓](#updateadaptivelink-examples) ### `PUT /links/adaptive/{adaptiveLinkId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The ID of the adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** A request specifies templates and other information about, and limits for, passes created from the adaptive link. If you provide a single template, then the adaptive link functions for either iOS or Android devices and sends users of the other device type to a landing page. **Content-Type:** `application/json` [Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkrequest) **Responses** **`200`** A successful request results in an adaptive link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** Could not find templates or Dynamic Link object(s). **Examples** *Example request* ```http PUT /v1/links/adaptive/as3shd345 HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "landingPageUrl": "https://example.com/landing.html", "payload": {"fields": {"tier": {"value": "gold"}}} } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "as3shd345", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/as3shd345", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/as3shd345/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/as3shd345/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": "true", "isExpired": false, "availablePasses": 100000, "ttlInDays": 30 } ``` --- # Adaptive Links with external IDs > Adaptive Link endpoints with external IDs — either for the link itself or for passes generated from adaptive links. An adaptive link is a link that detects the platform of a recipient and installs the correct pass. You can send adaptive links to both Apple and Google platform users; When a user on either platform taps the link, Airship detects the user's device platform and returns the correct pass. To send an adaptive link to both Google and Apple platforms, you must have configured templates for both platforms. You can send an adaptive link to an individual platform, and define the behavior for the unsupported platform. ## Create Adaptive Link {#createadaptivelinkexternalid} Create an adaptive link with an external ID. The adaptiveLinkExternalID you use in the path becomes the ID for your new adaptive link. [Jump to examples ↓](#createadaptivelinkexternalid-examples) ### `POST /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project, generated by Airship, containing the adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The custom identifier for the adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkrequest) **Responses** **`200`** A successful request results in an adaptive link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** Could not find or create Dynamic Link object(s). **Examples** *Example request* ```http POST /v1/links/adaptive/project/12345/id/coolNewAdaptiveLink HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateId": 54321, "androidTemplateId": 54322, "isPersonalized": false, "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "landingPageUrl": "https://example.com/landing.html", "availablePasses": 100000, "payload": {} } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "1KVMz6NlFb", "adaptiveLinkExternalId": "coolNewAdaptiveLink", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": false, "isExpired": false, "availablePasses": 100000, "ttlInDays": 730, "iosTemplateId": 54321, "androidTemplateId": 54322, "projectId": 12345, "createdAt": "2019-05-28T23:55:00.000Z", "updatedAt": "2019-05-31T00:59:42.000Z", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "status": 200 } ``` --- ## Create Adaptive Link in project {#createadaptivelinkexternalprojectid} Create an adaptive link in a project that also has an external ID. The adaptiveLinkExternalID you use in the path becomes the ID for your new adaptive link. [Jump to examples ↓](#createadaptivelinkexternalprojectid-examples) ### `POST /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project containing an adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The custom identifier for an adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Adaptive Link request]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkrequest) **Responses** **`200`** A successful request results in an adaptive link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** Could not find project, or could not find or create Dynamic Link object(s). **Examples** *Example request* ```http POST /v1/links/adaptive/project/id/myExternalProject/id/coolNewAdaptiveLink HTTP/1.1 Authorization: Basic Content-Type: application/json { "iosTemplateExternalId": "ios123ExtId", "androidTemplateExternalId": "android123ExtId", "isPersonalized": "true", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "landingPageUrl": "https://example.com/landing.html", "availablePasses": 100000, "payload": {} } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "1KVMz6NlFb", "adaptiveLinkExternalId": "coolNewAdaptiveLink", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": false, "isExpired": false, "availablePasses": 100000, "ttlInDays": 730, "iosTemplateId": 54321, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 54322, "androidTemplateExternalId": "android123ExtId", "projectId": 12345, "projectExternalId": "myExternalProject", "createdAt": "2019-05-28T23:55:00.000Z", "updatedAt": "2019-05-31T00:59:42.000Z", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "status": 200 } ``` --- ## Get Adaptive Link {#getadaptivelinkexternalid} Get an adaptive link with an external ID. [Jump to examples ↓](#getadaptivelinkexternalid-examples) ### `GET /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project, generated by Airship, containing the adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The custom identifier for the adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Lists urls and available passes for an individual link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** The project or adaptive link does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/project/12345/id/coolNewAdaptiveLink HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "1KVMz6NlFb", "adaptiveLinkExternalId": "coolNewAdaptiveLink", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": false, "isExpired": false, "availablePasses": 100000, "ttlInDays": 730, "iosTemplateId": 54321, "androidTemplateId": 54322, "projectId": 12345, "createdAt": "2019-05-28T23:55:00.000Z", "updatedAt": "2019-05-31T00:59:42.000Z", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "status": 200 } ``` --- ## Get Adaptive Link from project {#getadaptivelinkexternalprojectid} Get an adaptive link with an external ID from a project that also has an external ID. [Jump to examples ↓](#getadaptivelinkexternalprojectid-examples) ### `GET /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wadl **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project containing an adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The custom identifier for an adaptive link. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Lists urls and available passes for an individual link. Response body: **Content-Type:** `application/json` [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) **`404`** The project or adaptive link does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/project/id/myExternalProject/id/coolNewAdaptiveLink HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "adaptiveLinkId": "1KVMz6NlFb", "adaptiveLinkExternalId": "coolNewAdaptiveLink", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/1KVMz6NlFb/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": false, "isExpired": false, "availablePasses": 100000, "ttlInDays": 730, "iosTemplateId": 54321, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 54322, "androidTemplateExternalId": "android123ExtId", "projectId": 12345, "projectExternalId": "myExternalProject", "createdAt": "2019-05-28T23:55:00.000Z", "updatedAt": "2019-05-31T00:59:42.000Z", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "19d128a6-ac7a-3c6c-2a4d-214b6bf81b21", "status": 200 } ``` --- ## Get pass from Adaptive Link {#getpassfromadaptivelinkexternalid} Get a pass with an external ID that was created from an adaptive link with an external ID. [Jump to examples ↓](#getpassfromadaptivelinkexternalid-examples) ### `GET /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project containing the adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The adaptive link passes were created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to get. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns an array up to two passes created from the adaptive link — one for each template supported by the adaptive link. Response body: **Content-Type:** `application/json` - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. Min items: 1, Max items: 2 **`404`** The project, adaptive link, or pass ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/project/id/myExternalProject/id/coolNewAdaptiveLink/passes/id/mypass HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [ { "id": 39, "templateId": 6, "serialNumber": "6f019144-2285-4bb9-b28a-f863af887e53", "createdAt": "2019-03-06T17:48:28.000Z", "updatedAt": "2019-03-06T17:48:29.000Z", "externalId": "ext14" }, { "id": 38, "templateId": 5, "serialNumber": "7f57d625-cf7c-455b-b3d9-c70adef7d889", "createdAt": "2019-03-06T17:39:00.000Z", "updatedAt": "2019-03-06T17:39:01.000Z", "externalId": "ext14" } ] } ``` --- ## Get passes from Adaptive Link {#getpassesexternalid} Get passes with an external IDs that were created from an adaptive link. [Jump to examples ↓](#getpassesexternalid-examples) ### `GET /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The adaptive link passes were created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to get. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns an array up to two passes created from the adaptive link — one for each template supported by the adaptive link. Response body: **Content-Type:** `application/json` - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. Min items: 1, Max items: 2 **`404`** The adaptive link or pass ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/coolNewAdaptiveLink/passes/id/mypass HTTP/1.1 Authorization: Basic Content-Type: application/json ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [ { "id": 39, "templateId": 6, "serialNumber": "6f019144-2285-4bb9-b28a-f863af887e53", "createdAt": "2019-03-06T17:48:28.000Z", "updatedAt": "2019-03-06T17:48:29.000Z", "externalId": "ext14" }, { "id": 38, "templateId": 5, "serialNumber": "7f57d625-cf7c-455b-b3d9-c70adef7d889", "createdAt": "2019-03-06T17:39:00.000Z", "updatedAt": "2019-03-06T17:39:01.000Z", "externalId": "ext14" } ] } ``` --- ## Update passes from Adaptive Link {#updatepassesexternalid} Update a pass with an external ID that was created from an adaptive link. You need only provide the fields and headers you want to update for the pass; all other information will remain unchanged. [Jump to examples ↓](#updatepassesexternalid-examples) ### `PUT /links/adaptive/{adaptiveLinkId}/passes/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The adaptive link passes were created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to update. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields or headers that you want to update for the specified pass. Locations operate as a `set` operation. The array of pass locations is replaced by the locations you provide in an update; if you want to add to the locations on the pass, you must provide both the current locations and the locations you want to add in the payload. **Content-Type:** `application/json` - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> **APPLE ONLY** An array of beacon objects you want to update for this pass. - **`fields`** `object` The fields you want to update on the pass. - **`headers`** `object` The headers you want to update for this pass. - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> The locations you want to update for this pass. Location updates replace existing locations on the pass. When updating locations, you should provide all the locations that you want to remain on the pass. - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> An object that defines structured metadata for an Apple Wallet pass using key-value pairs. These semantic tags provide contextual information to the system to enhance the user experience. 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`. - **`universalLinks`** `object` <[Universal links]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#universallinksobject)> An object containing key-value pairs of universal links where each key-value pair defines a universal link. A list of key-value pairs that represents partner URLs. **Responses** **`200`** Returns a ticket IDs corresponding to the templates the adaptive link generated passes from. For example, if the pass was installed on both Android and iOS devices, the response will include two tickets — one to update passes supported by each template. Response body: **Content-Type:** `application/json` - **`tickets`** `array[object]` Min items: 1, Max items: 2 **`404`** The adaptive link or pass ID does not exist. **Examples** *Example request* ```http PUT /v1/links/adaptive/coolNewAdaptiveLink/passes/id/mypass HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "Details": { "changeMessage": "Enjoy %@ off your next order!", "value": "20%", "label": "Coupon" }, "thumbnail_image": { "value": "https:\/\/example.com\/assets\/favicon.png" } }, "beacons": [ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 1, "minor": 777 } ], "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" } ] } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "tickets": [ { "id": 15 }, { "id": 16 } ] } ``` --- ## Update passes from Adaptive Link for an external project {#updatepassesfromadaptivelinkexternalid} Update a pass with an external ID that was created from an adaptive link with an external ID. You need only provide the fields and headers you want to update for the pass; all other information will remain unchanged. [Jump to examples ↓](#updatepassesfromadaptivelinkexternalid-examples) ### `PUT /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project containing the adaptive link. | | `adaptiveLinkExternalId` | `string` | Required | The adaptive link passes were created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to update. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields or headers that you want to update for the specified pass. Locations operate as a `set` operation. The array of pass locations is replaced by the locations you provide in an update; if you want to add to the locations on the pass, you must provide both the current locations and the locations you want to add in the payload. **Content-Type:** `application/json` - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> **APPLE ONLY** An array of beacon objects you want to update for this pass. - **`fields`** `object` The fields you want to update on the pass. - **`headers`** `object` The headers you want to update for this pass. - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> The locations you want to update for this pass. Location updates replace existing locations on the pass. When updating locations, you should provide all the locations that you want to remain on the pass. - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> An object that defines structured metadata for an Apple Wallet pass using key-value pairs. These semantic tags provide contextual information to the system to enhance the user experience. 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`. - **`universalLinks`** `object` <[Universal links]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#universallinksobject)> An object containing key-value pairs of universal links where each key-value pair defines a universal link. A list of key-value pairs that represents partner URLs. **Responses** **`200`** Returns a ticket IDs corresponding to the templates the adaptive link generated passes from. For example, if the pass was installed on both Android and iOS devices, the response will include two tickets — one to update passes supported by each template. Response body: **Content-Type:** `application/json` - **`tickets`** `array[object]` Min items: 1, Max items: 2 **`404`** The project, adaptive link, or pass ID does not exist. **Examples** *Example request* ```http PUT /v1/links/adaptive/project/id/myExternalProject/id/coolNewAdaptiveLink/passes/id/mypass HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "Details": { "changeMessage": "Enjoy %@ off your next order!", "value": "20%", "label": "Coupon" }, "thumbnail_image": { "value": "https:\/\/example.com\/assets\/favicon.png" } }, "beacons": [ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 1, "minor": 777 } ], "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" } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "tickets": [ { "id": 15 }, { "id": 16 } ] } ``` --- # Apple Passes Only > Operations that apply only to Apple Wallet passes. ## Add or update beacons for Apple Wallet pass {#addreplacebeaconsforpassexternalid} Add or replace beacons on the specified Apple Wallet pass with an external ID. [Jump to examples ↓](#addreplacebeaconsforpassexternalid-examples) ### `PUT /pass/template/{templateId}/id/{passExternalId}/beacons` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the Apple Wallet pass that you want to apply beacons to. | | `passExternalId` | `string` | Required | The external ID of the Apple Wallet pass you want to apply beacons to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** An array of beacons that you want to associate with the pass. **Content-Type:** `application/json` - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> An array of objects, each representing a beacon you want to add to an Apple Wallet pass. **Responses** **`201`** A successful call results in a ticket to apply beacons to the pass. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` A ticket you can use to reference this operation for status, troubleshooting, or logging purposes. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http PUT /v1/pass/template/123/id/mypass/beacons HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "beacons":[ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 2, "minor": 346 } ] } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "ticketId": 7 } ``` --- ## Download an Apple Wallet .pkpass {#getapplewalletpass} Download an Apple Wallet pass as a .pkpass file, using its pass ID. Direct the output to a file with a .zip extension. This is a utility API to help you debug passes. To download a pass using an external ID, see [Download an Apple Wallet .pkpass by external ID](#operation-pass-template-templateid-id-passexternalid-download-get). See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about .pkpass files and contents. [Jump to examples ↓](#getapplewalletpass-examples) ### `GET /pass/{passId}/download` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want to download. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns the .pkpass file as a .zip extension. **Examples** *Example request* ```http GET /v1/pass/123/download HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Download an Apple Wallet .pkpass by external ID {#getapplewalletpassfortemplateexternalid} Download an Apple Wallet pass as a .pkpass file, using its external ID and template ID. Direct the output to a file with a .zip extension. This is a utility API to help you debug passes. To download a pass using its pass ID, see [Download an Apple Wallet .pkpass](#operation-pass-passid-download-get). See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about .pkpass files and contents. [Jump to examples ↓](#getapplewalletpassfortemplateexternalid-examples) ### `GET /pass/template/{templateId}/id/{passExternalId}/download` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template used to create the pass. | | `passExternalId` | `string` | Required | The external ID of the pass you want to download. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns the .pkpass file as a .zip extension. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http GET /v1/pass/template/123/id/mypass/download HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Download multiple Apple Wallet passes in a single .pkpasses file {#getapplewalletpasses} Download multiple Apple Wallet passes bundled into a single .pkpasses file, using their pass IDs provided as a comma-separated query parameter. Direct the output to a file with a .zip extension. This is a utility API to help you debug passes. To download multiple passes using external IDs, see [Download multiple Apple Wallet passes in a single .pkpasses file by external ID](#operation-pass-template-templateid-download-get). See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about .pkpass files and contents. [Jump to examples ↓](#getapplewalletpasses-examples) ### `GET /pass/download` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passIds` | `string` | Required | One or more pass IDs (comma separated) that should be included in the download. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns the .pkpasses file as a .zip extension. **Examples** *Example request* ```http GET /v1/pass/download?passIds=123 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Download multiple Apple Wallet passes in a single .pkpasses file by external ID {#getapplewalletmultipassfortemplateexternalid} Download multiple Apple Wallet passes bundled into a single .pkpasses file, using their external IDs provided as a comma-separated query parameter and a template ID. Direct the output to a file with a .zip extension. This is a utility API to help you debug passes. To download multiple passes using pass IDs, see [Download multiple Apple Wallet passes in a single .pkpasses file](#operation-pass-download-get). See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about .pkpass files and contents. [Jump to examples ↓](#getapplewalletmultipassfortemplateexternalid-examples) ### `GET /pass/template/{templateId}/download` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template the pass will be or was created from. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{templateExternalId}`. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `exids` | `string` | Required | The external IDs (comma separated) of the passes that you want in the download. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns the .pkpasses file as a .zip extension. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http GET /v1/pass/template/123/download?exids=mypass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external template ID* ```http GET /v1/pass/template/id/1234/download?exids=mypass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## List beacons on Apple Wallet pass {#getbeaconsforpassexternalid} Lists location beacons assigned to the specified Apple Wallet pass. [Jump to examples ↓](#getbeaconsforpassexternalid-examples) ### `GET /pass/template/{templateId}/id/{passExternalId}/beacons` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the Apple Wallet pass that you want to get beacons from. | | `passExternalId` | `string` | Required | The external ID of the Apple Wallet pass you want to get beacons for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** An array of beacons belonging to the pass. Response body: **Content-Type:** `application/json` - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> An array of objects, each representing a beacon associated with the Apple Wallet pass. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http GET /v1/pass/template/123/id/mypass/beacons HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "beacons":[ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 2, "minor": 346 } ] } ``` --- ## View Apple Wallet JSON {#getapplewalletpassjson} Returns the JSON of an Apple Wallet pass. The Airship request payload is translated when sent to Apple. You can use this endpoint to view the JSON payload as passed to Apple Wallet for debugging purposes. See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about Apple Wallet payloads. [Jump to examples ↓](#getapplewalletpassjson-examples) ### `GET /pass/{passId}/viewJSONPass` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want to return Apple Wallet JSON for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns Apple JSON Response body: **Content-Type:** `application/json` Type: `object` **Examples** *Example request* ```http GET /v1/pass/123/viewJSONPass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "passTypeIdentifier": "pass.com....", "storeCard": { "backFields":[ { "key": "Program Details", "label": "Program Details", "value": "Some information about how the loyalty program works and its benefits.\n\nAdditional terms and support information." }, { "key": "Merchant Website", "label": "Merchant Website", "value": "http:\/\/www.example.com" }, { "key": "back0", "label": "Built with Airship Mobile Wallet", "value": "Find out more and create your own passes at https://www.airship.com/channels/mobile-wallet/" } ], "primaryFields":[ { "key": "Program Name", "label": "Airship", "value": "Program Name", "textAlignment": "PKTextAlignmentNatural" } ], "headerFields":[ { "key": "Points", "label": "Points", "value": 1234.0, "textAlignment": "PKTextAlignmentNatural", "numberStyle": "PKNumberStyleDecimal" } ], "secondaryFields":[ { "key": "Tier", "label": "Tier", "value": 2.0, "textAlignment": "PKTextAlignmentNatural", "numberStyle": "PKNumberStyleDecimal" }, { "key": "Tier Name", "label": "Tier Name", "value": "Silver", "textAlignment": "PKTextAlignmentNatural" }, { "key": "Member Name", "label": "Member Name", "value": "First Last", "textAlignment": "PKTextAlignmentNatural" } ] }, "organizationName": "Airship", "backgroundColor": "rgb(0,147,201)", "labelColor": "rgb(24,86,148)", "authenticationToken": "df897c90-5a9b-48dd-a4b4-8020486811b7", "serialNumber": "bcc7cdae-e491-4e36-a95e-9758e31549aa", "barcode": { "message": "123456789", "messageEncoding": "iso-8859-1", "format": "PKBarcodeFormatPDF417", "altText": "123456789" }, "teamIdentifier": "MN52833CEX", "formatVersion": 1, "webServiceURL": "https:\/\/wallet-api.urbanairship.com\/apple", "description": "Template 1", "foregroundColor": "rgb(255,255,255)" } ``` --- ## View Apple Wallet JSON with external ID {#getapplewalletpassjsonexternalid} View the JSON of an Apple Wallet Pass. The Airship request payload is different from the JSON payload contained in an Apple Wallet pass. You can use this endpoint to view the JSON payload as passed to Apple Wallet. See [Apple's developer documentation](https://developer.apple.com/wallet/) for information about Apple Wallet payloads. [Jump to examples ↓](#getapplewalletpassjsonexternalid-examples) ### `GET /pass/id/{passExternalId}/viewJSONPass` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passExternalId` | `string` | Required | The custom identifier of the pass you want to return Apple Wallet JSON for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns JSON as passed to Apple Wallet. Response body: **Content-Type:** `application/json` Type: `object` **Examples** *Example request* ```http GET /v1/pass/id/123/viewJSONPass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "passTypeIdentifier": "pass.com....", "storeCard": { "backFields":[ { "key": "Program Details", "label": "Program Details", "value": "Some information about how the loyalty program works and its benefits.\n\nAdditional terms and support information." }, { "key": "Merchant Website", "label": "Merchant Website", "value": "http:\/\/www.example.com" }, { "key": "back0", "label": "Built with Airship Mobile Wallet", "value": "Find out more and create your own passes at https://www.airship.com/channels/mobile-wallet/" } ], "primaryFields":[ { "key": "Program Name", "label": "Airship", "value": "Program Name", "textAlignment": "PKTextAlignmentNatural" } ], "headerFields":[ { "key": "Points", "label": "Points", "value": 1234.0, "textAlignment": "PKTextAlignmentNatural", "numberStyle": "PKNumberStyleDecimal" } ], "secondaryFields":[ { "key": "Tier", "label": "Tier", "value": 2.0, "textAlignment": "PKTextAlignmentNatural", "numberStyle": "PKNumberStyleDecimal" }, { "key": "Tier Name", "label": "Tier Name", "value": "Silver", "textAlignment": "PKTextAlignmentNatural" }, { "key": "Member Name", "label": "Member Name", "value": "First Last", "textAlignment": "PKTextAlignmentNatural" } ] }, "organizationName": "Airship", "backgroundColor": "rgb(0,147,201)", "labelColor": "rgb(24,86,148)", "authenticationToken": "df897c90-5a9b-48dd-a4b4-8020486811b7", "serialNumber": "bcc7cdae-e491-4e36-a95e-9758e31549aa", "barcode": { "message": "123456789", "messageEncoding": "iso-8859-1", "format": "PKBarcodeFormatPDF417", "altText": "123456789" }, "teamIdentifier": "MN52833CEX", "formatVersion": 1, "webServiceURL": "https:\/\/wallet-api.urbanairship.com\/apple", "description": "Template 1", "foregroundColor": "rgb(255,255,255)" } ``` --- # Apple Wallet Pass Personalization > Adding personalization to an Apple Wallet `loyalty` template creates a pass that prompts the user for relevant personal information when signing up for a rewards program. These endpoints help you manage the personalizable information that you require users to provide when signing up for your loyalty/rewards program. ## Add personalization requirements {#addpersonalizationrequirements} Adds personalization requirements to a template. When a user attempts to install a pass with personalization requirements, they are first prompted for the `requiredPersonalizationFields` specified in this payload. When the user fills out the information and accepts the terms and conditions (if present), they receive a personalized pass. [Jump to examples ↓](#addpersonalizationrequirements-examples) ### `POST /template/{templateId}/personalization` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The loyalty card template you want to add, modify, or retrieve personalization information for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Responses** **`200`** Your personalization requirements have been added to the template. Response body: **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Examples** *Example request* ```http POST /v1/template/12345/personalization HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` --- ## Delete personalization requirements {#removepersonalizationrequirements} Removes personalization requirements from a template. [Jump to examples ↓](#removepersonalizationrequirements-examples) ### `DELETE /template/{templateId}/personalization` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The loyalty card template you want to add, modify, or retrieve personalization information for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Your personalization requirements removed from the template. Response body: **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Examples** *Example request* ```http DELETE /v1/template/12345/personalization HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` --- ## Get personalization requirements {#getpersonalizationrequirements} Returns personalization requirements for a template. [Jump to examples ↓](#getpersonalizationrequirements-examples) ### `GET /template/{templateId}/personalization` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The loyalty card template you want to add, modify, or retrieve personalization information for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Your template has the following personalization requirements. Response body: **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Examples** *Example request* ```http GET /v1/template/12345/personalization HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` --- ## Update personalization requirements {#updatepersonalizationrequirements} When updating personalization requirements for a template, you must provide a complete payload. This request overwrites all previous personalization requirements attached to the template; any information you leave out of this request will be removed from the personalization requirements for the template. [Jump to examples ↓](#updatepersonalizationrequirements-examples) ### `PUT /template/{templateId}/personalization` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The loyalty card template you want to add, modify, or retrieve personalization information for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Responses** **`200`** Your personalization requirements have been updated for the template. Response body: **Content-Type:** `application/json` [Apple Pass personalization requirements]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#personalizationrequirements) **Examples** *Example request* ```http PUT /v1/template/12345/personalization HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` --- # Callbacks > [Wallet callbacks](/guides/wallet/user-guide/reporting/wallet-callbacks/) provide a pass event notification, e.g., pass install or uninstall, using webhooks. ## Create callback specification {#createcallbackspecification} Register a callback specification, which includes the remote URL and any HTTP headers required by the remote URL. Your callback server should expect to receive callbacks at up to three endpoints: * `{baseUrl}/v1/pass/install` — Receives a [callback](/docs/developer/rest-api/wallet/schemas/others/#callbackobject) when your audience installs passes. * `{baseUrl}/v1/pass/uninstall` — Receives a [callback](/docs/developer/rest-api/wallet/schemas/others/#callbackobject) when your audience uninstalls passes. * `{baseUrl}/v1/pass/{passId}/personalize` — Receives a [callback with a personalization object](/docs/developer/rest-api/wallet/schemas/others/#callbackpersonalizationobject) when your audience personalizes a Loyalty pass. You must [add personalization requirements](/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/) to Apple templates before users can personalize passes created from them. See [Wallet callbacks](/docs/guides/wallet/user-guide/reporting/wallet-callbacks/) for more information. [Jump to examples ↓](#createcallbackspecification-examples) ### `POST /project/{projectId}/settings/callback` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`baseUrl`** `string` The URL of your webhook/callback server. - **`headers`** `object` Contains headers required by your webhook/callback server, including authorization, content-type, etc. By default, Airship appends `content-type: application/json` and sends a JSON payload. **Responses** **`200`** A successful call returns the callback specification. Response body: **Content-Type:** `application/json` - **`baseUrl`** `string` The URL of your webhook/callback server. - **`headers`** `object` Contains headers required by your webhook/callback server, including authorization, content-type, etc. By default, Airship appends `content-type: application/json` and sends a JSON payload. **Examples** *Example request* ```http POST /v1/project/12345/settings/callback HTTP/1.1 Authorization: Basic Content-Type: application/json { "baseUrl": "https://www.remotehost.example.com/callbacks", "headers": { "Authorization": "Basic dGVzdEB0ZXN0LmNvbTp0ZXN0", "Content-Type": "application/json" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "baseUrl": "https://www.remotehost.example.com/callbacks", "headers": { "Authorization": "Basic dGVzdEB0ZXN0LmNvbTp0ZXN0", "Content-Type": "application/json" } } ``` --- ## Delete callback specification {#deletecallbackspecification} Delete a registered callback specification. Because a project only uses a single callback specification, you specify the `projectId` only. [Jump to examples ↓](#deletecallbackspecification-examples) ### `DELETE /project/{projectId}/settings/callback` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`204`** A successful request returns no content. **Examples** *Example request* ```http DELETE /v1/project/12345/settings/callback HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 204 No Content ``` --- ## Get callback specification {#getcallbackspecification} Return the callback specification for a project. [Jump to examples ↓](#getcallbackspecification-examples) ### `GET /project/{projectId}/settings/callback` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful call returns the callback specification. Response body: **Content-Type:** `application/json` - **`baseUrl`** `string` The URL of your webhook/callback server. - **`headers`** `object` Contains headers required by your webhook/callback server, including authorization, content-type, etc. By default, Airship appends `content-type: application/json` and sends a JSON payload. **Examples** *Example request* ```http GET /v1/project/12345/settings/callback HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "baseUrl": "https://www.remotehost.example.com/callbacks", "headers": { "Authorization": "Basic dGVzdEB0ZXN0LmNvbTp0ZXN0", "Content-Type": "application/json" } } ``` --- ## Update callback specification {#updatecallbackspecification} Update a callback specification. The payload to update a callback is identical to the payload to create a callback. [Jump to examples ↓](#updatecallbackspecification-examples) ### `PUT /project/{projectId}/settings/callback` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`baseUrl`** `string` The URL of your webhook/callback server. - **`headers`** `object` Contains headers required by your webhook/callback server, including authorization, content-type, etc. By default, Airship appends `content-type: application/json` and sends a JSON payload. **Responses** **`200`** A successful call returns the callback specification. Response body: **Content-Type:** `application/json` - **`baseUrl`** `string` The URL of your webhook/callback server. - **`headers`** `object` Contains headers required by your webhook/callback server, including authorization, content-type, etc. By default, Airship appends `content-type: application/json` and sends a JSON payload. **Examples** *Example request* ```http PUT /v1/project/12345/settings/callback HTTP/1.1 Authorization: Basic Content-Type: application/json { "baseUrl": "https://www.remotehost.example.com/callbacks", "headers": { "Authorization": "Basic dGVzdEB0ZXN0LmNvbTp0ZXN0", "Content-Type": "application/json" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "baseUrl": "https://www.remotehost.example.com/callbacks", "headers": { "Authorization": "Basic dGVzdEB0ZXN0LmNvbTp0ZXN0", "Content-Type": "application/json" } } ``` --- # Certificates > These endpoints supports Apple certificates only. Google certificates can be managed via the UI. ## Add new certificate {#addcertificate} Adds a new Apple Wallet certificate to the Wallet system. If the specified certificate exists in our system, and the baseName and teamIdentifier match the existing certificate, we will renew/update the existing certificate. When adding a certificate, you must paste the contents of your p12 certificate into the certificate field in the request payload. You can get the contents of your p12 file with the two following commands: * `openssl base64 -in wallet-prod.p12 -out wallet-prod.pem` * `cat wallet-prod.pem | tr -d "\n\r" | less` The response contains the ID of your new certificate. You will use the ID to perform subsequent actions (GET, PUT, or DELETE) against this certificate. The response will also contain other information gathered from the certificate. You can find information about these additional fields under Get Certificate. [Jump to examples ↓](#addcertificate-examples) ### `POST /certificates` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject) **Responses** **`201`** Returns the created certificate and new read only fields. Response body: **Content-Type:** `application/json` [Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject) **Examples** *Example request* ```http POST /v1/certificates HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "vendor": "Apple", "name": "editable name", "certificate": "NTUtNDc2Ni1hMzI4LWEwOGU3YWI2ZDk3Mg==", "comment": "something about this cert", "enabled": true, "default": false, "password": "secret" } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json { "id": "40adce15-5c52-479d-8620-54c21cd851a6", "vendor": "Apple", "name": "editable name", "baseName": "internal cert name", "comment": "something about this cert", "teamIdentifier": "XYZ", "enabled": true, "default": false, "createdAt": "2016-05-26T23:23:21Z", "updatedAt": "2016-05-26T22:23:21Z", } ``` --- ## Get certificate {#getcertificate} Returns information about a certificate, including an array of templates that use the certificate. [Jump to examples ↓](#getcertificate-examples) ### `GET /certificates/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The ID of the certificate you want to perform operations against. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns information about the certificate specified in the request Response body: **Content-Type:** `application/json` [Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject) **Examples** *Example request* ```http GET /v1/certificates/9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "id": "9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9", "vendor": "Apple", "baseName": "pass.com.company.sample.alpha", "teamIdentifier": "PGJV57GD94", "nfcSupport": true, "enabled": true, "default": false, "createdAt": "2022-04-05T03:22:47.000Z", "updatedAt": "2022-04-05T03:22:47.000Z", "validityStart": "2021-11-03T03:45:53.000Z", "validityEnd": "2022-12-03T04:45:52.000Z", "expired": true } ``` --- ## List certificates {#getcertificates} Returns a list of certificates, including an array of templates that use the certificate. [Jump to examples ↓](#getcertificates-examples) ### `GET /certificates` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `vendor` | `string` | | The vendor of certificate you want to return. Possible values: `Apple` | | `enabled` | `boolean` | | Indicates whether or not the certificate is enabled. | | `order` | `string` | | Indicates the field to order results by. | | `page` | `integer` | | Indicates the page of results to return. | | `pageSize` | `integer` | | Indicates the number of results per page. | | `direction` | `string` | | Indicates the direction in which to return results. Possible values: `ASC`, `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | | `Content-Type` | `string` | Required | The request `Content-Type` must be `application/json; charset=utf-8`. Possible values: `application/json; charset=utf-8` | **Responses** **`200`** Returns an array of certificates. Response body: **Content-Type:** `application/json` - **`certificates`** `array` <[Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject)> - **`count`** `integer` The number of results on the current page. - **`nextPage`** `string` The url for the next page of results. Format: `url` - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. **Examples** *Example request* ```http GET /v1/certificates HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "certificates": [ { "id": "9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9", "vendor": "Apple", "baseName": "pass.com.company.sample.alpha", "teamIdentifier": "PGJV57GD94", "nfcSupport": true, "enabled": true, "default": false, "createdAt": "2022-04-05T03:22:47.000Z", "updatedAt": "2022-04-05T03:22:47.000Z", "validityEnd": "2022-12-03T04:45:52.000Z", "validityStart": "2021-11-03T03:45:53.000Z", "expired": true } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "nextPage": "https://wallet.urbanairship.com/v1/certificates/list/?page=11&pageSize=10", "count": 2, "pagination": { "order": "name", "page": 1, "start": 0, "direction": "DESC", "pageSize": 10 }, "certificates":[ { "id": "40adce15-5c52-479d-8620-54c21cd851a6", "vendor": "Apple", "baseName": "pass.com.myName.test", "name": "editable name", "comment": "something about this cert", "teamIdentifier": "9M8MY376H5", "nfcSupport": false, "enabled": false, "createdAt": "2018-05-26T23:23:21Z", "updatedAt": "2019-05-26T22:23:21Z", "expired": false, "validityStart": "2018-05-26T23:45:00Z", "validityEnd": "2019-05-26T23:45:00Z", "templates": [ {"id": 123,"name": "templateName1"}, {"id": 221,"name": "templateName2"} ] }, { "id": "12adce15-5c52-479d-8620-54c21cd851aa", "vendor": "Apple", "baseName", "pass.wallet.myName.anotherTest", "name": "editable name1", "comment": "a plain text description of this cert", "teamIdentifier": "OGKV57GD95", "nfcSupport": true, "enabled": false, "default": false, "createdAt": "2018-04-26T23:23:21Z", "updatedAt": "2019-04-27T17:22:00Z", "expired": false, "validityStart": "2018-05-26T23:45:00Z", "validityEnd": "2019-05-26T23:45:00Z", "templates": [ {"id": 123, "name": "templateName1"}, {"id": 221, "name": "templateName2"} ] } ] } ``` --- ## Remove certificate {#removecertificate} Removes a certificate from the system. [Jump to examples ↓](#removecertificate-examples) ### `DELETE /certificates/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The ID of the certificate you want to perform operations against. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`204`** A successful request returns no content. **Examples** *Example request* ```http DELETE /v1/certificates/9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 204 No Content ``` --- ## Update certificate {#updatecertificate} Updates a certificate. Note the following behaviors: * The following fields can be updated directly: `enabled`, `default`, `comment`, and `name`. * If fields `enabled` and `default` are not specified they won't be changed. * If fields `comment` and `name` are not specified, we assume the value needs to be removed. If you don't want to change the value, specify null values. * Some of the fields will be extracted from the certificate and will be updated indirectly: teamIdentifier and baseName. * The field `updatedAt` will change with each update. * The field `createdAt` cannot be changed. * If the user specifies an invalid id in the path or no certificate can be found we will return an error (see below). * Changing the default certificate is done by setting the new certificate `"default": true`. * A single certificate must be set as the default. You cannot set the current default certificate to `"default": false`. [Jump to examples ↓](#updatecertificate-examples) ### `PUT /certificates/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The ID of the certificate you want to perform operations against. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject) **Responses** **`200`** Returns the created certificate and new read only fields. Response body: **Content-Type:** `application/json` [Certificate object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#certificateobject) **Examples** *Example request* ```http PUT /v1/certificates/9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "certificate": "" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "id": "9d9d28f2-4f63-44fc-82d2-ba101d2c4fd9", "vendor": "Apple", "baseName": "pass.com.urbanairship.sample.alpha", "teamIdentifier": "PGJV57GD94", "nfcSupport": true, "enabled": true, "createdAt": "2022-04-05T03:22:47.000Z", "updatedAt": "2024-02-06T19:01:37.415Z", "validityStart": "2022-12-02T22:39:50.000Z", "validityEnd": "2024-01-01T22:39:49.000Z", "expired": true } ``` --- # Event Passes > Operations specific to event ticket passes. ## List event passes {#getpassesbyevent} List passes for an event. [Jump to examples ↓](#getpassesbyevent-examples) ### `GET /events/project/{projectId}/{eventId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. | | `eventId` | `integer` | Required | The event you want to get passes for. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular event. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with a event - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the event. Each object in the array represents a pass. **`404`** The event ID does not exist. **Examples** *Example request* ```http GET /v1/events/project/12345/1234/passes HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 616, "templateId": 1000057, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/616/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da0b8", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 610, "templateId": 1000083, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/610/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e216", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- # Events > Create and store event information for use with event tickets. When creating event tickets, you can reference an event, automatically populating event information on the pass. By storing and referencing event information independently of your passes, you can update a single event, automatically pushing an update to all passes referencing it. ## Add event to pass group {#addeventtopassgroup} Add an event to a pass group. You can target the group to make changes to multiple events. [Jump to examples ↓](#addeventtopassgroup-examples) ### `POST /events/project/{projectId}/{eventId}/passGroups` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. Use the Airship-generated project ID or project's external ID. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want modify groups for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`passGroups`** `array[string]` An array of pass groups that you want to create and add an event to. If an event already belongs to a pass group (string) in the array, it is ignored. **Responses** **`200`** The event was successfully added to one or more `passGroups`. Response body: **Content-Type:** `application/json` - **`eventId`** `integer` The event added to the pass group. - **`passGroups`** `array[string]` An array of pass groups that the event was added to. **`400`** Missing or malformed input. **`404`** The event or project cannot be found. **Examples** *Example request* ```http POST /v1/events/project/12345/1234/passGroups HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "passGroups": [ "EVENT_100_LUNCH", "EVENT_100_DINNER" ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventId": 1234, "passGroups": [ "EVENT_100_LUNCH", "EVENT_100_DINNER" ] } ``` *Example request with external ID* ```http POST /v1/events/project/id/67890/id/4567/passGroups HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "passGroups": [ "EVENT_100_LUNCH", "EVENT_100_DINNER" ] } ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventExternalId" : "4567", "passGroups" :["EVENT_100_LUNCH","EVENT_100_DINNER"] } ``` --- ## Create event {#createevent} Create an event. If your request uses an `eventExternalId` already associated with an existing event, the call is treated as a `PUT`, and updates the existing event. As with the `PUT` method, any fields not contained in the request are unchanged. [Jump to examples ↓](#createevent-examples) ### `POST /events/project/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project you want to create the event in. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Event request]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventrequest) **Responses** **`201`** The event was successfully created. A successful request returns the `eventId` and `eventExternalId` (if applicable) values, so you can reference the event in later operations. Response body: **Content-Type:** `application/json` [Event response]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventresponse) **Examples** *Example request* ```http POST /v1/events/project/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "value": "LA Dodgers at SF Giants" }, "venueTitle": { "value": "AT&T Park" }, "venueAddress": { "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } } } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "passGroups": ["giants_2019-09-25"], "eventId": 1234, "projectId": 12345, "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } } } ``` --- ## Create event with external ID {#createeventexternalid} Create an event with external IDs. If your request uses an `eventExternalId` already associated with an existing event, the call is treated as a `PUT`, and updates the existing event. As with the `PUT` method, any fields not contained in the request are unchanged. [Jump to examples ↓](#createeventexternalid-examples) ### `POST /events/project/id/{projectExternalId}/id/{eventExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The external ID of the project you want to create the event in or of the project the existing event belongs to. | | `eventExternalId` | `string` | Required | A custom identifier for an event. This is the event you want to create, get, modify, or delete. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Event request]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventrequest) **Responses** **`201`** The event was successfully created. A successful request returns the `eventId` and `eventExternalId` (if applicable) values, so you can reference the event in later operations. Response body: **Content-Type:** `application/json` [Event response]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventresponse) **Examples** *Example request* ```http POST /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } } } ``` --- ## Delete event {#deleteevent} Deletes the specified event. [Jump to examples ↓](#deleteevent-examples) ### `DELETE /events/project/{projectId}/{eventId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The event was deleted. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. **Examples** *Example request* ```http DELETE /v1/events/project/12345/1 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/events/project/id/67890/id/4567 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 {} ``` --- ## Get event {#getevent} Returns information about a single event. [Jump to examples ↓](#getevent-examples) ### `GET /events/project/{projectId}/{eventId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns the `eventId` and `eventExternalId` (if applicable) values, so you can reference the event in later operations. Response body: **Content-Type:** `application/json` [Event response]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventresponse) **Examples** *Example request* ```http GET /v1/events/project/12345/1234 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventId": 1234, "projectId": 12345, "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T09:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T10:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T12:00:00" } } } ``` *Example request with external ID* ```http GET /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventId": 1234, "eventExternalId": "event123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T09:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T10:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T12:00:00" } } } ``` --- ## List pass groups for event {#listpassgroupsforevent} Returns a list of pass groups associated with an event. [Jump to examples ↓](#listpassgroupsforevent-examples) ### `GET /events/project/{projectId}/{eventId}/passGroups` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. Use the Airship-generated project ID or project's external ID. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want modify groups for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of pass groups that an event is associated with. Response body: **Content-Type:** `application/json` - **`eventId`** `integer` The Airship-generated ID of the event in the request. - **`passGroups`** `array[string]` An array of the pass groups that the event belongs to. **`400`** Missing fields or malformed input. **`404`** The event or project cannot be found. **Examples** *Example request* ```http GET /v1/events/project/12345/1234/passGroups HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/events/project/id/project123ExtId/id/event123ExtId/passGroups HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventTicketId": 1234, "passGroups": [ "EVENT_100_LUNCH", "FLIGHT_100_DINNER" ] } ``` --- ## Remove event from pass group {#removeeventfrompassgroup} Removes an event from a pass group. The group specified in the path will no longer appear in the event's `passGroups` array, nor will you be able to make changes to the event by targeting the pass group. [Jump to examples ↓](#removeeventfrompassgroup-examples) ### `DELETE /events/project/{projectId}/{eventId}/passGroups/{passGroup}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. Use either the Airship-generated project ID or the external ID. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want modify groups for. Use either the Airship-generated event ID or the external ID for the event. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | | `passGroup` | `string` | Required | The pass group you want to remove the event from. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The event was removed from the pass group. **`400`** The project, event, or pass group was not found. **Examples** *Example request* ```http DELETE /v1/events/project/12345/1234/passGroups/EVENT_100_LUNCH HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/events/project/id/project123ExtId/id/event123ExtId/passGroups/EVENT_100_LUNCH HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 {} ``` --- ## Update event {#updateevent} Update any of the keys provided in the `fields` object of an [Event Request](/docs/developer/rest-api/wallet/schemas/event-tickets/#eventrequest). Provide only the fields you want to update; any fields that you omit from the payload remain unchanged. [Jump to examples ↓](#updateevent-examples) ### `PUT /events/project/{projectId}/{eventId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `eventId` | `integer` | Required | The event you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{eventId}` as `id/{eventExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`fields`** `object` **Responses** **`200`** A successful request returns the complete, updated event object and the `eventId` and `eventExternalId` (if applicable) values, so you can reference the updated event in later operations. Response body: **Content-Type:** `application/json` [Event response]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventresponse) **Examples** *Example request* ```http PUT /v1/events/project/12345/1234 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "doorsOpen": { "value": "2019-09-25T09:35:00" }, "startTime": { "value": "2019-09-25T10:00:00" }, "endTime": { "value": "2019-09-25T12:00:00" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventId": 1234, "projectId": 12345, "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "value": "LA Dodgers at SF Giants" }, "venueTitle": { "value": "AT&T Park" }, "venueAddress": { "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T09:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T10:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T12:00:00" } } } ``` *Example request with external ID* ```http PUT /v1/events/project/id/project123ExtId/id/event123ExtId HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "doorsOpen": { "value": "2019-09-25T09:35:00" }, "startTime": { "value": "2019-09-25T10:00:00" }, "endTime": { "value": "2019-09-25T12:00:00" } } } ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "eventId": 1234, "eventExternalId": "event123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "value": "LA Dodgers at SF Giants" }, "venueTitle": { "value": "AT&T Park" }, "venueAddress": { "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T09:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T10:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T12:00:00" } } } ``` --- ## Update events in a pass group {#updateeventsinpassgroup} Update all of the events in a pass group. [Jump to examples ↓](#updateeventsinpassgroup-examples) ### `PUT /events/project/{projectId}/passGroups/{passGroup}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wevt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the event belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `passGroup` | `integer` | Required | The pass group that you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Update fields common to multiple events. **Content-Type:** `application/json` - **`fields`** `object` Provide only the keys that you want to update from `fields` object of an [Event Request](/docs/developer/rest-api/wallet/schemas/event-tickets/#eventrequest); any fields that you omit from the payload remain unchanged. **Responses** **`200`** The update was successful. Response body: **Content-Type:** `application/json` - **`events`** `array[object]` Lists the events updated as a part of this pass group. - **`groupName`** `string` The pass group that you updated in this request. **`400`** The request was malformed. **`404`** The project ID or pass group was not found. **Examples** *Example request* ```http PUT /v1/events/project/myFavProject/passGroups/giants_2019-09-25 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "venueTitle": { "value": "Oracle Park" } } } ``` *Example request with external ID* ```http PUT /v1/events/project/id/myFavProject/passGroups/giants_2019-09-25 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "venueTitle": { "value": "Oracle Park" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "groupName" : "giants_2019-09-25", "events" : [ { "eventTicketId" : 123 }, { "eventTicketId" : 456 } ] } ``` --- # Flight Passes > Operations specific to boarding passes. ## List flight passes {#getpassesbyflight} List passes for Flight. [Jump to examples ↓](#getpassesbyflight-examples) ### `GET /flights/project/{projectId}/{flightId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. | | `flightId` | `integer` | Required | The flight you want to get passes for. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular flight. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with a flight - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the flight. Each object in the array represents a pass. **`404`** The flight ID does not exist. **Examples** *Example request* ```http GET /v1/flights/project/12345/1234/passes HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 600, "templateId": 100005, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/600/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da023", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:19:02.000Z", "platform": "android" }, { "id": 601, "templateId": 100008, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/601/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e212", "createdAt": "2023-05-05T17:55:23.000Z", "updatedAt": "2023-05-06T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T19:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- # Flights > Create and store flight information for use with boarding passes. When creating boarding passes, you can reference a flight, automatically populating flight information on the pass. By storing and referencing flight information independently of your passes, you can update a single flight, automatically pushing an update to all passes referencing that flight. ## Add flight to a pass group {#addflighttopassgroup} Add a flight to a pass group. You can target the group to make changes to multiple flights. [Jump to examples ↓](#addflighttopassgroup-examples) ### `POST /flights/project/{projectId}/{flightId}/passGroups` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want modify groups for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`passGroups`** `array[string]` An array of pass groups that you want to create and add a flight to. If a pass group (string) in the array already exists, it is ignored. **Responses** **`200`** At least one pass group in the `passGroups` array was created. Response body: **Content-Type:** `application/json` - **`flightId`** `integer` The Airship flight ID for the flight added to the pass group. - **`passGroups`** `array[string]` An array of pass groups that the flight was added to. **`400`** Missing or malformed input. **`404`** The flight or project cannot be found. **Examples** *Example request* ```http POST /v1/flights/project/12345/1234/passGroups HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId" : 1234, "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` *Example request with external ID* ```http POST /v1/flights/project/id/67890/id/4567/passGroups HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightExternalId" : "4567", "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` --- ## Create flight {#createflight} Create flights. See also [Create flight with external ID](#operation-flights-project-id-projectexternalid-id-flightexternalid-post). [Jump to examples ↓](#createflight-examples) ### `POST /flights/project/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project you want to create the flight in. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Flight object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightrequest) **Responses** **`200`** A successful request returns the `flightId` and `flightExternalId` (if applicable) values, so you can reference the flight in later operations. Response body: **Content-Type:** `application/json` [Flight response]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightresponse) **Examples** *Example request* ```http POST /v1/flights/project/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups": ["sfo-pdx-20250319"], "fields": { "flightNumber": { "value": "815" }, "airlineCode": { "value": "OA" }, "airlineName": { "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "value": "2025-03-19T20:30:00" }, "departureTime": { "value": "2025-03-19T20:59" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalTime": { "value": "2025-03-20T09:30:00" }, "flightStatus": { "value": "scheduled" }, "semantics" :{ "airlineCode": "OA", "flightNumber": 2214, "originalBoardingDate": "2025-03-19T20:30:00-08:00", "originalDepartureDate": "2025-03-20T02:00:00-05:00", "originalArrivalDate": "2025-03-20T02:00:00-05:00", "currentBoardingDate": "2025-03-19T20:59:00-08:00", "currentDepartureDate": "2025-03-19T20:59:00-08:00", "currentArrivalDate": "2025-03-20T09:30:00-08:00", "departureAirportCode": "SFO", "departureCityName": "San Francisco", "departureLocationTimeZone": "America/Los_Angeles", "departureAirportLocation": { "latitude": 37.6191, "longitude": 122.3816 }, "departureGate": "25", "departureTerminal": "2", "destinationAirportCode": "PDX", "destinationCityName": "Portland", "destinationLocationTimeZone": "America/Los_Angeles", "destinationAirportLocation": { "latitude": 40.6446, "longitude": 73.7797 }, "destinationGate": "6", "destinationTerminal": "1" } } } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "flightId": 1234, "projectId": 12345, "createdAt": "2025-03-05T09:12:32Z", "updatedAt": "2025-03-05T09:12:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "label": "Boarding Time", "value": "2025-03-19T20:30:00" }, "departureTime": { "label": "Departure Time", "value": "2025-03-19T20:59:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2025-03-20T09:30:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" }, "semantics" :{ "airlineCode": "OA", "flightNumber": 2214, "originalBoardingDate": "2025-03-19T20:30:00-08:00", "originalDepartureDate": "2025-03-20T02:00:00-05:00", "originalArrivalDate": "2025-03-20T02:00:00-05:00", "currentBoardingDate": "2025-03-19T20:59:00-08:00", "currentDepartureDate": "2025-03-19T20:59:00-08:00", "currentArrivalDate": "2025-03-20T09:30:00-08:00", "departureAirportCode": "SFO", "departureCityName": "San Francisco", "departureLocationTimeZone": "America/Los_Angeles", "departureAirportLocation": { "latitude": 37.6191, "longitude": 122.3816 }, "departureGate": "25", "departureTerminal": "2", "destinationAirportCode": "PDX", "destinationCityName": "Portland", "destinationLocationTimeZone": "America/Los_Angeles", "destinationAirportLocation": { "latitude": 40.6446, "longitude": 73.7797 }, "destinationGate": "6", "destinationTerminal": "1" } } } ``` --- ## Create flight with external ID {#createflightexternalid} Create flights with external ID. See also [Create flight](#operation-flights-project-projectid-post). [Jump to examples ↓](#createflightexternalid-examples) ### `POST /flights/project/id/{projectExternalId}/id/{flightExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The project you want to create the flight in. | | `flightExternalId` | `string` | Required | The external identifier you want to give to the flight. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Flight object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightrequest) **Responses** **`200`** A successful request returns the `flightId` and `flightExternalId` (if applicable) values, so you can reference the flight in later operations. Response body: **Content-Type:** `application/json` [Flight response]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightresponse) **Examples** *Example request* ```http POST /v1/flights/project/id/project123ExtId/id/flight123ExtId HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "value": "815" }, "airlineCode": { "value": "OA" }, "airlineName": { "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "value": "2018-07-30T08:35:00" }, "departureTime": { "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalTime": { "value": "2018-07-30T11:00:00" }, "flightStatus": { "value": "scheduled" } } } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "flightId": 1234, "flightExternalId": "flight123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "label": "Boarding Time", "value": "2018-07-30T08:35:00" }, "departureTime": { "label": "Departure Time", "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2018-07-30T11:00:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" } } } ``` --- ## Delete flight {#deleteflight} Deletes the specified flight. [Jump to examples ↓](#deleteflight-examples) ### `DELETE /flights/project/{projectId}/{flightId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The flight was deleted. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. **Examples** *Example request* ```http DELETE /v1/flights/project/12345/1234 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/flights/project/id/project123ExtId/id/flight123ExtId HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK ``` --- ## Get flight {#getflight} Returns information for a single flight. [Jump to examples ↓](#getflight-examples) ### `GET /flights/project/{projectId}/{flightId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns the `flightId` and `flightExternalId` (if applicable) values, so you can reference the flight in later operations. Response body: **Content-Type:** `application/json` [Flight response]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightresponse) **Examples** *Example request* ```http GET /v1/flights/project/12345/1234 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId": 1234, "projectId": 12345, "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "21" }, "boardingTime": { "label": "Boarding Time", "value": "2025-03-19T20:30:00" }, "departureTime": { "label": "Departure Time", "value": "2025-03-20T02:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2025-03-20T02:00:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" }, "semantics" :{ "airlineCode": "OA", "flightNumber": 2214, "originalBoardingDate": "2025-03-19T20:30:00-08:00", "originalDepartureDate": "2025-03-20T02:00:00-05:00", "originalArrivalDate": "2025-03-20T02:00:00-05:00", "currentBoardingDate": "2025-03-19T20:59:00-08:00", "currentDepartureDate": "2025-03-19T20:59:00-08:00", "currentArrivalDate": "2025-03-20T09:30:00-08:00", "departureAirportCode": "SFO", "departureCityName": "San Francisco", "departureLocationTimeZone": "America/Los_Angeles", "departureAirportLocation": { "latitude": 37.6191, "longitude": 122.3816 }, "departureGate": "25", "departureTerminal": "2", "destinationAirportCode": "PDX", "destinationCityName": "Portland", "destinationLocationTimeZone": "America/Los_Angeles", "destinationAirportLocation": { "latitude": 40.6446, "longitude": 73.7797 }, "destinationGate": "6", "destinationTerminal": "1" } } } ``` *Example request with external ID* ```http GET /v1/flights/project/id/project123ExtId/id/flight123ExtId HTTP/1.1 Authorization: Basic ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId": 1234, "flightExternalId": "flight123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "21" }, "boardingTime": { "label": "Boarding Time", "value": "2018-07-30T09:20:00" }, "departureTime": { "label": "Departure Time", "value": "2018-07-30T09:45:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2018-07-30T11:45:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" } } } ``` --- ## List pass groups for a flight {#listpassgroupsforflight} Returns a list of pass groups associated with a flight. [Jump to examples ↓](#listpassgroupsforflight-examples) ### `GET /flights/project/{projectId}/{flightId}/passGroups` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want modify groups for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of pass groups that a flight is associated with. Response body: **Content-Type:** `application/json` - **`flightId`** `integer` The ID of the flight in the request. - **`passGroups`** `array[string]` An array of the pass groups that the flight belongs to. **`400`** Missing fields or malformed input. **`404`** The flight or project cannot be found. **Examples** *Example request* ```http GET /v1/flights/project/12345/1234/passGroups HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId" : 1234, "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` *Example request with external ID* ```http GET /v1/flights/project/id/67890/id/4567/passGroups HTTP/1.1 Authorization: Basic ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightExternalId" : 4567, "passGroups" :["sfo-pdx-20180730", "pdx-yvr-20180730"] } ``` --- ## Remove flight from pass group {#removeflightfrompassgroup} Removes a flight from a pass group. The group specified in the path will no longer appear in the flight's `passGroups` array, nor will you be able to make changes to the flight by targeting the pass group. [Jump to examples ↓](#removeflightfrompassgroup-examples) ### `DELETE /flights/project/{projectId}/{flightId}/passGroups/{passGroup}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. Use either the Airship-generated project ID or the external ID. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want modify groups for. Use either the Airship-generated flight ID or the external ID for the flight. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | | `passGroup` | `string` | Required | The pass group you want to remove the flight from. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The flight was successfully removed from the pass group. **`400`** The project, flight, or pass group was not found. **Examples** *Example request* ```http DELETE /v1/flights/project/12345/1234/passGroups/sfo-pdx-20180730 HTTP/1.1 Authorization: Basic ``` *Example request with external ID* ```http DELETE /v1/flights/project/id/67890/id/4567/passGroups/sfo-pdx-20180730 HTTP/1.1 Authorization: Basic ``` --- ## Update flight {#updateflight} Update any of the keys provided in the `fields` object of a [Flight Request](/docs/developer/rest-api/wallet/schemas/flights-and-boarding-passes/#flightrequest). Provide only the fields you want to update; any fields that you omit from the payload remain unchanged. [Jump to examples ↓](#updateflight-examples) ### `PUT /flights/project/{projectId}/{flightId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `flightId` | `integer` | Required | The flight you want to get, update, or delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{flightId}` as `id/{flightExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Flight object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightrequest) **Responses** **`200`** A successful request returns the complete, updated flight object and the `flightId` and `flightExternalId` (if applicable) values, so you can reference the updated flight in later operations. Response body: **Content-Type:** `application/json` [Flight response]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightresponse) **Examples** *Example request* ```http PUT /v1/flights/project/12345/1234 HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups": ["sfo-pdx-20180730"], "fields": { "departureGate": { "value": "21" }, "boardingTime": { "value": "2018-07-30T09:20:00" }, "departureTime": { "value": "2018-07-30T09:45:00" }, "arrivalTime": { "value": "2018-07-30T11:45:00" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId": 1234, "projectId": 12345, "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:15:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "21" }, "boardingTime": { "label": "Boarding Time", "value": "2018-07-30T09:20:00" }, "departureTime": { "label": "Departure Time", "value": "2018-07-30T09:45:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2018-07-30T11:45:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" } } } ``` *Example request with external ID* ```http PUT /v1/flights/project/id/project123ExtId/id/flight123ExtId HTTP/1.1 Authorization: Basic Content-Type: application/json { "passGroups": ["sfo-pdx-20180730"], "fields": { "departureGate": { "value": "21" }, "boardingTime": { "value": "2018-07-30T09:20:00" }, "departureTime": { "value": "2018-07-30T09:45:00" }, "arrivalTime": { "value": "2018-07-30T11:45:00" } } } ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "flightId": 1234, "flightExternalId": "flight123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:15:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "21" }, "boardingTime": { "label": "Boarding Time", "value": "2018-07-30T09:20:00" }, "departureTime": { "label": "Departure Time", "value": "2018-07-30T09:45:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2018-07-30T11:45:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" } } } ``` --- ## Update flights in a pass group {#updateflightsinpassgroup} Update all of the flights in a pass group. See also [Update flights with external ID in a pass group](#operation-flights-project-id-projectexternalid-id-passgroups-passgroup-put). [Jump to examples ↓](#updateflightsinpassgroup-examples) ### `PUT /flights/project/{projectId}/passGroups/{passGroup}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The project that the flight belongs to. Use either the Airship-generated project ID or the external ID. | | `passGroup` | `integer` | Required | The pass group that you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Update fields common to a group of flights. **Content-Type:** `application/json` - **`fields`** `object` Provide only the keys that you want to update from `fields` object of an [flight Request](/docs/developer/rest-api/wallet/schemas/flights-and-boarding-passes/#flightrequest); any fields that you omit from the payload remain unchanged. **Responses** **`200`** The update was successful. Response body: **Content-Type:** `application/json` - **`flights`** `array[object]` Lists the flights updated as a part of this pass group. - **`groupName`** `string` The pass group that you updated in this request. **`400`** The request was malformed. **`404`** The project ID or pass group was not found. **Examples** *Example request* ```http PUT /v1/flights/project/12345/passGroups/sfo-pdx-20180730 HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "departureTime": { "value": "2018-08-30T10:00:00" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "groupName" : "sfo-pdx-20180730", "flights" : [ { "flightId" : 123 }, { "flightId" : 456 } ] } ``` --- ## Update flights with external ID in a pass group {#updateflightsinpassgroupexternalid} Update fields common to a group of flights. Provide only the keys that you want to update from `fields` object of an [flight Request](/docs/developer/rest-api/wallet/schemas/flights-and-boarding-passes/#flightrequest); any fields that you omit from the payload remain unchanged. See also [Update flights in a pass group](#operation-flights-project-projectid-passgroups-passgroup-put). [Jump to examples ↓](#updateflightsinpassgroupexternalid-examples) ### `PUT /flights/project/id/{projectExternalId}/id/passGroups/{passGroup}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wfli **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectExternalId` | `string` | Required | The project that the flight belongs to. | | `passGroup` | `string` | Required | The pass group that you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the field(s) you want to update for all of the flights in the group. **Content-Type:** `application/json` - **`fields`** `object` Provide only the keys that you want to update from `fields` object of an [flight Request](/docs/developer/rest-api/wallet/schemas/flights-and-boarding-passes/#flightrequest); any fields that you omit from the payload remain unchanged. **Responses** **`200`** The update was successful. Response body: **Content-Type:** `application/json` - **`flights`** `array[object]` Lists the flights updated as a part of this pass group. - **`groupName`** `string` The pass group that you updated in this request. **`400`** The request was malformed. **`404`** The project ID or pass group was not found. **Examples** *Example request* ```http PUT /v1/flights/project/id/project123ExtId/id/passGroups/sfo-pdx-20180730 HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields": { "departureTime": { "value": "2018-08-30T10:00:00" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "groupName" : "sfo-pdx-20180730", "flights" : [ { "flightId" : 123 }, { "flightId" : 456 } ] } ``` --- # Google Passes Only > Operations that apply only to Google Wallet passes. ## Add message to Google Pass {#addmessagetogooglepass} Add messages to Google Wallet passes. [Jump to examples ↓](#addmessagetogooglepass-examples) ### `POST /pass/{passId}/message` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `Id` of the Google Pass you want to apply messages to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** A valid request contains one message for the pass. **Content-Type:** `application/json` - **`body`** `string` The message body text. - **`endTime`** `object` The date-time when the notification will end. If you do not set an end time, the notification displays indefinitely. **OBJECT PROPERTIES** - **`date`** `string` Format: `date-time` - **`header`** `string` The header text for the message - **`messageType`** `string` Use `expirationNotification` to warn users of expiring messages, and `text` for all other notifications. `expirationNotification` is based on the `start` value in the `displayInterval`; the maximum display interval is 30 days from now. If the expiration start date is more than 30 days from now, the message will not appear until the 30-day mark. Possible values: `expirationNotification`, `text` - **`startTime`** `object` The date-time when the notification will begin appearing to users. **OBJECT PROPERTIES** - **`date`** `string` Format: `date-time` **Responses** **`200`** A successful response returns details for the added message. Response body: **Content-Type:** `application/json` - **`body`** `string` The body of the message. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`header`** `string` The header for the message. - **`messageType`** `string` The type of message. Possible values: `expirationNotification`, `text` - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true **`404`** The pass ID does not exist. **Examples** *Example request* ```http POST /v1/pass/mypass/message HTTP/1.1 Authorization: Basic Content-Type: application/json { "body":"wallet object expires soon", "header":"expires", "startTime": "2018-06-03T21:10:00.000Z", "endTime": "2018-06-05T21:50:00.000Z", "messageType":"expirationNotification" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "header": "expires", "body": "wallet object expires soon", "startTime": "2018-06-03T21:10:00.000Z", "endTime": "2018-06-05T21:50:00.000Z", "createdAt": "2021-08-18T23:25:05.075Z", "updatedAt": "2021-08-18T23:25:05.075Z", "messageType": "expirationNotification" } ``` --- ## Add message to Google Pass with external ID {#addmessagetogooglepassexternalid} Add messages to Google Wallet passes. [Jump to examples ↓](#addmessagetogooglepassexternalid-examples) ### `POST /pass/template/{templateId}/id/{passExternalId}/message` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the Google Pass that you want to apply messages to. | | `passExternalId` | `string` | Required | The external ID of the Google Pass you want to apply messages to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** A valid request contains one message for the pass. **Content-Type:** `application/json` - **`body`** `string` The message body text. - **`endTime`** `object` The date-time when the notification will end. If you do not set an end time, the notification displays indefinitely. **OBJECT PROPERTIES** - **`date`** `string` Format: `date-time` - **`header`** `string` The header text for the message - **`messageType`** `string` Use `expirationNotification` to warn users of expiring messages, and `text` for all other notifications. `expirationNotification` is based on the `start` value in the `displayInterval`; the maximum display interval is 30 days from now. If the expiration start date is more than 30 days from now, the message will not appear until the 30-day mark. Possible values: `expirationNotification`, `text` - **`startTime`** `object` The date-time when the notification will begin appearing to users. **OBJECT PROPERTIES** - **`date`** `string` Format: `date-time` **Responses** **`200`** A successful response returns details for the added message. Response body: **Content-Type:** `application/json` - **`body`** `string` The body of the message. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`header`** `string` The header for the message. - **`messageType`** `string` The type of message. Possible values: `expirationNotification`, `text` - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http POST /v1/pass/template/123/id/mypass/message HTTP/1.1 Authorization: Basic Content-Type: application/json { "body":"wallet object expires soon", "header":"expires", "startTime": "2018-06-03T21:10:00.000Z", "endTime": "2018-06-05T21:50:00.000Z", "messageType":"expirationNotification" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "header": "expires", "body": "wallet object expires soon", "startTime": "2018-06-03T21:10:00.000Z", "endTime": "2018-06-05T21:50:00.000Z", "createdAt": "2021-08-18T23:25:05.075Z", "updatedAt": "2021-08-18T23:25:05.075Z", "messageType": "expirationNotification" } ``` --- ## Auto link passes to existing Google Pass {#autolinkedpassesforpassid} Link additional passes to a user's Google Wallet pass, identified by its Airship pass ID. Linked passes appear automatically in the user's wallet. See [Google Wallet Auto Linked Passes](/docs/guides/wallet/user-guide/create-links/auto-linked-passes/). [Jump to examples ↓](#autolinkedpassesforpassid-examples) ### `POST /pass/{passId}/linkedPasses` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want to link additional passes to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Auto Linked Passes **Content-Type:** `application/json` [Linked Passes]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#linkedpasses) **Responses** **`200`** The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`400`** The request was malformed. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/pass/12345/linkedPasses HTTP/1.1 Authorization: Basic Content-Type: application/json { "passURIs" : ["v1/pass/adaptive/fqsl9UyW3O7", "v1/pass/adaptive/Xzq5O7lf262"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Auto link passes to Google Pass with external ID {#autolinkedpassesforpassexternalid} Link additional passes to a user's Google Wallet pass, identified by template ID and external pass ID. Linked passes appear automatically in the user's wallet. See [Google Wallet Auto Linked Passes](/docs/guides/wallet/user-guide/create-links/auto-linked-passes/). [Jump to examples ↓](#autolinkedpassesforpassexternalid-examples) ### `POST /pass/template/{templateId}/id/{passExternalId}/linkedPasses` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The `id` of the pass template. | | `passExternalId` | `string` | Required | The external ID of the pass you want to link additional passes to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Auto Linked Passes **Content-Type:** `application/json` [Linked Passes]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#linkedpasses) **Responses** **`200`** The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`400`** The request was malformed. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/pass/template/12345/id/test_custom_pass_id/linkedPasses HTTP/1.1 Authorization: Basic Content-Type: application/json { "passURIs" : ["v1/pass/adaptive/gqsl9UyW3O8", "v1/pass/adaptive/Yzq5O7lf263"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12346 } ``` --- ## Auto link passes to Google Pass with external template ID {#autolinkedpassesforpassandtemplateexternalid} Link additional passes to a user's Google Wallet pass, identified by external template ID and external pass ID. Linked passes appear automatically in the user's wallet. See [Google Wallet Auto Linked Passes](/docs/guides/wallet/user-guide/create-links/auto-linked-passes/). [Jump to examples ↓](#autolinkedpassesforpassandtemplateexternalid-examples) ### `POST /pass/template/id/{templateExternalId}/id/{passExternalId}/linkedPasses` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateExternalId` | `string` | Required | The external ID of the pass template. | | `passExternalId` | `string` | Required | The external ID of the pass you want to link additional passes to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Auto Linked Passes **Content-Type:** `application/json` [Linked Passes]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#linkedpasses) **Responses** **`200`** The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`400`** The request was malformed. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/pass/template/id/custom_test_template_id/id/custom_test_pass_id/linkedPasses HTTP/1.1 Authorization: Basic Content-Type: application/json { "passURIs" : ["v1/pass/adaptive/gqsl9UyW3O8", "v1/pass/adaptive/Zzq5O7lf263"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12347 } ``` --- ## Get messages for Google Pass {#getmessagesforgooglepass} Returns an array of messages associated with the specified pass. [Jump to examples ↓](#getmessagesforgooglepass-examples) ### `GET /pass/{passId}/message` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `Id` of the Google Pass you want to get messages from. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns details for the added messages. Response body: **Content-Type:** `application/json` - **`messages`** `array[object]` An array of messages associated with the pass. **`404`** The pass ID does not exist. **Examples** *Example request* ```http GET /v1/pass/mypass/message HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "messages": [ { "header": "expires", "body": "wallet object expiring soon", "createdAt": "2019-03-05T23:11:29.000Z", "updatedAt": "2019-03-05T23:11:29.000Z", "messageType": "expirationNotification" } ] } ``` --- ## Get messages for Google Pass with external ID {#getmessagesforgooglepassexternalid} Returns an array of messages associated with the specified pass. [Jump to examples ↓](#getmessagesforgooglepassexternalid-examples) ### `GET /pass/template/{templateId}/id/{passExternalId}/message` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the Google Pass that you want to get messages from. | | `passExternalId` | `string` | Required | The external ID of the Google Pass you want to get messages for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns details for the added messages. Response body: **Content-Type:** `application/json` - **`messages`** `array[object]` An array of messages associated with the pass. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http GET /v1/pass/template/123/id/mypass/message HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "messages": [ { "header": "expires", "body": "wallet object expiring soon", "createdAt": "2019-03-05T23:11:29.000Z", "updatedAt": "2019-03-05T23:11:29.000Z", "messageType": "expirationNotification" } ] } ``` --- ## Save to Google Wallet {#createpassfromtemplate} Creates a pass from the specified template and returns code for a "Save to Google Wallet" button. Clicking or tapping this button installs the pass. [Jump to examples ↓](#createpassfromtemplate-examples) ### `POST /pass/{templateId}/saveToWallet` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The `id` of the template you want to generate a "Save to Google Wallet" button for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** The request is much like creating a pass with the addition of functions to perform upon success or failure. **Content-Type:** `application/json` - **`externalId`** `string` An external identifier for the pass that you might want to use to update the pass in the future. - **`fields`** `object` - **`onFail`** `string` A javascript function that you want to be called when a user - **`onSuccess`** `string` A javascript function that you want to be called when a user successfully adds the pass to Google Wallet. - **`tag`** `string` A single tag you want to add to the pass. **Responses** **`200`** A response includes the javascript for a "Save to Google Wallet" button. **Examples** *Example request* ```http POST /v1/pass/123/saveToWallet HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "fields": { "Points": { "value": "600" } }, "tag": "abc", "externalId": "UserName", "onSuccess": "mySuccessFunc()", "onFail": "myFailureFunc()" } ``` *Response* ```html ``` --- # OAuth > ## Request token {#requestoauthtoken} Request an OAuth access token with Basic Auth or an assertion. When making a request with an assertion, do not provide the Basic Auth header. See also [OAuth 2.0](/docs/guides/wallet/api-security/#oauth-20) in the *Wallet API Security* documentation. Use `oauth2.asnapius.com` for Airship's North American cloud site and `oauth2.asnapieu.com` for Airship's European cloud site when requesting an OAuth token. [Jump to examples ↓](#requestoauthtoken-examples) ### `POST /token` **Security:** - [basicOauth]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-basicOauth) **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Content-Type` | `string` | Required | The request must have a `Content-Type` of `application/x-www-form-urlencoded`. | **Request body** **Content-Type:** `application/x-www-form-urlencoded` **One of:** - **`grant_type`** `string` **REQUIRED** Possible values: `client_credentials` - **`ipaddr`** `string` A list of CIDR representations of valid IP addresses to which the issued token is restricted. IP addresses can be sent as a URL-encoded, space-delimited list (example: `ipaddr=24.20.40.0%2F24%202001%3A4860%3A4860%3A%3A8888%2F32`) or as a list as expected in a query parameter form (example: `ipaddr=24.20.40.0/24&ipaddr=2001:4860:4860::8888/32`). - **`scope`** `string` <[OAuth Scope]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#oauthscope)> A list of scopes to which the issued token will be entitled. Scopes can be sent as URL-encoded, space-delimited list (example: `scope=wpas%20wtmp`) or as a list as expected in a query parameter form (example: `scope=wpas&scope=wtmp`). The value of the scope parameter is a list of space-delimited, case-sensitive strings. If multiple scopes are specified, their order does not matter. Each string adds an additional access range to the requested scope. For more information about scope values, see [OAuth token scopes](/docs/developer/rest-api/wallet/api-auth-reference/#oauth-token-scopes) in the *Wallet API Authorization Reference* documentation. * `wadl`: Adaptive Links * `wevt`: Events * `wfli`: Flights * `wnot`: Notifications * `wpas`: Passes * `wprj`: Projects * `wsch`: Schedules * `wseg`: Segments * `wrpt`: Statistics * `wtmp`: Templates Possible values: `wadl`, `wevt`, `wfli`, `wnot`, `wpas`, `wprj`, `wsch`, `wseg`, `wrpt`, `wtmp` - **`sub`** `object` <[Subject]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#subject)> **REQUIRED** A space-delimited set of identifiers for which subjects a token is allowed. An `app` subject is required. Example: `app:`. A space-delimited set of identifiers for which subjects a token is allowed. Example: `app:` * `app`: May operate on the given app - **`assertion`** `object` <[Assertion JWT]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#assertionjwt)> **REQUIRED** An encoded JWT that contains the required headers and claims and is signed with the client credentials' private key. A JSON Web Token (JWT) used for authorization in [OAuth token requests](/docs/developer/rest-api/wallet/operations/oauth/#requestoauthtoken). The JWT must be signed with the private key corresponding to the `client_id` in the `kid` header using the ES384 algorithm. - **`grant_type`** `string` **REQUIRED** Possible values: `client_credentials` **Responses** **`200`** Returned on token request success. Response headers: | Name | Type | Description | |------|------|-------------| | `Cache-Control` | `string` | Possible values: `no-store` | | `Content-Type` | `string` | Possible values: `application/json` | | `Pragma` | `string` | Possible values: `no-cache` | Response body: **Content-Type:** `application/json` - **`access_token`** `string` The issued token that can be used for all endpoints as allowed by set scopes. - **`expires_in`** `integer` The number of seconds from the time the token is generated until it expires. - **`scope`** `string` <[OAuth Scope]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#oauthscope)> A space-delimited list of scopes of the issued token. There may be undocumented scopes in this list. The value of the scope parameter is a list of space-delimited, case-sensitive strings. If multiple scopes are specified, their order does not matter. Each string adds an additional access range to the requested scope. For more information about scope values, see [OAuth token scopes](/docs/developer/rest-api/wallet/api-auth-reference/#oauth-token-scopes) in the *Wallet API Authorization Reference* documentation. * `wadl`: Adaptive Links * `wevt`: Events * `wfli`: Flights * `wnot`: Notifications * `wpas`: Passes * `wprj`: Projects * `wsch`: Schedules * `wseg`: Segments * `wrpt`: Statistics * `wtmp`: Templates Possible values: `wadl`, `wevt`, `wfli`, `wnot`, `wpas`, `wprj`, `wsch`, `wseg`, `wrpt`, `wtmp` - **`token_type`** `string` The type of issued token. Possible values: `Bearer` **`400`** Token not generated. Response body: **Content-Type:** `application/json` - **`error`** `string` **REQUIRED** Error code. Possible values: `invalid_scope`, `invalid_request`, `invalid_grant`, `unauthorized_client`, `unsupported_grant_type`, `invalid_client` - **`error_description`** `string` A plain-text description of the error. **`401`** Unauthorized. Response headers: | Name | Type | Description | |------|------|-------------| | `WWW-Authenticate` | `string` | The HTTP authentication methods that can be used to request an access token. | Response body: **Content-Type:** `application/json` - **`error`** `string` **REQUIRED** Error code. Possible values: `invalid_client` - **`error_description`** `string` A plain-text description of the error. **`406`** Not acceptable. Response body: **Content-Type:** `application/json` - **`error`** `string` **REQUIRED** Error code. Possible values: `invalid_request` - **`error_description`** `string` A plain-text description of the error. **Examples** *Example request* ```http POST /token HTTP/1.1 Host: oauth2.asnapius.com Authorization: Basic Accept: application/json Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&scope=wtmp%20wprj&sub=app: ``` ```http POST /token HTTP/1.1 Host: oauth2.asnapius.com Authorization: Basic Accept: application/json Content-Type: application/x-www-form-urlencoded grant_type=assertion&assertion= ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "access_token": "...", "expires_in": 3600, "scope": "wtmp wprj", "token_type": "Bearer" } ``` --- ## Verify public key {#getkeyverification} Retrieve the public key of a key ID. Use `oauth2.asnapius.com` for Airship's North American cloud site and `oauth2.asnapieu.com` for Airship's European cloud site when verifying an OAuth public key. ### `GET /verify/public_key/{kid}` **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `kid` | `string` | Required | The private key ID used to sign the token. Example: `8817e96` | **Responses** **`200`** Returned on success with the public key for the given `kid`. Response headers: | Name | Type | Description | |------|------|-------------| | `Cache-Control` | `string` | The response contains a `Cache-Control` header which must be respected. | Response body: **Content-Type:** `application/x-pem-file` Type: `string` **`404`** The requested resource doesn't exist. Response body: **Content-Type:** `application/json` Type: `object` --- # Passes > A pass is essentially a populated, personalized template intended for a single platform — Apple Wallet or Google Wallet. Passes manifest as links; you distribute the pass link to users, and they tap or click the link to install the pass. If you want to distribute passes to both Apple and Google users, you may want to use Adaptive links instead. While a pass is intended for a single platform, so you have to distribute separate pass links to independent Apple and Google audiences, an adaptive link is a single pass link that detects the user's platform and installs the correct pass. Adaptive links can save you the trouble of maintaining separate passes and distribution lists for your customers. ## Add locations to pass {#addlocationstopass} Add the locations to the specified pass. [Jump to examples ↓](#addlocationstopass-examples) ### `POST /pass/{passId}/locations` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The pass you want to add locations to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Set locations for the pass. **Content-Type:** `application/json` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> **Responses** **`200`** Returns `passLocationId` for each location on the pass. Use this value to identify locations in other location-based operations. Response body: **Content-Type:** `application/json` Type: `array` **Examples** *Example request* ```http POST /v1/pass/123/locations HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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" }, { "...": "..." } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json [ { "passLocationId": 65, "value": { "region": "CA", "regionCode": "94404", "relevantText": "Hello loc0!", "streetAddress1": "add11", "streetAddress2": "add22", "longitude": "-122.3742", "latitude": "37.618", "city": "FC" } }, { "passLocationId": 66, "value": { "region": "CA", "regionCode": "94404", "relevantText": "Hello loc1!", "streetAddress1": "add12", "streetAddress2": "add23", "longitude": "-123.374", "latitude": "38.618", "city": "FC" } } ] ``` --- ## Create pass {#createpass} Create a pass from the specified template. You can optionally assign an external ID to the pass or generate the pass from templates with external IDs. See the appropriate endpoints to assign or use external IDs. [Jump to examples ↓](#createpass-examples) ### `POST /pass/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `id` of the template you want to create your pass from. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a pass; pass composition varies by vendor. **Content-Type:** `application/json` **One of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - [Google Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayrequest) 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. **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **Examples** *Example request* ```http POST /v1/pass/123 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.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" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "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": { "gate": { "changeMessage": "Your gate has changed to %@", "fieldType": "HEADER", "value": "A56", "label": "my value", "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:\/\/example.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 } ] } ``` --- ## Delete locations from pass {#deletelocationfrompass} Delete the specified location from the specified pass. [Jump to examples ↓](#deletelocationfrompass-examples) ### `DELETE /pass/{passId}/location/{passLocationId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want to remove locations from. | | `passLocationId` | `string` | Required | The location you want to remove from the pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Success. Response body: **Content-Type:** `application/json` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> **Examples** *Example request* ```http DELETE /v1/pass/123/location/456 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Delete pass {#deletepass} Delete the specified pass. [Jump to examples ↓](#deletepass-examples) ### `DELETE /pass/{id}` {{< note >}} The Delete function does not remove passes from the end-user's device, but removes from our system. Deleted passes no longer count towards billing. See [Editing Wallet Pass Expiration](/docs/guides/wallet/user-guide/updating-passes/edit-expiration/) to deactivate the pass on the end-user's device. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `id` of the pass you want to delete. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The pass was successfully deleted. Response body: **Content-Type:** `application/json` - **`passId`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`status`** `string` Indicates that the pass was deleted. Possible values: `deleted` **Examples** *Example request* ```http DELETE /v1/pass/123 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "status": "deleted", "passId": "123" } ``` --- ## Generates a pass {#createdynamiclink} Generates a pass with an optional expiration date and serial number. You can also assign an external ID to passes generated from this endpoint. [Jump to examples ↓](#createdynamiclink-examples) ### `POST /pass/{id}/dynamic` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to create the pass from. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `expiry` | `string` | | The expiration date for the pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a pass; pass composition varies by vendor. **Content-Type:** `application/json` **One of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - [Google Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayrequest) 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. **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **Examples** *Example request* ```http POST /v1/pass/12345/dynamic&expiry=2017-05-18 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.com\/assets\/favicon.png" } }, "beacons":[ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 2, "minor": 346 } ], "publicURL": { "type": "single" }, "externalId": "abcd" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "url": "https://wallet-api.urbanairship.com/v1/pass/dynamic/44e128a5-ac7a-4c9a-be4c-224b6bf81b20" } ``` --- ## Get pass {#getpass} Get the specified pass. This endpoint will return the external ID of a pass, but only if there is one associated with it. [Jump to examples ↓](#getpass-examples) ### `GET /pass/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `id` of the pass you want to look up. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a complete pass, including headers and fields on the pass and metadata about the pass. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **Examples** *Example request* ```http GET /v1/pass/1234 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "tags":[ ], "headers": { "barcodeAltText": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "123456789", "label": "", "required": false, "hideEmpty": false }, "logo_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(24,86,148)", "label": "", "required": false, "hideEmpty": false }, "icon_image": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "label": "", "required": false, "hideEmpty": false }, "barcode_value": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "123456789", "label": "", "required": false, "hideEmpty": false }, "logo_text": { "formatType": "String", "changeMessage": "%@", "fieldType": "topLevel", "value": "Logo", "label": "", "required": false, "hideEmpty": false }, "barcode_encoding": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "iso-8859-1", "label": "", "required": false, "hideEmpty": false }, "suppress_strip_shine": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "true", "label": "", "required": false, "hideEmpty": false }, "barcode_label": { "formatType": "String", "changeMessage": "%@", "fieldType": "barcode", "value": "Member ID", "label": "", "required": false, "hideEmpty": false }, "barcode_type": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "PKBarcodeFormatPDF417", "label": "", "required": false, "hideEmpty": false }, "foreground_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(255,255,255)", "label": "", "required": false, "hideEmpty": false }, "background_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(0,147,201)", "label": "", "required": false, "hideEmpty": false }, "relevantDate": { "changeMessage": "The new date is %@", "label": "relevantDate", "hideEmpty": false, "formatType": "String", "value": "2015-12-31T23:00:00-08:00", "fieldType": "topLevel", "required": false } }, "id": "1234", "templateId": "12345", "updatedAt": "2013-06-19T01:06:23.000Z", "createdAt": "2013-06-19T01:06:17.000Z", "serialNumber": "14f94898-2f5e-46f5-925c-7e29fa9a0508", "installedAt": "2013-06-19T01:06:17.000Z", "url": "https:\/\/wallet-api.urbanairship.com\/v1\/pass\/1249\/download", "status": "installed", "fields": { "Merchant Website": { "formatType": "URL", "changeMessage": "Get event details at %@", "order": 2, "fieldType": "back", "value": "http:\/\/www.example.com", "label": "Merchant Website", "required": false, "hideEmpty": false }, "More Details": { "formatType": "String", "changeMessage": "%@", "order": 1, "fieldType": "back", "value": "More details about how to use this event ticket. Additional terms and support information.", "label": "More Details", "required": false, "hideEmpty": false }, "Seat": { "textAlignment": "textAlignmentNatural", "changeMessage": "You are now seated at %@", "numberStyle": "PKNumberStyleDecimal", "label": "Seat", "hideEmpty": false, "formatType": "Number", "value": 1.0, "fieldType": "auxiliary", "required": false, "order": 3 }, "Row": { "textAlignment": "textAlignmentNatural", "changeMessage": "You are now seated in row %@", "numberStyle": "PKNumberStyleDecimal", "label": "Row", "hideEmpty": false, "formatType": "Number", "value": 1.0, "fieldType": "auxiliary", "required": false, "order": 2 }, "Section": { "textAlignment": "textAlignmentLeft", "changeMessage": "You are now seated in section %@", "label": "Section", "hideEmpty": false, "formatType": "String", "value": "1", "fieldType": "auxiliary", "required": true, "order": 1 } } } ``` --- ## List passes {#getpasses} List passes that your user account is responsible for. You can provide an optional template parameter, returning passes created from a particular template. [Jump to examples ↓](#getpasses-examples) ### `GET /pass` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | | The `id` of the template you want to look up. | | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes created from a particular template. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with the template. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the template. Each object in the array represents a pass. **Examples** *Example request* ```http GET /v1/pass?templateId=12345&status=uninstalled HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 61, "templateId": 12345, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/61/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da012", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "uninstalled", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 60, "templateId": 12345, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/60/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e201", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## List passes for a tag {#listpassesfortag} List the passes associated with the specified tag. [Jump to examples ↓](#listpassesfortag-examples) ### `GET /tag/{tag}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | A tag `id` or `name`. The request returns a paginated list of passes associated with the specified tag. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want tags returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns a paginated array of passes. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of results. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `object` Meta information about passes. **OBJECT PROPERTIES** - **`createdAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`id`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`installedAt`** `string` The date and time when pass was first installed on the device. Format: `date-time` - **`platform`** `string` Wallet platform. Possible values: `iOS`, `Android` - **`serialNumber`** `string` The serial number of the pass. - **`status`** `string` Recent on-device pass status. Possible values: `installed`, `uninstalled`, `not_been_installed` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`uninstalledAt`** `string` The date and time when pass was uninstalled on the device. This value is only set if pass status is uninstalled. Format: `date-time` - **`updatedAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`url`** `string` Pass download URL. **Examples** *Example request* ```http GET /v1/tag/tag-name/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 61, "templateId": 1000057, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/61/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da012", "createdAt": "2023-04-19T06:15:01.000Z", "updatedAt": "2023-04-19T06:15:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 51, "templateId": 1000081, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/51/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e223", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "ios" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## List passes for an Adaptive Link {#getpassesbyadaptivelink} List passes for an adaptive link. [Jump to examples ↓](#getpassesbyadaptivelink-examples) ### `GET /links/adaptive/{adaptiveLinkId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `adaptiveLinkId` | `string` | Required | The adaptive link ID used for pass creation. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular adaptive link. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of passes associated with an adaptive link. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the adaptive link. Each object in the array represents a pass. **`404`** The adaptive link ID does not exist. **Examples** *Example request* ```http GET /v1/links/adaptive/rthBWAWDaAA/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 616, "templateId": 1000057, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/616/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da0b8", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 610, "templateId": 1000083, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/610/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e216", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## Update pass {#updatepass} Update the specified pass. You need only include the fields that you want to update for the pass. Optionally, you can also Schedule an update if you want to update a pass at a later date and time. See the `/schedules` endpoints for information about scheduling updates. Do not use the response payload from the `GET /v1/pass/(id)` endpoint to update a pass, as it contains information from both the pass itself and the template used to create the pass, and you cannot update a template from the `/v1/pass endpoint`. You should only populate the JSON Parameters below. Within the headers and fields objects, these are the changeMessage, value, and label fields. You can update `locations` on a pass, but doing so will replace all locations on the pass. See the Location Object for more about the fields you should provide in the locations array. [Jump to examples ↓](#updatepass-examples) ### `PUT /pass/{id}` {{< note >}} You can also update a pass to include an expiration date using the `expirationDate` key. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `id` of the pass you want to update. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields from a pass object that you want to update. Locations operate as a `set` operation. The array of pass locations is replaced by the locations you provide in an update; if you want to add to the locations on the pass, you must provide both the current locations and the locations you want to add in the payload. **Content-Type:** `application/json` - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> **APPLE ONLY** An array of beacon objects you want to update for this pass. - **`fields`** `object` The fields you want to update on the pass. - **`headers`** `object` The headers you want to update for this pass. - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> The locations you want to update for this pass. Location updates replace existing locations on the pass. When updating locations, you should provide all the locations that you want to remain on the pass. - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> An object that defines structured metadata for an Apple Wallet pass using key-value pairs. These semantic tags provide contextual information to the system to enhance the user experience. 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`. - **`universalLinks`** `object` <[Universal links]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#universallinksobject)> An object containing key-value pairs of universal links where each key-value pair defines a universal link. A list of key-value pairs that represents partner URLs. **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **Examples** *Update expiration date example request* ```http PUT /v1/pass/123 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "headers": { "expirationDate": { "value": "2024-08-20T9:41-08:00" } }, "fields": { "Seat": { "value": "26E" } } } ``` *Render pass void example request* ```http PUT /v1/pass/123 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "headers": { "expirationDate": { "label": "voided" } } } ``` *Example request* ```http PUT /v1/pass/123 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.com\/assets\/favicon.png" } }, "beacons": [ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 1, "minor": 777 }, { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship" } ], "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" } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- # Passes with external IDs > These endpoints support passes incorporating external IDs for the template, the pass, or both. A pass is essentially a populated, personalized template intended for a single platform — Apple Wallet or Google Wallet. Passes manifest as links; you distribute the pass link to users, and they tap or click the link to install the pass. If you want to distribute passes to both Apple and Google users, you may want to use adaptive links instead. While a pass is intended for a single platform, so you have to distribute separate pass links to independent Apple and Google audiences, an adaptive link is a single pass link that detects the user's platform and installs the correct pass. Adaptive links can save you the trouble of maintaining separate passes and distribution lists for your customers. ## Add locations to pass {#addlocationstopassfromtemplateexternalid} Add the locations to the specified pass. [Jump to examples ↓](#addlocationstopassfromtemplateexternalid-examples) ### `POST /pass/template/{templateId}/id/{passExternalId}/locations` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the pass that you want to add locations to. | | `passExternalId` | `string` | Required | The external ID of the pass you want to add locations to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Set locations for the pass. **Content-Type:** `application/json` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> **Responses** **`200`** Returns `passLocationId` for each location on the pass. Use this value to identify locations in other location-based operations. Response body: **Content-Type:** `application/json` Type: `array` **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http POST /v1/pass/template/123/id/mypass/locations HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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" }, { "...": "..." } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json [ { "passLocationId": 65, "value": { "region": "CA", "regionCode": "94404", "relevantText": "Hello loc0!", "streetAddress1": "add11", "streetAddress2": "add22", "longitude": "-122.3742", "latitude": "37.618", "city": "FC" } }, { "passLocationId": 66, "value": { "region": "CA", "regionCode": "94404", "relevantText": "Hello loc1!", "streetAddress1": "add12", "streetAddress2": "add23", "longitude": "-123.374", "latitude": "38.618", "city": "FC" } } ] ``` --- ## Create pass {#createpassexternalid} Create a pass from the specified template and give it a custom identifier. You can use this custom ID to perform operations against the pass like you would use the standard, unique `id` given by Wallet. [Jump to examples ↓](#createpassexternalid-examples) ### `POST /pass/template/{templateId}/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template the pass will be or was created from. | | `passExternalId` | `string` | Required | The external ID you want to assign to the new pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a pass; pass composition varies by vendor. **Content-Type:** `application/json` **One of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - [Google Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayrequest) 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. **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http POST /v1/pass/template/123/id/mypass HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.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" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "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": { "gate": { "changeMessage": "Your gate has changed to %@", "fieldType": "HEADER", "value": "A56", "label": "my value", "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:\/\/example.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 } ] } ``` --- ## Create pass from a template {#createpassfromtemplateexternalid} Create a pass from the specified template and give it a custom identifier. You can use this custom ID to perform operations against the pass in addition to the standard, unique `id` given by Wallet. [Jump to examples ↓](#createpassfromtemplateexternalid-examples) ### `POST /pass/id/{templateExternalId}/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateExternalId` | `string` | Required | The external ID of the template you want to create your pass from. | | `passExternalId` | `string` | Required | The external ID that you want to give your pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a pass; pass composition varies by vendor. **Content-Type:** `application/json` **One of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - [Google Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayrequest) 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. **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **Examples** *Example request* ```http POST /v1/pass/id/myExternalTemplate/id/myNewPass HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.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" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "externalId": "myNewPass", "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": { "gate": { "changeMessage": "Your gate has changed to %@", "fieldType": "HEADER", "value": "A56", "label": "my value", "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:\/\/example.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 } ] } ``` --- ## Delete locations from pass {#deletelocationfrompassfromtemplateexternalid} Delete the specified location from a pass using an external ID. [Jump to examples ↓](#deletelocationfrompassfromtemplateexternalid-examples) ### `DELETE /pass/template/{templateId}/id/{passExternalId}/location/{locationId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the pass that you want to delete locations from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to delete locations from. | | `locationId` | `string` | Required | The location you want to remove from the pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Success. Response body: **Content-Type:** `application/json` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> **`404`** The pass ID, template ID, or location does not exist. **Examples** *Example request* ```http DELETE /v1/pass/template/123/id/mypass/location/456 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Delete pass {#deletepassfromtemplateexternalid} Delete a pass with an external ID. [Jump to examples ↓](#deletepassfromtemplateexternalid-examples) ### `DELETE /pass/template/{templateId}/id/{passExternalId}` {{< note >}} The Delete function does not remove passes from the end-user's device, but removes from our system. Deleted passes no longer count towards billing. See [Editing Wallet Pass Expiration](/docs/guides/wallet/user-guide/updating-passes/edit-expiration/) to deactivate the pass on the end-user's device. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template the pass will be or was created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to delete. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The pass was successfully deleted. Response body: **Content-Type:** `application/json` - **`passId`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`status`** `string` Indicates that the pass was deleted. Possible values: `deleted` **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http DELETE /v1/pass/template/123/id/mypass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "status": "deleted", "passId": "33" } ``` --- ## Get pass {#getpassfromtemplateexternalid} Get a pass with an external ID. [Jump to examples ↓](#getpassfromtemplateexternalid-examples) ### `GET /pass/template/{templateId}/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template the pass will be or was created from. | | `passExternalId` | `string` | Required | The custom ID assigned to the pass. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A response is a populated pass and meta information about the pass. The pass response includes fields that are read only, some of which are populated directly from the template specified in the request. Response body: **Content-Type:** `application/json` **One of:** - [Apple Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletresponse) A pass response includes both identifiers and the content of all fields on a pass. - [Google Wallet pass response]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayresponse) 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. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http GET /v1/pass/template/123/id/mypass HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "tags":[ ], "headers": { "barcodeAltText": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "123456789", "label": "", "required": false, "hideEmpty": false }, "logo_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(24,86,148)", "label": "", "required": false, "hideEmpty": false }, "icon_image": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "label": "", "required": false, "hideEmpty": false }, "barcode_value": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "123456789", "label": "", "required": false, "hideEmpty": false }, "logo_text": { "formatType": "String", "changeMessage": "%@", "fieldType": "topLevel", "value": "Logo", "label": "", "required": false, "hideEmpty": false }, "barcode_encoding": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "iso-8859-1", "label": "", "required": false, "hideEmpty": false }, "suppress_strip_shine": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "true", "label": "", "required": false, "hideEmpty": false }, "barcode_label": { "formatType": "String", "changeMessage": "%@", "fieldType": "barcode", "value": "Member ID", "label": "", "required": false, "hideEmpty": false }, "barcode_type": { "formatType": "String", "changeMessage": null, "fieldType": "barcode", "value": "PKBarcodeFormatPDF417", "label": "", "required": false, "hideEmpty": false }, "foreground_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(255,255,255)", "label": "", "required": false, "hideEmpty": false }, "background_color": { "formatType": "String", "changeMessage": null, "fieldType": "topLevel", "value": "rgb(0,147,201)", "label": "", "required": false, "hideEmpty": false }, "relevantDate": { "changeMessage": "The new date is %@", "label": "relevantDate", "hideEmpty": false, "formatType": "String", "value": "2015-12-31T23:00:00-08:00", "fieldType": "topLevel", "required": false } }, "id": "1234", "templateId": "12345", "externalId": "mypass", "updatedAt": "2013-06-19T01:06:23.000Z", "createdAt": "2013-06-19T01:06:17.000Z", "serialNumber": "14f94898-2f5e-46f5-925c-7e29fa9a0508", "installedAt": "2013-06-19T01:06:17.000Z", "url": "https:\/\/wallet-api.urbanairship.com\/v1\/pass\/1249\/download", "status": "installed", "fields": { "Merchant Website": { "formatType": "URL", "changeMessage": "Get event details at %@", "order": 2, "fieldType": "back", "value": "http:\/\/www.example.com", "label": "Merchant Website", "required": false, "hideEmpty": false }, "More Details": { "formatType": "String", "changeMessage": "%@", "order": 1, "fieldType": "back", "value": "More details about how to use this event ticket. Additional terms and support information.", "label": "More Details", "required": false, "hideEmpty": false }, "Seat": { "textAlignment": "textAlignmentNatural", "changeMessage": "You are now seated at %@", "numberStyle": "PKNumberStyleDecimal", "label": "Seat", "hideEmpty": false, "formatType": "Number", "value": 1.0, "fieldType": "auxiliary", "required": false, "order": 3 }, "Row": { "textAlignment": "textAlignmentNatural", "changeMessage": "You are now seated in row %@", "numberStyle": "PKNumberStyleDecimal", "label": "Row", "hideEmpty": false, "formatType": "Number", "value": 1.0, "fieldType": "auxiliary", "required": false, "order": 2 }, "Section": { "textAlignment": "textAlignmentLeft", "changeMessage": "You are now seated in section %@", "label": "Section", "hideEmpty": false, "formatType": "String", "value": "1", "fieldType": "auxiliary", "required": true, "order": 1 } } } ``` --- ## Update pass {#updatepassexternalid} Update the specified pass. You need only include the fields that you want to update for the pass. Do not use the response payload from a `GET` to update a pass, as it contains information from both the pass itself and the template used to create the pass, and you cannot update a template from the `/v1/pass endpoint`. You should only populate the JSON Parameters below. Within the headers and fields objects, these are the changeMessage, value, and label fields. You can update `locations` on a pass, but doing so will replace all locations on the pass. See the Location Object for more about the fields you should provide in the locations array. [Jump to examples ↓](#updatepassexternalid-examples) ### `PUT /pass/id/{externalId}` {{< note >}} You can also update a pass to include an expiration date using the `expirationDate` key. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `externalId` | `string` | Required | The external ID of the pass you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields you want to update. Locations operate as a `set` operation. The array of pass locations is replaced by the locations you provide in an update; if you want to add to the locations on the pass, you must provide both the current locations and the locations you want to add in the payload. **Content-Type:** `application/json` **All of:** - **`templates`** `array[integer]` Include an array of templates IDs, required to identify individual passes if there are multiple passes for the external ID in the path. If there are multiple passes for the external ID and you do not specify the templates corresponding to the passes you want to update, your request will return a 400. - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> **APPLE ONLY** An array of beacon objects you want to update for this pass. - **`fields`** `object` The fields you want to update on the pass. - **`headers`** `object` The headers you want to update for this pass. - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> The locations you want to update for this pass. Location updates replace existing locations on the pass. When updating locations, you should provide all the locations that you want to remain on the pass. - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> An object that defines structured metadata for an Apple Wallet pass using key-value pairs. These semantic tags provide contextual information to the system to enhance the user experience. 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`. - **`universalLinks`** `object` <[Universal links]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#universallinksobject)> An object containing key-value pairs of universal links where each key-value pair defines a universal link. A list of key-value pairs that represents partner URLs. **Responses** **`200`** A response returns one or more [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) values, each referencing the pass update operation. If your request does not include the `templates` array, the response includes a single `ticketId`. If your request includes the `templates` array, the response is an array of of ticket objects, corresponding to the order of templates in the array. Response body: **Content-Type:** `application/json` **One of:** - **`ticketId`** `integer` A ticket you can use to reference this operation for status, troubleshooting, or logging purposes. - `array` **Examples** *Example request* ```http PUT /v1/pass/id/myExternalPassId HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "templates": ["5350", "5359"], "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:\/\/example.com\/assets\/favicon.png" } }, "beacons": [ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 1, "minor": 777 }, { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship" } ], "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" } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- ## Update pass for a template {#updatepassfromtemplateexternalid} Update a pass with an external ID. [Jump to examples ↓](#updatepassfromtemplateexternalid-examples) ### `PUT /pass/template/{templateId}/id/{passExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template the pass will be or was created from. | | `passExternalId` | `string` | Required | The external ID of the pass you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Update a pass. You can provide any of the fields or headers used when creating a pass to update the pass. **Content-Type:** `application/json` **One of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - [Google Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassandroidpayrequest) 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. **Responses** **`200`** The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`400`** The request was malformed. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http PUT /v1/pass/template/123/id/mypass HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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:\/\/example.com\/assets\/favicon.png" } }, "beacons": [ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 1, "minor": 777 }, { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship" } ], "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" } ] } ``` *Response* ```http HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "ticketId": 1234 } ``` --- # Projects > A project contains your templates and a collection of passes and determines the types of templates and passes you can create. You must specify a project for all operations in Wallet. ## Add NFC merchant {#addnfcmerchant} Provide your merchant information and keys to support NFC interaction with passes and SmartTap for Android. When your project is NFC enabled, your audience can tap their device to a terminal to use their passes — consume point balances, use coupons, scan boarding passes, etc. See [Enable NFC Support for your Passes](/docs/guides/wallet/user-guide/design-template/nfc/) for complete setup instructions. [Jump to examples ↓](#addnfcmerchant-examples) ### `POST /project/{projectId}/nfcMerchants` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wprj **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to add or lookup NFC merchant information for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`keyVersion`** `integer` The SSH protocol version for your key. Can be set to `1`. Min: 1, Max: 4 - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. - **`publicKeyPem`** `string` The public key for NFC communications. If you do not provide a public key, Airship will generate a public/private key pair for you. - **`smartTapCollectorId`** `string` Defines your Google Wallet merchant. - **`terminalProvider`** `string` The NFC terminal provider that can read NFC messages, like `Verifone`. - **`vendor`** `string` **REQUIRED** Set the vendor you want to provide information for, where `ANY` represents both Apple and Google vendors. If you omit this property, Airship assumes `ANY`. Possible values: `GOOGLE`, `APPLE`, `ANY` **Responses** **`200`** A response includes your project ID and NFC merchant information. Note the `merchantId` — this is how you reference your merchant information if you need to modify or delete it. Response body: **Content-Type:** `application/json` **All of:** - **`keyVersion`** `integer` The SSH protocol version for your key. Can be set to `1`. Min: 1, Max: 4 - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. - **`publicKeyPem`** `string` The public key for NFC communications. If you do not provide a public key, Airship will generate a public/private key pair for you. - **`smartTapCollectorId`** `string` Defines your Google Wallet merchant. - **`terminalProvider`** `string` The NFC terminal provider that can read NFC messages, like `Verifone`. - **`vendor`** `string` **REQUIRED** Set the vendor you want to provide information for, where `ANY` represents both Apple and Google vendors. If you omit this property, Airship assumes `ANY`. Possible values: `GOOGLE`, `APPLE`, `ANY` - **`keySource`** `string` Set by Airship, either `GENERATED` if Airship generates your public/private keys or `IMPORTED` if you provide your own `publicKey`. Possible values: `GENERATED`, `IMPORTED` Read only: true - **`merchantId`** `string` The Airship-generated UUID for your NFC merchant information. Read only: true - **`privateKeyPem`** `string` Returned in a POST if your public/private keys are generated by Airship. This is the key your terminal uses to decode messages from Airship (that use the `publicKeyPem`). - **`projectId`** `integer` The ID of the Wallet project. - **`smartTapIssuerId`** `string` **GOOGLE ONLY** Represents your platform and may contain more than one `collectorId`. - **`updatedAt`** `string` The date and time when your NFC merchant information was last updated. Format: `date-time` **Examples** *Example request — Apple and Google vendors* ```http POST /v1/project/13137/nfcMerchants HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "vendor": "ANY", "merchantName": "testMerchant5", "merchantEmail": "test@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADIAvHog/qg3dG4d0X0knYEIdvHnTXlk9SIm39iv1PM1w=", "keyVersion": 1, "keySource": "IMPORTED" } ``` *Example request with external ID — Apple and Google vendors* ```http POST /v1/project/id/13137/nfcMerchants HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "vendor": "ANY", "merchantName": "testMerchant5", "merchantEmail": "test@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADIAvHog/qg3dG4d0X0knYEIdvHnTXlk9SIm39iv1PM1w=", "keyVersion": 1, "keySource": "IMPORTED" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "merchantId": "a535fc29-9e90-434a-b8e9-4a5851292ccc", "projectId": 13137, "vendor": "APPLE", "merchantName": "testMerchant5", "merchantEmail": "test@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADIAvHog/qg3dG4d0X0knYEIdvHnTXlk9SIm39iv1PM1w=", "keyVersion": 1, "keySource": "IMPORTED", "updatedAt": "2020-09-16T18:17:49.349Z" } ``` --- ## Create project {#createproject} Create an empty project. Your project is based around the type of passes you want to create and the type of barcode you will include on your passes. The response includes an `id` and `contextId`. Use these values to access your project via the API and dashboard, respectively. See also [Create project with external ID](#operation-project-id-externalid-post). [Jump to examples ↓](#createproject-examples) ### `POST /project` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a project. Your project is based around a pass type and your certificates. **Content-Type:** `application/json; charset=utf-8` [Project request]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectrequest) **Responses** **`200`** Create a project. Your project is based around a pass type and your certificates. Response body: **Content-Type:** `application/json; charset=utf-8` [Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload) **Examples** *Example request* ```http POST /v1/project HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "name": "Aztec Barcode", "projectType": "loyalty", "description": "Aztec Barcode", "settings": { "barcode_alt_text": "123json=456789", "barcode_label": "Member ID", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_type": "pdf417" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-07-01T19:57:36.190Z", "id": "12345", "contextId":"nEkzVdIcTP2eNqP1--xQ_A", "templates": [ ], "description": "Aztec Barcode", "createdAt": "2013-07-01T19:57:36.190Z", "settings": { "barcode_alt_text": "123json=456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type": "pdf417" }, "name": "Aztec Barcode", "projectType": "loyalty" } ``` --- ## Create project with external ID {#createprojectexternalid} Create a project with a custom identifier. Your project is based around the type of passes you want to create and the type of barcode you will include on your passes. It is a container for your templates and passes. The response includes an `id` and `contextId`. Use these values to access your project via the API and dashboard, respectively. See also [Create project](/docs/developer/rest-api/wallet/operations/projects/#createproject). [Jump to examples ↓](#createprojectexternalid-examples) ### `POST /project/id/{externalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `externalId` | `string` | Required | The custom/external ID you want to use for your project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Create a project. Your project is based around a pass type and your certificates. **Content-Type:** `application/json; charset=utf-8` [Project request]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectrequest) **Responses** **`200`** Create a project. Your project is based around a pass type and your certificates. Response body: **Content-Type:** `application/json; charset=utf-8` [Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload) **Examples** *Example request* ```http POST /v1/project/id/67890 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "name": "Aztec Barcode", "projectType": "loyalty", "description": "Aztec Barcode", "settings": { "barcode_alt_text": "123json=456789", "barcode_label": "Member ID", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_type": "pdf417" } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-07-01T19:57:36.190Z", "externalId": "67890", "id": "12345", "contextId":"nEkzVdIcTP2eNqP1--xQ_A", "templates": [ ], "description": "Aztec Barcode", "createdAt": "2013-07-01T19:57:36.190Z", "settings": { "barcode_alt_text": "123json=456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type": "pdf417" }, "name": "Aztec Barcode", "projectType": "loyalty" } ``` --- ## Delete NFC merchant {#deletenfcmerchant} Delete an NFC merchant. Deleting your NFC information prevents users from redeeming passes using NFC for the associated terminal, unless you have already added new/different NFC information to your project. [Jump to examples ↓](#deletenfcmerchant-examples) ### `DELETE /project/{projectId}/nfcMerchants/{merchantId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wprj **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to add or lookup NFC merchant information for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `merchantId` | `string` | Required | The merchant ID you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The merchant information was deleted. Response body: **Content-Type:** `application/json` - **`merchantId`** `string` The merchant ID that you deleted. Format: `uuid` - **`updatedAt`** `string` The date and time when the merchant information was deleted. Format: `date-time` **Examples** *Example request* ```http DELETE /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "merchantId": "23c0da58-3b79-4d44-9191-b69faef7b24c", "updatedAt": "2020-09-16T18:20:45.000Z" } ``` --- ## Duplicate project {#duplicateproject} Duplicate a project by ID. The duplicate project will be named "Copy of [ProjectName]" and have a new `id` but will otherwise use the same settings and templates as the original project. The response payload returns the same information as a [Get Project](#operation-project-projectid-get) call, with new identifiers for the new project. [Jump to examples ↓](#duplicateproject-examples) ### `POST /project/duplicate/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project you want to duplicate. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A project and a list of templates within the project. Response body: **Content-Type:** `application/json` [Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload) **Examples** *Example request* ```http POST /v1/project/duplicate/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "createdAt":"2018-06-04T23:26:43Z", "settings": { "barcode_alt_text": "123json=456789", "barcode_label": "Member ID", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_type": "pdf417" }, "templates":[ ], "name":"Copy of LoyaltyCard", "projectType":"loyalty", "description":"Aztec Barcode", "contextId":"nEkzVdIcTP2eNqP1--xQ_A", "id":12346, "updatedAt":"2018-06-04T23:26:43Z" } ``` *Example request with external ID* ```http POST /v1/project/duplicate/id/67890 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "createdAt": "2024-01-25T03:23:19Z", "settings": {}, "appleCertificateId": "f5cbc01b-3c56-460c-8dca-ba1c327691e6", "templates": [ { "projectType": "generic", "description": "a new template", "vendorId": 1, "type": "Generic", "createdAt": "2024-01-25T03:23:20Z", "deleted": "False", "vendor": "Apple", "name": "Copy of asykes-template-1234123", "disabled": "False", "id": "179192", "expiryDuration": 730, "projectName": "Copy of my test project", "projectId": 7425, "updatedAt": "2024-01-25T03:23:20Z" } ], "name": "Copy of my test project", "projectType": "generic", "description": "test project", "externalId": "Copy_of_67890", "contextId": "4KN8Q9s-Qm68Ks9JF2A33g", "id": 7425, "updatedAt": "2024-01-25T03:23:19Z" } ``` --- ## Get NFC merchant {#getnfcmerchant} Get an individual NFC merchant. [Jump to examples ↓](#getnfcmerchant-examples) ### `GET /project/{projectId}/nfcMerchants/{merchantId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wprj **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to add or lookup NFC merchant information for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `merchantId` | `string` | Required | The merchant ID you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A response includes your project ID and NFC merchant information. Note the `merchantId` — this is how you reference your merchant information if you need to modify or delete it. Response body: **Content-Type:** `application/json` **All of:** - **`keyVersion`** `integer` The SSH protocol version for your key. Can be set to `1`. Min: 1, Max: 4 - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. - **`publicKeyPem`** `string` The public key for NFC communications. If you do not provide a public key, Airship will generate a public/private key pair for you. - **`smartTapCollectorId`** `string` Defines your Google Wallet merchant. - **`terminalProvider`** `string` The NFC terminal provider that can read NFC messages, like `Verifone`. - **`vendor`** `string` **REQUIRED** Set the vendor you want to provide information for, where `ANY` represents both Apple and Google vendors. If you omit this property, Airship assumes `ANY`. Possible values: `GOOGLE`, `APPLE`, `ANY` - **`keySource`** `string` Set by Airship, either `GENERATED` if Airship generates your public/private keys or `IMPORTED` if you provide your own `publicKey`. Possible values: `GENERATED`, `IMPORTED` Read only: true - **`merchantId`** `string` The Airship-generated UUID for your NFC merchant information. Read only: true - **`privateKeyPem`** `string` Returned in a POST if your public/private keys are generated by Airship. This is the key your terminal uses to decode messages from Airship (that use the `publicKeyPem`). - **`projectId`** `integer` The ID of the Wallet project. - **`smartTapIssuerId`** `string` **GOOGLE ONLY** Represents your platform and may contain more than one `collectorId`. - **`updatedAt`** `string` The date and time when your NFC merchant information was last updated. Format: `date-time` **Examples** *Example request* ```http GET /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "merchantId": "23c0da58-3b79-4d44-9191-b69faef7b24c", "projectId": 13137, "vendor": "GOOGLE", "merchantName": "testMerchant5", "merchantEmail": "test@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo/TGGLW++AE05GAYnXgCo/ebGLN1\nbdjF01imojOydLhts4VsYDCU69pRXuWKn6wRgmymSAB4+b72n3/uB8lW0w==\n", "keyVersion": 1, "keySource": "GENERATED", "updatedAt": "2020-09-16T18:20:45.000Z" } ``` --- ## Get project {#getproject} Get the project with the specified `id`. The response includes information about the project (set when [Creating a Project](/docs/developer/rest-api/wallet/operations/projects/#createproject)) and an array of templates associated with the project. The templates array contains all the information found in the `templateHeader` object. [Jump to examples ↓](#getproject-examples) ### `GET /project/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A project and a list of templates within the project. Response body: **Content-Type:** `application/json` [Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload) **Examples** *Example request* ```http GET /v1/project/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-06-27T20:55:06.000Z", "id": "12345", "contextId":"myvWLcm8QN3Iq2K4fXT-Bv", "templates": [ { "vendor": "Apple", "projectType": "loyalty", "projectId": "12345", "type": "Store Card", "vendorId": "1", "deleted": "False", "id": "1234", "updatedAt": "2013-06-27T20:58:05.000Z", "description": "Template 1", "createdAt": "2013-06-27T20:51:09.000Z", "name": "Template 1", "disabled": "False" }, { "vendor": "Google", "projectType": "loyalty", "projectId": "12345", "type": "Loyalty1", "vendorId": "2", "deleted": "False", "id": "1235", "updatedAt": "2013-06-27T20:55:23.000Z", "description": "GW Template1", "createdAt": "2013-06-27T20:55:06.000Z", "name": "GW Template1", "disabled": "False" } ], "description": "Aztec Barcode", "createdAt": "2013-06-27T20:51:02.000Z", "settings": { "barcode_alt_text": "123456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type_text": "Aztec", "barcode_type": "aztec" }, "name": "Aztec Barcode", "projectType": "loyalty" } ``` *Example request with external ID* ```http GET /v1/project/id/myProject HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-06-27T20:55:06.000Z", "externalId": "myProject", "id": "12345", "description": "Aztec Barcode", "createdAt": "2013-06-27T20:51:02.000Z", "contextId": "myvWKam4QN9Iu2K2fXK-Bd", "templates": [ ], "settings": { "barcode_alt_text": "123456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type_text": "Aztec", "barcode_type": "aztec" }, "name": "Aztec Barcode", "projectType": "loyalty" } ``` --- ## List NFC merchants {#listnfcmerchants} Return all NFC merchant information for a project. [Jump to examples ↓](#listnfcmerchants-examples) ### `GET /project/{projectId}/nfcMerchants` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wprj **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to add or lookup NFC merchant information for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns all NFC merchants associated with your Airship Wallet project. Response body: **Content-Type:** `application/json` - **`merchants`** `array` **All of:** - **`keyVersion`** `integer` The SSH protocol version for your key. Can be set to `1`. Min: 1, Max: 4 - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. - **`publicKeyPem`** `string` The public key for NFC communications. If you do not provide a public key, Airship will generate a public/private key pair for you. - **`smartTapCollectorId`** `string` Defines your Google Wallet merchant. - **`terminalProvider`** `string` The NFC terminal provider that can read NFC messages, like `Verifone`. - **`vendor`** `string` **REQUIRED** Set the vendor you want to provide information for, where `ANY` represents both Apple and Google vendors. If you omit this property, Airship assumes `ANY`. Possible values: `GOOGLE`, `APPLE`, `ANY` - **`keySource`** `string` Set by Airship, either `GENERATED` if Airship generates your public/private keys or `IMPORTED` if you provide your own `publicKey`. Possible values: `GENERATED`, `IMPORTED` Read only: true - **`merchantId`** `string` The Airship-generated UUID for your NFC merchant information. Read only: true - **`privateKeyPem`** `string` Returned in a POST if your public/private keys are generated by Airship. This is the key your terminal uses to decode messages from Airship (that use the `publicKeyPem`). - **`projectId`** `integer` The ID of the Wallet project. - **`smartTapIssuerId`** `string` **GOOGLE ONLY** Represents your platform and may contain more than one `collectorId`. - **`updatedAt`** `string` The date and time when your NFC merchant information was last updated. Format: `date-time` **Examples** *Example request* ```http GET /v1/project/13137/nfcMerchants HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/project/id/13137/nfcMerchants HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "merchants": [ { "merchantId": "23c0da58-3b79-4d44-9191-b69faef7b24c", "projectId": 13137, "vendor": "APPLE", "merchantName": "XYZ Merchant", "merchantEmail": "xyz@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo/TGGLW++AE05GAYnXgCo/ebGLN1\nbdjF01imojOydLhts4VsYDCU69pRXuWKn6wRgmymSAB4+b72n3/uB8lW0w==\n", "keyVersion": 1, "keySource": "GENERATED", "updatedAt": "2020-09-16T19:16:28.000Z" }, { "merchantId": "70407b66-ffbc-41bf-bf13-7814caf1d2bc", "projectId": 13137, "vendor": "GOOGLE", "merchantName": "ABC Merchant", "merchantEmail": "abc@example.com", "terminalProvider": "Test Tool", "publicKeyPem": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEchyXj869zfmKhRi9xP7f2AK07kEo\n4lE7ZlWTN14jh4YBTny+hRGRXcUzevV9zSSPJlPHpqqu5pEwlv1xyFvE1w==\n", "keyVersion": 1, "keySource": "IMPORTED", "smartTapIssuerId": "3388000000005375425", "smartTapCollectorId": "23405818", "updatedAt": "2020-09-09T00:19:45.000Z" } ] } ``` --- ## List projects {#listprojects} List the projects belonging to you. [Jump to examples ↓](#listprojects-examples) ### `GET /project` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `pageSize` | `integer` | | The number of results per page. Defaults to 10. | | `page` | `integer` | | The page of the search you want to return. | | `order` | `string` | | Determines the order of results. Defaults to `id`. Possible values: `id`, `name`, `createdAt`, `updatedAt` | | `direction` | `string` | | The direction of the result set, ascending or descending. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** An array of projects belonging to you. Response body: **Content-Type:** `application/json; charset=utf-8` - **`count`** `string` The total number of results. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`projects`** `array` <[Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload)> **Examples** *Example request* ```http GET /v1/project HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "projects":[ { "updatedAt": "2013-06-27T20:55:06.000Z", "id": "12345", "description": "Aztec Barcode", "createdAt": "2013-06-27T20:51:02.000Z", "contextId": "myvWKam4QN9Iu2K2fXK-Bd", "templates": [ ], "settings": { "barcode_alt_text": "123456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type_text": "Aztec", "barcode_type": "aztec" }, "name": "Aztec Barcode", "projectType": "loyalty" }, { "updatedAt": "2013-06-27T01:38:21.000Z", "id": "12346", "description": "Apple Templates", "createdAt": "2013-06-26T18:43:07.000Z", "contextId": "myvULam4QN3Iu2K4fXK-Bf", "templates": [ ], "settings": { "barcode_alt_text": "123456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type": "pdf417" }, "name": "Apple Templates", "projectType": "loyalty" } ], "count": 89, "pagination": { "order": "id", "page": 1, "start": 0, "direction": "DESC", "pageSize": 10 } } ``` --- ## Update NFC merchant information {#updatenfcmerchant} Update your NFC merchant information. [Jump to examples ↓](#updatenfcmerchant-examples) ### `PUT /project/{projectId}/nfcMerchants/{merchantId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wprj **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to add or lookup NFC merchant information for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{projectExternalId}`. | | `merchantId` | `string` | Required | The merchant ID you want to modify. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** You cannot update your public/private key. If you need to update keys, you should add a new NFC merchant configuration using new keys and delete the existing configuration. **Content-Type:** `application/json` - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. **Responses** **`200`** A response includes your project ID and NFC merchant information. Note the `merchantId` — this is how you reference your merchant information if you need to modify or delete it. Response body: **Content-Type:** `application/json` **All of:** - **`keyVersion`** `integer` The SSH protocol version for your key. Can be set to `1`. Min: 1, Max: 4 - **`merchantEmail`** `string` The google merchant email address, used when configuring smartTap. - **`merchantName`** `string` The google merchant name, used when configuring smartTap. - **`publicKeyPem`** `string` The public key for NFC communications. If you do not provide a public key, Airship will generate a public/private key pair for you. - **`smartTapCollectorId`** `string` Defines your Google Wallet merchant. - **`terminalProvider`** `string` The NFC terminal provider that can read NFC messages, like `Verifone`. - **`vendor`** `string` **REQUIRED** Set the vendor you want to provide information for, where `ANY` represents both Apple and Google vendors. If you omit this property, Airship assumes `ANY`. Possible values: `GOOGLE`, `APPLE`, `ANY` - **`keySource`** `string` Set by Airship, either `GENERATED` if Airship generates your public/private keys or `IMPORTED` if you provide your own `publicKey`. Possible values: `GENERATED`, `IMPORTED` Read only: true - **`merchantId`** `string` The Airship-generated UUID for your NFC merchant information. Read only: true - **`privateKeyPem`** `string` Returned in a POST if your public/private keys are generated by Airship. This is the key your terminal uses to decode messages from Airship (that use the `publicKeyPem`). - **`projectId`** `integer` The ID of the Wallet project. - **`smartTapIssuerId`** `string` **GOOGLE ONLY** Represents your platform and may contain more than one `collectorId`. - **`updatedAt`** `string` The date and time when your NFC merchant information was last updated. Format: `date-time` **Examples** *Example request* ```http PUT /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "merchantName": "Example Merchant", "merchantEmail": "my_merchant@example.com" } ``` *Example request with external ID* ```http PUT /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "merchantName": "Example Merchant", "merchantEmail": "my_merchant@example.com" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "merchantId": "23c0da58-3b79-4d44-9191-b69faef7b24c", "projectId": 13137, "vendor": "GOOGLE", "merchantName": "XYZ Merchant", "merchantEmail": "xyz@example.com", "terminalProvider": "Verifone", "publicKeyPem": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo/TGGLW++AE05GAYnXgCo/ebGLN1\nbdjF01imojOydLhts4VsYDCU69pRXuWKn6wRgmymSAB4+b72n3/uB8lW0w==\n", "keyVersion": 1, "keySource": "GENERATED", "updatedAt": "2020-09-16T19:16:28.877Z" } ``` --- ## Update project {#updateproject} Update a project. [Jump to examples ↓](#updateproject-examples) ### `PUT /project/{projectId}` {{< note >}} Provide only the fields you want to update. While this payload takes any of the keys used when creating a project, any keys you do not provide will remain unchanged. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** An update request can take the same payload as a Create Project request. However, you should provide only the keys you want to update. Keys you do not provide will remain unchanged. **Content-Type:** `application/json` [Project request]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectrequest) **Responses** **`200`** Returns project metadata and a list of templates for the project. Response body: **Content-Type:** `application/json` [Project response]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectpayload) **Examples** *Example request* ```http PUT /v1/project/12345 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "name": "New And Improved Name", "description": "Significantly more detailed description" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-07-01T19:57:36.000Z", "id": 12345, "templates": [ ], "description": "Significantly more detailed description", "createdAt": "2013-07-01T19:57:36.000Z", "settings": { }, "name": "New And Improved Name", "projectType": "loyalty" } ``` *Example request with external ID* ```http PUT /v1/project/id/myProject HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "name": "New And Improved Name", "description": "Significantly more detailed description" } ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "updatedAt": "2013-07-01T19:57:36.000Z", "externalId": "myProject", "id": 12345, "templates": [ ], "description": "Significantly more detailed description", "createdAt": "2013-07-01T19:57:36.000Z", "settings": { }, "name": "New And Improved Name", "projectType": "loyalty" } ``` --- # Push Notifications > Send a push notification to end users who have iOS or Android passes installed, letting them know information has changed. By notifying users, they will receive an alert as well as an update to the back of the pass showing the most recent notification. ## Delete notification by pass {#deletepassnotification} Removes notification field and message from the back of the pass. [Jump to examples ↓](#deletepassnotification-examples) ### `DELETE /pass/{passId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want send notification to. | **Responses** **`200`** Notification is being deleted. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The pass does not exist. **Examples** *Example request* ```http DELETE /v1/pass/123/notify HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Delete notification by pass with external ID {#deletepassnotificationbyexternalid} Removes notification field and message from the back of the pass. [Jump to examples ↓](#deletepassnotificationbyexternalid-examples) ### `DELETE /pass/template/{templateId}/id/{passExternalId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template ID for the pass you want to send or delete notification for. | | `passExternalId` | `string` | Required | The custom identifier of the pass you want to send or delete notification for. | **Responses** **`200`** Notification is being deleted. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The pass does not exist. **Examples** *Example request* ```http DELETE /v1/pass/template/12345/id/my_custom_pass_id/notify HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Delete notification by segment {#deletesegmentpassnotification} Delete pass notification for specified segment. [Jump to examples ↓](#deletesegmentpassnotification-examples) ### `DELETE /segments/{projectId}/{segmentId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project you want to delete the notification for. | | `segmentId` | `string` | Required | The ID of the segment you want to delete the notification for. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | | The ID of the template you want to delete the notification for. | **Responses** **`200`** Notification is being deleted. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The segment does not exist. **Examples** *Example request* ```http DELETE /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a/notify?templateId=6789 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Delete notification by tag {#deletetagpassnotification} Delete notification for passes associated with the specified tag. [Jump to examples ↓](#deletetagpassnotification-examples) ### `DELETE /tag/{tag}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag associated with the passes you want to send or delete notification for. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template ID associated with the passes you want to send or delete notification for. | **Responses** **`200`** Notification is being deleted. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The tag does not exist. **Examples** *Example request* ```http DELETE /v1/tag/campaign123/notify?templateId=12345 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Delete notification by template {#deletetemplatepassnotification} Delete pass notification for specified template passes. [Jump to examples ↓](#deletetemplatepassnotification-examples) ### `DELETE /template/{templateId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The `id` of the template you want to send or delete notification for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{templateExternalId}`. | **Responses** **`200`** Notification is being deleted. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The template does not exist. **Examples** *Example request* ```http DELETE /v1/template/123/notify HTTP/1.1 Authorization: Basic ``` *Example request with external ID* ```http DELETE /v1/template/id/12345/notify HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 12345 } ``` --- ## Send notification by pass {#sendpassnotification} Send a notification to a pass. Delivers lock screen notification through the wallet app and presents notification field and message on the back of the pass. [Jump to examples ↓](#sendpassnotification-examples) ### `POST /pass/{passId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The `id` of the pass you want send notification to. | **Request body** Send notification to a pass. **Content-Type:** `application/json` - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. **Responses** **`200`** Notification is being sent. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/pass/123/notify HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item", "startTime": "2026-03-26T12:00:00Z", "endTime": "2026-03-26T13:00:00Z" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- ## Send notification by pass with external ID {#sendpassnotificationbyexternalid} Send a notification to a pass. Delivers lock screen notification through the wallet app and presents notification field and message on the back of the pass. [Jump to examples ↓](#sendpassnotificationbyexternalid-examples) ### `POST /pass/template/{templateId}/id/{passExternalId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template ID for the pass you want to send or delete notification for. | | `passExternalId` | `string` | Required | The custom identifier of the pass you want to send or delete notification for. | **Request body** Send notification to a pass. **Content-Type:** `application/json` - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. **Responses** **`200`** Notification is being sent. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/pass/template/12345/id/my_custom_pass_id/notify HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item", "startTime": "2026-03-26T12:00:00Z", "endTime": "2026-03-26T13:00:00Z" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- ## Send notification by segment {#sendsegmentpassnotification} Send a notification to all passes for a segment. [Jump to examples ↓](#sendsegmentpassnotification-examples) ### `POST /segments/{projectId}/{segmentId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project you want to send the notification to. | | `segmentId` | `string` | Required | The ID of the segment you want to send the notification to. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The ID of the template you want to send the notification to. | **Request body** Send notification to segment passes. **Content-Type:** `application/json` - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. **Responses** **`200`** Notification is being sent. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The segment does not exist. **Examples** *Example request* ```http POST /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a/notify?templateId=6789 HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item", "startTime": "2026-03-26T12:00:00Z", "endTime": "2026-03-26T13:00:00Z" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- ## Send notification by tag {#sendtagpassnotification} Send notification to all passes associated with the specified tag. [Jump to examples ↓](#sendtagpassnotification-examples) ### `POST /tag/{tag}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag associated with the passes you want to send or delete notification for. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template ID associated with the passes you want to send or delete notification for. | **Request body** Send notification to tagged passes. **Content-Type:** `application/json` - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. **Responses** **`200`** Notification is being sent. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The tag does not exist. **Examples** *Example request* ```http POST /v1/tag/campaign123/notify?templateId=12345 HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item" "startTime": "2026-03-26T12:00:00Z", "endTime": "2026-03-26T13:00:00Z" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- ## Send notification by template {#sendtemplatepassnotification} Send a notification to all passes belonging to the template. [Jump to examples ↓](#sendtemplatepassnotification-examples) ### `POST /template/{templateId}/notify` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wnot **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The `id` of the template you want to send or delete notification for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{templateExternalId}`. | **Request body** Send notification to template passes. **Content-Type:** `application/json` - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. **Responses** **`200`** Notification is being sent. The response contains a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) that you can use to look up the operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` An identifier for this operation. **`404`** The pass does not exist. **Examples** *Example request* ```http POST /v1/template/123/notify HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item" } ``` *Example request with external ID* ```http POST /v1/template/id/12345/notify HTTP/1.1 Content-Type: application/json Authorization: Basic { "label": "Last Notification", "value": "20% off any one regular priced item" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 1234 } ``` --- # Schedules > Schedule pass updates for future delivery. ## Delete schedule {#deleteschedule} Deletes the specified schedule. [Jump to examples ↓](#deleteschedule-examples) ### `DELETE /schedules/{projectId}/{scheduleId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wsch **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project ID. | | `scheduleId` | `string` | Required | The schedule ID. This is appended to the end of the `url` in the response for schedule operations. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`204`** A deleted schedule returns no content. **Examples** *Example request* ```http DELETE /v1/schedules/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 204 No Content ``` --- ## Get schedule {#getschedule} Return a single project's schedule. [Jump to examples ↓](#getschedule-examples) ### `GET /schedules/{projectId}/{scheduleId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wsch **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project ID. | | `scheduleId` | `string` | Required | The schedule ID. This is appended to the end of the `url` in the response for schedule operations. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a single schedule object. Response body: **Content-Type:** `application/json` [Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject) **Examples** *Example request* ```http GET /v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "primary1": { "value": "$20 Off" }, "secondary1": { "value": "Mega Offer" } } } } } ``` --- ## List schedules {#listschedules} Get a list of all schedules that have not yet occurred for the project. [Jump to examples ↓](#listschedules-examples) ### `GET /schedules/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wsch **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project ID. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a list of schedules, ordered scheduled_time closest to the present. Response body: **Content-Type:** `application/json` - **`count`** `integer` The number of schedules on the page. - **`next_page`** `string` The URL of the next page in the result set. Format: `url` - **`ok`** `boolean` If true, the operation completed successfully. - **`schedules`** `array` <[Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject)> The list of upcoming schedules. - **`total_count`** `integer` The total number of schedules. **Examples** *Example request* ```http GET /v1/schedules/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "count": 2, "next_page": "https://wallet-api.urbanairship.com/v1/schedules/12345?start=5c69320c-3e91-5241-fad3-248269eed104&limit=2&order=asc", "ok": true, "schedules": [ { "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "primary1": { "value": "$20 Off" }, "secondary1": { "value": "Mega Offer" } } } }, "url": "http://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109" }, { "schedule": {}, "update": {}, "url": "http://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed10A" } ], "total_count": 4 } ``` --- ## Schedule an update or push notification {#scheduleupdate} Schedule an update to a project or schedule a notification to a project. [Jump to examples ↓](#scheduleupdate-examples) ### `POST /schedules/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wsch **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project ID. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** The schedule update object to schedule an update or the schedule notification object to schedule a notification. **Content-Type:** `application/json` **One of:** - [Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject) Specifies updates to passes or adaptive links at a particular date and time. - **`name`** `string` A name for the schedule. - **`notify`** `object` The notification you want to send to an `audience` or `pass`, generated from a `template` within the project. Cannot be used with the update object present as well. **OBJECT PROPERTIES** - **`audience`** `object` <[Audience selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#audienceselector)> Determines the passes you want to target. - **`pass`** `object` **OBJECT PROPERTIES** - **`notification`** `object` An object for sending a custom pass notification message. **OBJECT PROPERTIES** - **`endTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should disappear. Defaults to one hour in the future. Format: `date-time` - **`label`** `string` Optional header for the message. - **`startTime`** `string` **GOOGLE ONLY** The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the message should appear. Defaults to the current time. Format: `date-time` - **`value`** `string` **REQUIRED** The body of the notification message. - **`schedule`** `object` **OBJECT PROPERTIES** - **`scheduled_time`** `string` The ISO 8601 inclusive date, optionally including an offset, e.g., 2007-03-01T13:00:00+08:00. The value will be converted and stored as UTC. Format: `date-time` - **`url`** `string` A URL to get the schedule object. Format: `url` Read only: true **Responses** **`200`** Returns the schedule request along with identifiers for the operation and the schedule itself. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. - **`operation_id`** `string` Identifies the operation for troubleshooting and logging. Format: `uuid` - **`schedule_urls`** `array[string]` URLs for the schedules created by the operation. Items in the array are ordered just as they were in the request. - **`schedules`** `array` <[Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject)> **Examples** *Example request for update* ```http POST /v1/schedules/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "primary1": { "value": "$20 Off" }, "secondary1": { "value": "Mega Offer" } } } } } ``` *Response for update* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ok": true, "operation_id": "efb18e92-9a60-6689-45c2-82fedab36399", "schedule_urls": [ "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109" ], "schedules": [ { "url": "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109", "ticket": "https://wallet-api.urbanairship/v1/ticket/6789", "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "secondary1": { "value": "Mega Offer" }, "primary1": { "value": "$20 Off" } } } } } ] } ``` *Example request for notification* ```http POST /v1/schedules/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "notify": { "audience": { "tag": "TZ_ET" }, "pass": { "notification": { "label": "Last Notification", "value": "20% off any one regular priced item" } } } } ``` *Response for notification* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ok": true, "operation_id": "efb18e92-9a60-6689-45c2-82fedab36399", "schedule_urls": [ "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109" ], "schedules": [ { "url": "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109", "ticket": "https://wallet-api.urbanairship/v1/ticket/6789", "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "notify": { "audience": { "tag": "TZ_ET" }, "pass": { "notification": { "label": "Last Notification", "value": "20% off any one regular priced item" } } } } ] } ``` --- ## Update schedule {#updateschedule} Update a schedule. The payload to update a schedule is identical to the request to create a schedule. [Jump to examples ↓](#updateschedule-examples) ### `PUT /schedules/{projectId}/{scheduleId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wsch **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project ID. | | `scheduleId` | `string` | Required | The schedule ID. This is appended to the end of the `url` in the response for schedule operations. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` [Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject) **Responses** **`200`** Returns the updated schedule object. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. - **`operation_id`** `string` Identifies the operation for troubleshooting and logging. Format: `uuid` - **`schedule_urls`** `array[string]` URL for the updated schedule. - **`schedules`** `array` <[Schedule update object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#scheduleupdateobject)> **Examples** *Example request* ```http PUT /v1/schedules/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-11T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "primary1": { "value": "$20 Off" }, "secondary1": { "value": "Mega Offer" } } } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ok": true, "operation_id": "efb18e92-9a60-6689-45c2-82fedab36490", "schedule_urls": [ "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109" ], "schedules": [ { "url": "https://wallet-api.urbanairship/v1/schedules/12345/2d69320c-3c91-5241-fac4-248269eed109", "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-11T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "secondary1": { "value": "Mega Offer" }, "primary1": { "value": "$20 Off" } } } } } ] } ``` --- # Segments > A Segment identifies a group/set of Wallet passes that contains a tag or combination of tags, using boolean `and`, `or`, and `not` operators. Use segments to group and target passes for subsequent updates. ## Create segment {#createsegment} Create a segment for a project. [Jump to examples ↓](#createsegment-examples) ### `POST /segments/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wseg **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Contains `and`, `or`, or `not` operators for tags that identify your segment. **Content-Type:** `application/json` - **`criteria`** `object` <[Segment selector]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#segmentselector)> Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. - **`display_name`** `string` The name of the segment. **Responses** **`200`** A response returns a segment ID that you can use to reference the segment in future operations. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. - **`operationId`** `string` An identifier for the operation. Use this value to reference the operation for troubleshooting purposes. Format: `uuid` - **`segmentId`** `string` An identifier for the segment. Use this value to reference the segment in other operations. Format: `uuid` **Examples** *Example request* ```http POST /v1/segments/12345 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "criteria": { "and": [ { "tag": "TZ_PST" }, { "not": { "tag": "TZ_ET" } } ] }, "display_name": "timezone" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ok": true, "segmentId": "b13666df-e5b3-4e42-8919-f8d63bd7ce2a", "operationId": "dd2f1d32-aca9-4463-91c2-a3420bbcd489" } ``` --- ## Delete segment {#deletesegment} Delete a segment by ID. This operation just deletes the segment criteria. The passes previously selected by this criteria are unchanged. [Jump to examples ↓](#deletesegment-examples) ### `DELETE /segments/{projectId}/{segmentId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wseg **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | | `segmentId` | `string` | Required | The ID of the segment. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`204`** A successful delete request returns no content. **Examples** *Example request* ```http DELETE /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 204 No Content ``` --- ## List segments {#listsegments} List meta information for all segments for a project. [Jump to examples ↓](#listsegments-examples) ### `GET /segments/{projectId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wseg **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A response returns a list of segments for a project. Response body: **Content-Type:** `application/json` - **`segments`** `array[object]` **Examples** *Example request* ```http GET /v1/segments/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "segments": [ { "creation_date": "2017-03-17T05:45:21Z", "display_name": "timezone", "id": "3b13666df-e5b3-4e42-8919-f8d63bd7ce2a", "modification_date": "2017-03-17T05:45:21Z" }, { "creation_date": "2017-03-17T23:29:06Z", "display_name": "my testing segment", "id": "5eae7f52-3dc7-4a67-8a89-9b357815e7f7", "modification_date": "2017-03-17T23:29:06Z" } ] } ``` --- ## Look up segment {#getsegment} Returns the selector criteria for a segment. [Jump to examples ↓](#getsegment-examples) ### `GET /segments/{projectId}/{segmentId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wseg **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | | `segmentId` | `string` | Required | The ID of the segment. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns the selection criteria for the segment. Response body: **Content-Type:** `application/json` - **`criteria`** `object` <[Segment selector]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#segmentselector)> Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. - **`display_name`** `string` The name of the segment. **Examples** *Example request* ```http GET /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "criteria": { "and": [ { "tag": "TZ_PST" }, { "not": { "tag": "TZ_ET" } } ] }, "display_name": "timezone" } ``` --- ## Update passes by segment {#updatepassesbysegment} Update passes by segment ID and template ID. [Jump to examples ↓](#updatepassesbysegment-examples) ### `PUT /segments/{projectId}/{segmentId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | | `segmentId` | `string` | Required | The ID of the segment. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | | The ID for the template. Required since pass updates for segments are done at the template level. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields you want to update. **Content-Type:** `application/json` - **`fields`** `object` **Responses** **`200`** A response returns one or more [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/) values, each referencing the pass update operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` A ticket you can use to reference this operation for status, troubleshooting, or logging purposes. **Examples** *Example request* ```http PUT /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a/passes?templateId=6789 HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields":{ "secondary1":{ "value":"Mega Offer" }, "primary1":{ "value":"$20 Off" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ticketId": 123 } ``` --- ## Update segment {#updatesegment} Update selection criteria or the display name for a segment. [Jump to examples ↓](#updatesegment-examples) ### `PUT /segments/{projectId}/{segmentId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wseg **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The ID of the project. | | `segmentId` | `string` | Required | The ID of the segment. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** **Content-Type:** `application/json` - **`criteria`** `object` <[Segment selector]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#segmentselector)> Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. - **`display_name`** `string` The name of the segment. **Responses** **`200`** A response returns a segment ID that you can use to reference the segment in future operations. Response body: **Content-Type:** `application/json` - **`ok`** `boolean` If true, the operation completed successfully. - **`operationId`** `string` An identifier for the operation. Use this ID to reference the operation for troubleshooting purposes. Format: `uuid` - **`segmentId`** `string` An identifier for the segment that you can use to reference the segment in other operations. Format: `uuid` **Examples** *Example request* ```http PUT /v1/segments/12345/3b13666df-e5b3-4e42-8919-f8d63bd7ce2a HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "criteria": { "and": [ { "tag": "TZ_PST" }, { "not": { "tag": "TZ_ET" } } ] }, "display_name": "timezone_info" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ok": true, "segmentId": "3b13666df-e5b3-4e42-8919-f8d63bd7ce2a", "operationId": "f573b3c5-b0ee-4461-a179-2e78aab20400" } ``` --- # Statistics > Get pass creation, installation, and uninstallation counts for projects and templates. Endpoints for `/activity` report net total activities, including repeated actions by the same user. For example, if the same user installs, removes, and then adds the same pass again, a response will show two passes installed and one pass removed. Endpoints for `/stats` will not count repeated actions from the same user. ## Pass statistics with external ID {#getpassstatisticsexternalid} Returns statistics for a pass with an external ID, including the total number of installs and uninstalls. The response payload lists the internal Wallet ID for the template rather than the external ID. This endpoint does not count repeated actions by the same user. [Jump to examples ↓](#getpassstatisticsexternalid-examples) ### `GET /pass/id/{externalId}/stats` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `externalId` | `integer` | Required | The external ID of the pass you want to return statistics for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a summary of statistics for the pass. Response body: **Content-Type:** `application/json` - **`installed`** `integer` The number of installed passes with this external ID. - **`templates`** `array[object]` The individual pass statistics for each template used to create passes with this external ID. Each object in the array represents a template. - **`total`** `integer` A count of the total number of passes with this external ID. - **`uninstalled`** `integer` The number of uninstalled passes with this external ID. **Examples** *Example request* ```http GET /v1/pass/id/my_pass/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "total": 1, "installed": 1, "uninstalled": 0, "templates": [ { "id": 5350, "installed": 1, "uninstalled": 0 } ] } ``` --- ## Project activity {#getprojectactivity} Returns daily pass activity for a given project ID. You can also add start and end date parameters in the path to return activity between two dates, in the format `/template/{templateId}/activity/2018-08-10/2018-10-01`. If your request did not specify a date range, the response includes all activity, organized by day, since the template's `createdAt` date. This endpoint represents net activity, including repeated actions by the same user. For example, if the same user installs, removes, and then adds the same pass again, the report shows two passes installed and one pass removed. [Jump to examples ↓](#getprojectactivity-examples) ### `GET /project/{projectId}/activity` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The ID of the project you want to return activity for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a per-day activity for all days in the time range. If your request did not specify a date range, the response includes all activity, organized by day, since the projects's `createdAt` date. Response body: **Content-Type:** `application/json` - **`details`** `array[object]` Each object in this array represents pass activity for a single day. Each object represents net activity, including repeated actions by the same user. For example, if the same user installs, removes, and then adds the same pass again, the object shows two passes installed and one pass removed. - **`endDate`** `string` The end date for a statistics report. Format: `date` - **`id`** `integer` The ID of the project specified in the path. - **`startDate`** `string` The start date for a statistics report. Format: `date` - **`summary`** `object` Represents activity for a template or project. **OBJECT PROPERTIES** - **`created`** `integer` The number of passes created. - **`installed`** `integer` The number of passes that were installed. - **`uninstalled`** `integer` The number of passes that were uninstalled. **Examples** *Example request* ```http GET /v1/project/12345/activity/2015-08-19/2015-08-20 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/project/id/myExternalProject/activity/2015-08-19/2015-08-20 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "id": 12345, "startDate": "2015/08/19", "endDate": "2015/08/20", "summary": { "created": 113, "installed": 0, "uninstalled": 0 }, "details": [ { "date": "2015/08/19", "activity": { "created": 111, "installed": 0, "uninstalled": 0 } }, { "date": "2015/08/20", "activity": { "created": 0, "installed": 0, "uninstalled": 0 } } ] } ``` --- ## Project statistics {#getprojectstatistics} Returns statistics for a given project ID. This endpoint does not count repeated actions by the same user. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), the response payload lists the internal Wallet ID for the template rather than the external ID. [Jump to examples ↓](#getprojectstatistics-examples) ### `GET /project/{projectId}/stats` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `integer` | Required | The ID of the project you want to return statistics for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{projectId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a summary of pass statistics for every template in the project. Response body: **Content-Type:** `application/json` - **`id`** `integer` The identifier for the project. - **`installed`** `integer` The total number of passes from this project that are installed. - **`lastUpdated`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`templates`** `array[object]` Contains statistics for each template belonging to the project. - **`total`** `integer` The total number of passes created in the project. - **`uninstalled`** `integer` The total number of passes created from this project that are uninstalled. **Examples** *Example request* ```http GET /v1/project/12345/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/project/id/ext_54321/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "id": 12345, "lastUpdated": "2015-10-01T20:15:29.000-07:00", "templates": [ { "id": 1234, "vendor": "Apple", "lastUpdated": "2015-10-01T20:15:29.000-07:00", "total": 2194, "installed": 2, "uninstalled": 7 } ], "total": 2194, "installed": 2, "uninstalled": 7 } ``` --- ## Tag statistics {#gettagstatistics} Returns statistics for a given tag. Tags are typically used for segmentation but can also be useful for reporting. This endpoint does not count repeated actions by the same user. [Jump to examples ↓](#gettagstatistics-examples) ### `GET /tag/{tag}/stats` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag you want to return statistics for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns an object containing usage information about a tag. Response body: **Content-Type:** `application/json` - **`installed`** `integer` The number of installed passes with the tag. - **`lastUpdated`** `string` The date and time when the statistics were generated. Format: `date-time` - **`not_been_installed`** `integer` The number of passes created but not installed. - **`total`** `integer` A count of the total number of passes created with the tag. - **`uninstalled`** `integer` The number of uninstalled passes with the tag. **Examples** *Example request* ```http GET /v1/tag/my_tag/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "total": 21, "installed": 11, "uninstalled": 0, "not_been_installed": 0, "lastUpdated": "2023-06-14T12:45:37.000Z" } ``` --- ## Template activity {#gettemplateactivity} Returns daily activity of passes created, installed, and uninstalled for a template, specified by template ID. You can also add start and end date parameters in the path to return activity between two dates, in the format `/template/id/{externalId}/activity/2018-08-10/2018-10-01`. If your request did not specify a date range, the response includes all activity, organized by day, since the template's `createdAt` date. This endpoint represents net activity, including repeated actions by the same user. For example, if the same user installs, removes, and then adds the same pass again, the report shows two passes installed and one pass removed. [Jump to examples ↓](#gettemplateactivity-examples) ### `GET /template/{templateId}/activity` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `integer` | Required | The ID of the template you want to return activity for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns a per-day activity for all days in the time range. If your request did not specify a date range, the response includes all activity, organized by day, since the template's `createdAt` date. Response body: **Content-Type:** `application/json` - **`details`** `array[object]` Each object in this array represents pass activity for a single day. - **`endDate`** `string` The end date for a statistics report. Format: `date` - **`id`** `integer` The ID of the template specified in the path. - **`startDate`** `string` The start date for a statistics report. Format: `date` - **`summary`** `object` Represents activity for a template or project. **OBJECT PROPERTIES** - **`created`** `integer` The number of passes created. - **`installed`** `integer` The number of passes that were installed. - **`uninstalled`** `integer` The number of passes that were uninstalled. - **`vendor`** `string` The device vendor the template is designed for. Possible values: `Apple`, `Google` **Examples** *Example request* ```http GET /v1/template/1234/activity/2015-08-19/2015-08-20 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/template/id/myExternalId/activity/2015-08-19/2015-08-20 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "id": 1234, "vendor": "Apple", "startDate": "2015/08/19", "endDate": "2015/08/20", "summary": { "created": 113, "installed": 0, "uninstalled": 0 }, "details": [ { "date": "2015/08/19", "activity": { "created": 111, "installed": 0, "uninstalled": 0 } }, { "date": "2015/08/20", "activity": { "created": 0, "installed": 0, "uninstalled": 0 } } ] } ``` --- ## Template statistics {#gettemplatestatistics} Returns statistics for a given template by ID, including the total number of passes installed and uninstalled. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), the response payload lists the internal Wallet ID for the template rather than the external ID. This endpoint does not count repeated actions by the same user. [Jump to examples ↓](#gettemplatestatistics-examples) ### `GET /template/{templateId}/stats` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wrpt **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `integer` | Required | The ID of the template you want to return statistics for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns an object containing usage information about a template. Response body: **Content-Type:** `application/json` - **`id`** `integer` The template specified in the request. - **`installed`** `integer` The number of installed passes based on this template. - **`lastUpdated`** `string` The date and time when the template was last updated. Format: `date-time` - **`total`** `integer` A count of the total number of passes created from the template. - **`uninstalled`** `integer` The number of uninstalled passes based on this template. - **`vendor`** `string` The device vendor the template is designed for. Possible values: `Apple`, `Google` **Examples** *Example request* ```http GET /v1/template/12345/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/template/id/ext_54321/stats HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "id": 12345, "vendor": "Apple", "lastUpdated": "2015-10-01T20:15:28.000-07:00", "total": 7, "installed": 0, "uninstalled": 0 } ``` --- # Tags > Tags are plain-text identifiers for passes. Use tags to identify passes for segmentation purposes, or to target an audience of passes for updates. Tags are limited to 15 per pass. ## Add tags to pass {#addtagstopass} Add tags to a pass, limited to 15 tags per pass. [Jump to examples ↓](#addtagstopass-examples) ### `PUT /pass/{passId}/tags` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The ID of the pass you want to add tags to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{passId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** An array of tags that you want to associate with the pass. **Content-Type:** `application/json` - **`tags`** `array[string]` **REQUIRED** An array of strings, each string representing a tag. Max items: 15 **Responses** **`200`** Lists the tags added to the pass. Response body: **Content-Type:** `application/json` - **`mappings`** `integer` The number of tags added. - **`newTags`** `array[string]` A list of tags successfully added to the pass. **Examples** *Example request* ```http PUT /v1/pass/123/tags HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "tags": ["tag-name"] } ``` *Example request with external ID* ```http PUT /v1/pass/id/mypass/tags HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "tags": ["tag-name"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "newTags": ["tag-name"], "mappings": 1 } ``` --- ## Delete tag {#deletetag} Delete the specified tag and remove it from all passes. [Jump to examples ↓](#deletetag-examples) ### `DELETE /tag/{tag}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag you want to delete. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful operation returns a count of affected passes. Response body: **Content-Type:** `application/json` - **`count`** `integer` The number of passes the tag was removed from. - **`status`** `string` The operation was successful. Possible values: `success` - **`tagId`** `integer` The ID of the deleted tag. **Examples** *Example request* ```http DELETE /v1/tag/tag-name HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "status": "success", "tagId": 5, "count": 93 } ``` --- ## List all tags {#listalltags} List all tags. [Jump to examples ↓](#listalltags-examples) ### `GET /tag` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `pageSize` | `integer` | | The number of tags per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want tags returned in, defaulting to `id`. Possible values: `id`, `createdAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A paginated array of tags. Response body: **Content-Type:** `application/json` - **`Pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`count`** `integer` The number of items returned. - **`tags`** `array[object]` **Examples** *Example request* ```http GET /v1/tag HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "tags": [ { "id": 2, "tag": "Gold", "createdAt": "2018-03-02T23:49:53Z" }, { "id": 3, "tag": "Silver", "createdAt": "2018-03-02T23:49:53Z" }, { "id": 4, "tag": "Platinum", "createdAt": "2018-03-02T23:49:53Z" }, { "id": 5, "tag": "Enterprise", "createdAt": "2018-03-02T23:49:53Z" } ], "Pagination": { "order": "ID", "page": 1, "start": 0, "direction": "DESC", "pageSize": 10 }, "count": 4 } ``` --- ## List passes for a tag {#listpassesfortag} List the passes associated with the specified tag. [Jump to examples ↓](#listpassesfortag-examples) ### `GET /tag/{tag}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | A tag `id` or `name`. The request returns a paginated list of passes associated with the specified tag. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want tags returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns a paginated array of passes. Response body: **Content-Type:** `application/json` - **`count`** `integer` The total number of results. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `object` Meta information about passes. **OBJECT PROPERTIES** - **`createdAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`id`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`installedAt`** `string` The date and time when pass was first installed on the device. Format: `date-time` - **`platform`** `string` Wallet platform. Possible values: `iOS`, `Android` - **`serialNumber`** `string` The serial number of the pass. - **`status`** `string` Recent on-device pass status. Possible values: `installed`, `uninstalled`, `not_been_installed` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`uninstalledAt`** `string` The date and time when pass was uninstalled on the device. This value is only set if pass status is uninstalled. Format: `date-time` - **`updatedAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`url`** `string` Pass download URL. **Examples** *Example request* ```http GET /v1/tag/tag-name/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 61, "templateId": 1000057, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/61/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da012", "createdAt": "2023-04-19T06:15:01.000Z", "updatedAt": "2023-04-19T06:15:01.000Z", "status": "installed", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 51, "templateId": 1000081, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/51/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e223", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "ios" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## List tags for pass {#listtagsforpass} List tags assigned to the specified pass. See also [List tags for pass with external ID](#operation-pass-template-templateid-id-passexternalid-tags-get). [Jump to examples ↓](#listtagsforpass-examples) ### `GET /pass/{passId}/tags` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `passId` | `string` | Required | The ID of the pass you want to list tags for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** An array of tags belonging to the pass. Response body: **Content-Type:** `application/json` - **`tags`** `array[object]` An array of tags associated with the pass. **Examples** *Example request* ```http GET /v1/pass/123/tags HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "tags": [ { "id": 72, "createdAt": "2013-07-10T11:38:06Z", "name": "tag-2971-4280-479" }, { "id": 73, "createdAt": "2013-07-10 11:52:20Z", "name": "tag-1049-2951-9529" }, { "id": 74, "createdAt": "2013-07-10 11:59:32Z", "name": "tag-385-9612-723" }, { "id": 75, "createdAt": "2013-07-10 12:00:18Z", "name": "tag-5784-6282-8767" }, { "id": 76, "createdAt": "2013-07-10 12:00:55Z", "name": "tag-1050-1982-8211" }, { "id": 77, "createdAt": "2013-07-10 12:02:09Z", "name": "tag-5040-8715-7744" } ] } ``` --- ## List tags for pass with external ID {#gettagsforpassexternalid} List tags assigned to the specified pass. See also [List tags for pass](#operation-pass-passid-tags-get). [Jump to examples ↓](#gettagsforpassexternalid-examples) ### `GET /pass/template/{templateId}/id/{passExternalId}/tags` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the pass that you want to get tags for. | | `passExternalId` | `string` | Required | The external ID of the pass you want to list tags for. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** An array of tags belonging to the pass. Response body: **Content-Type:** `application/json` - **`tags`** `array[object]` An array of tags associated with the pass. **Examples** *Example request* ```http GET /v1/pass/template/123/id/mypass/tags HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "tags": [ { "id": 72, "createdAt": "2013-07-10T11:38:06Z", "name": "tag-2971-4280-479" }, { "id": 73, "createdAt": "2013-07-10 11:52:20Z", "name": "tag-1049-2951-9529" }, { "id": 74, "createdAt": "2013-07-10 11:59:32Z", "name": "tag-385-9612-723" }, { "id": 75, "createdAt": "2013-07-10 12:00:18Z", "name": "tag-5784-6282-8767" }, { "id": 76, "createdAt": "2013-07-10 12:00:55Z", "name": "tag-1050-1982-8211" }, { "id": 77, "createdAt": "2013-07-10 12:02:09Z", "name": "tag-5040-8715-7744" } ] } ``` --- ## Remove tag from a pass {#removetagfrompass} Remove a tag from the specified pass. [Jump to examples ↓](#removetagfrompass-examples) ### `DELETE /tag/{tag}/pass/{pass}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag you want to remove from the pass. | | `pass` | `string` | Required | The pass you want to remove the tag from. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{pass}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response includes the ID of the removed tag and the ID of the pass it was removed from. Response body: **Content-Type:** `application/json` - **`passId`** `integer` The ID of the pass that the tag was removed from. - **`status`** `string` The operation was successful. Possible values: `success` - **`tagId`** `integer` The ID of the removed tag. **Examples** *Example request* ```http DELETE /v1/tag/tag-name/pass/123 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/tag/tag-name/pass/id/123 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "passId": 123, "status": "success", "tagId": 70 } ``` --- ## Remove tag from all passes {#removetagfromallpasses} Remove a tag from all of its passes. [Jump to examples ↓](#removetagfromallpasses-examples) ### `DELETE /tag/{tag}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag you want to remove. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns a count of the affected passes. Response body: **Content-Type:** `application/json` - **`count`** `integer` The number of passes the tag was removed from. - **`status`** `string` The operation was successful. Possible values: `success` - **`tagId`** `integer` The ID of the deleted tag. **Examples** *Example request* ```http DELETE /v1/tag/tag-name/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "count": 38, "status": "success", "tagId": 2 } ``` --- ## Update passes by tag {#updatepassesfortags} Update all of the passes that have a given tag. [Jump to examples ↓](#updatepassesfortags-examples) ### `PUT /tag/{tag}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `tag` | `string` | Required | The tag associated with the passes you want to update. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Provide only the fields you want to update. **Content-Type:** `application/json` - **`fields`** `object` **Responses** **`200`** A successful request returns a [`ticketId`](/docs/developer/rest-api/wallet/operations/tickets/). Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` **Examples** *Example request* ```http PUT /v1/tag/tag-name/passes HTTP/1.1 Authorization: Basic Content-Type: application/json Api-Revision: 1.2 { "fields": { "secondary1": { "value": "12/31/2013" }, "primary1": { "value": "$2 Off" } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "ticketId": 123 } ``` --- ## Update tags for pass with external ID {#updatetagsforpassexternalid} Assign or update tags on a pass with an external ID. [Jump to examples ↓](#updatetagsforpassexternalid-examples) ### `PUT /pass/template/{templateId}/id/{passExternalId}/tags` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template of the pass that you want to apply tags to. | | `passExternalId` | `string` | Required | The external ID of the pass you want to apply tags to. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** An array of tags that you want to associate with the pass. **Content-Type:** `application/json` - **`tags`** `array[string]` **REQUIRED** An array of strings, each string representing a tag. Max items: 15 **Responses** **`200`** Lists the tags added to the pass. Response body: **Content-Type:** `application/json` - **`mappings`** `integer` The number of tags added. - **`newTags`** `array[string]` A list of tags successfully added to the pass. **`404`** The pass or template ID does not exist. **Examples** *Example request* ```http PUT /v1/pass/template/123/id/mypass/tags HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "tags": ["tag-name"] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "newTags": ["tag-name"], "mappings": 1 } ``` --- # Templates > A template determines the format, style, field placement, and default values for passes. You must specify a template when creating passes or adaptive links. {{< note >}} The `Create Template` and `Update Template` calls expect a different data structure than the response from a `Get Template` call. {{< /note >}} ## Add locations to template {#addlocationstotemplate} Add locations to the specified template. [Jump to examples ↓](#addlocationstotemplate-examples) ### `POST /template/{templateId}/locations` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template you want to add locations to. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** A request includes an array of locations. **Content-Type:** `application/json` - **`Locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> **Responses** **`200`** A successful request returns the locations on the pass. Response body: **Content-Type:** `application/json; charset=utf-8` Type: `array` **Examples** *Example request* ```http POST /v1/template/12345/locations HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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" } ] } ``` *Example request with external ID* ```http POST /v1/template/id/myTemplate/locations HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "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" } ] } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 [ { "locationId": 65, "value": { "region": "CA", "regionCode": "94404", "relevantText": "Hello loc0", "streetAddress1": "address line #1", "streetAddress2": "address line #2", "longitude": -122.374, "latitude": 37.618, "city": "San Francisco" }, "fieldId": 1842 } ] ``` --- ## Create template {#createtemplate} Create a template within the specified project. A template is specific to a vendor platform, Apple or Google. See also [Create template with external ID](#operation-template-projectid-id-templateexternalid-post). [Jump to examples ↓](#createtemplate-examples) ### `POST /template/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `projectId` of the project that will contain the new template. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** The request body is structured by the platform `vendor` your template and subsequent passes are intended for. **Content-Type:** `application/json` **One of:** - [Apple Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#iostemplate) A complete iOS template includes template meta information, headers, and fields. - [Google Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googletemplate) A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. **Responses** **`200`** A response returns the template's unique identifier. Use this `templateId` to reference the template in subsequent operations. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example Apple template* ```http POST /v1/template/1234 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "headers": { "logo_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": 1, "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": 1, "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": 1, "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(49,159,196)" } }, "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true }, "SiteAddress": { "formatType": "Number", "changeMessage": "New stuff, just for you at %@", "order": 2, "textAlignment": "textAlignmentCenter", "fieldType": "secondary", "value": "https://www.example.com/new?custnumb=123456", "label": "personalDeals", "required": false, "hideEmpty": true }, "InStore": { "formatType": "String", "changeMessage": "Or visit your nearest store at %@", "order": 1, "fieldType": "secondary", "value": "1234 Fake St.", "label": "nearestStore", "required": false, "hideEmpty": false } }, "vendor": "Apple", "projectType": "memberCard", "projectId": 1234, "type": "Store Card", "vendorId": 1, "deleted": "False", "description": "Description", "name": "Loyalty Card", "disabled": "False", "expiryInfo": { "expiryDuration": 365 } } ``` *Example Google template* ```http POST /v1/template/12345 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "infoModuleData": { "hexFontColor": "#666666", "hexBackgroundColor": "#0096e1", "Program ID": { "label": "Program ID", "value": "12345678", "row": 0, "col": 0, "formatType": "String" }, "Tier Name": { "label": "Tier Name", "value": "Silver", "row": 0, "col": 1, "formatType": "String" }, "Last Updated": { "label": "Last Updated", "value": "Five days ago", "row": 1, "col": 0, "formatType": "String" } }, "headers": { "barcode_type": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_value": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_label": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_encoding": { "fieldType": "barcode", "value": "", "notShared": true }, "barcodeAltText": { "fieldType": "barcode", "value": "", "notShared": true } }, "textModulesData": { "Program Details": { "header": "Program Details", "body": "Some Basic Text", "row": 0, "col": 0, "formatType": "String" } }, "linksModuleData": { "Merchant Website": { "description": "Merchant Website", "uri": "http:\/\/www.example.com", "order": 1, "formatType": "URL" } }, "messageModule": { }, "imageModulesData": { }, "pointsModule": { "Tier": { "label": "Tier", "value": 2, "row": 0, "col": 1, "formatType": "Number", "numberStyle": "PKNumberStyleDecimal" }, "Points": { "label": "Points", "value": 1234, "row": 0, "col": 0, "formatType": "Number" } }, "notAssigned": { }, "titleModule": { "image": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "imageDescription": "Logo Image", "Program Name": { "label": "Program Name", "value": "UA", "row": 0, "col": 0, "formatType": "String" } }, "vendor": "Google", "projectType": "memberCard", "type": "Loyalty1", "vendorId": 2, "deleted": "False", "description": "description", "name": "Adding Google", "expiryDuration": 365 } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": 12345 } ``` --- ## Create template with external ID {#createexternaltemplate} Create a template with an external ID within the specified project. A template is specific to a vendor platform, Apple or Google. See also [Create template](/docs/developer/rest-api/wallet/operations/templates/#createtemplate). [Jump to examples ↓](#createexternaltemplate-examples) ### `POST /template/{projectId}/id/{templateExternalId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `projectId` | `string` | Required | The project you want to associate your new template with. | | `templateExternalId` | `string` | Required | The custom identifier you want to give to your new template. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** The request body is structured by the platform `vendor` your template and subsequent passes are intended for. **Content-Type:** `application/json` **One of:** - [Apple Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#iostemplate) A complete iOS template includes template meta information, headers, and fields. - [Google Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googletemplate) A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. **Responses** **`200`** A response returns the template's unique identifier. Use this `templateId` or the external ID to reference the template in subsequent operations. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example Apple template* ```http POST /v1/template/1234/id/myTemplate HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "headers": { "logo_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": 1, "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": 1, "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": 1, "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(49,159,196)" } }, "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true }, "SiteAddress": { "formatType": "Number", "changeMessage": "New stuff, just for you at %@", "order": 2, "textAlignment": "textAlignmentCenter", "fieldType": "secondary", "value": "https://www.example.com/new?custnumb=123456", "label": "personalDeals", "required": false, "hideEmpty": true }, "InStore": { "formatType": "String", "changeMessage": "Or visit your nearest store at %@", "order": 1, "fieldType": "secondary", "value": "1234 Fake St.", "label": "nearestStore", "required": false, "hideEmpty": false } }, "vendor": "Apple", "projectType": "memberCard", "projectId": 1234, "type": "Store Card", "vendorId": 1, "deleted": "False", "description": "Description", "name": "Loyalty Card", "disabled": "False", "expiryInfo": { "expiryDuration": 365 } } ``` *Example Google template* ```http POST /v1/template/project/id/someProjectExtId/id/someTemplateExtId HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "infoModuleData": { "hexFontColor": "#666666", "hexBackgroundColor": "#0096e1", "Program ID": { "label": "Program ID", "value": "12345678", "row": 0, "col": 0, "formatType": "String" }, "Tier Name": { "label": "Tier Name", "value": "Silver", "row": 0, "col": 1, "formatType": "String" }, "Last Updated": { "label": "Last Updated", "value": "Five days ago", "row": 1, "col": 0, "formatType": "String" } }, "headers": { "barcode_type": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_value": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_label": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_encoding": { "fieldType": "barcode", "value": "", "notShared": true }, "barcodeAltText": { "fieldType": "barcode", "value": "", "notShared": true } }, "textModulesData": { "Program Details": { "header": "Program Details", "body": "Some Basic Text", "row": 0, "col": 0, "formatType": "String" } }, "linksModuleData": { "Merchant Website": { "description": "Merchant Website", "uri": "http:\/\/www.example.com", "order": 1, "formatType": "URL" } }, "messageModule": { }, "imageModulesData": { }, "pointsModule": { "Tier": { "label": "Tier", "value": 2, "row": 0, "col": 1, "formatType": "Number", "numberStyle": "PKNumberStyleDecimal" }, "Points": { "label": "Points", "value": 1234, "row": 0, "col": 0, "formatType": "Number" } }, "notAssigned": { }, "titleModule": { "image": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "imageDescription": "Logo Image", "Program Name": { "label": "Program Name", "value": "UA", "row": 0, "col": 0, "formatType": "String" } }, "vendor": "Google", "projectType": "memberCard", "type": "Loyalty1", "vendorId": 2, "deleted": "False", "description": "description", "name": "Adding Google", "expiryInfo": { "expiryDuration": 365 } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": 12345 } ``` --- ## Delete location from template {#deletelocationfromtemplate} Remove a location from template. [Jump to examples ↓](#deletelocationfromtemplate-examples) ### `DELETE /template/{templateId}/location/{locationId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The template you want to remove a location from. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{templateId}` as `id/{externalId}`. | | `locationId` | `string` | Required | The ID of the location you want to remove. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** The location is deleted. Response body: **Content-Type:** `application/json; charset=utf-8` Type: `object` **Examples** *Example request* ```http DELETE /v1/template/12345/location/456 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/template/id/myTemplate/location/456 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` --- ## Delete template {#deletetemplate} Delete the specified template. [Jump to examples ↓](#deletetemplate-examples) ### `DELETE /template/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to delete. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{externalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** Returns the status of the deleted template. Response body: **Content-Type:** `application/json` - **`TemplateId`** `integer` The identifier of the deleted template. - **`status`** `string` Indicates that the request succeeded. Possible values: `success` **Examples** *Example request* ```http DELETE /v1/template/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http DELETE /v1/template/id/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "status": "Deleted", "TemplateID": "12345" } ``` --- ## Duplicate template {#duplicatetemplate} Duplicates the specified template and put it in the same project. `/v1/template/duplicate/id/(templateExternalId)` duplicates the template specified by the external ID and puts the newly created template in the same project. [Jump to examples ↓](#duplicatetemplate-examples) ### `POST /template/duplicate/{templateId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `string` | Required | The templateId of the template you want to duplicate. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns the ID of the newly created template. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example request* ```http POST /v1/template/duplicate/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 {} ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": 12346 } ``` *Example request with external ID* ```http POST /v1/template/duplicate/id/23456 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 {} ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": 23457 } ``` --- ## Get template {#gettemplate} Get the template specified by the `templateId`. To get the template payload in the same format as you would use in a `POST` or `PUT` operation, use the [/templates](/docs/developer/rest-api/wallet/operations/templates/#gettemplatesv2) endpoint instead. [Jump to examples ↓](#gettemplate-examples) ### `GET /template/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to look up. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response returns returns the identifier of the template and dates when the template was created and last updated. Response body: **Content-Type:** `application/json` **All of:** - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`id`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - `oneOf` **Examples** *Example request* ```http GET /v1/template/12345 HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Example request with external ID* ```http GET /v1/template/id/myTemplate HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response — Apple template* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "fieldsModel": { "headers": { "logo_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": 1, "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": 1, "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": 1, "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(49,159,196)" } }, "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true }, "SiteAddress": { "formatType": "Number", "changeMessage": "New stuff, just for you at %@", "order": 2, "textAlignment": "textAlignmentCenter", "fieldType": "secondary", "value": "https://www.example.com/new?custnumb=123456", "label": "personalDeals", "required": false, "hideEmpty": true }, "InStore": { "formatType": "String", "changeMessage": "Or visit your nearest store at %@", "order": 1, "fieldType": "secondary", "value": "1234 Fake St.", "label": "nearestStore", "required": false, "hideEmpty": false } } }, "templateHeader": { "vendor": "Apple", "projectType": "memberCard", "projectId": 1234, "type": "Store Card", "vendorId": 1, "deleted": "False", "id": "12345", "updatedAt": "2013-07-01T18:28:33.000Z", "description": "Description", "createdAt": "2013-07-01T18:28:33.000Z", "name": "Loyalty Card", "disabled": "False", "expiryDuration": 730 } } ``` --- ## Get template passes {#getpassesbytemplate} Get passes for a template. `/v1/template/id/{templateExternalId}/passes` get passes associated with a template identified by external ID. [Jump to examples ↓](#getpassesbytemplate-examples) ### `GET /template/{templateId}/passes` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `integer` | Required | The `templateId` of the template you want to get passes for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful request returns a paged list of passes for a particular template. Response body: **Content-Type:** `application/json` - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`passes`** `array[object]` The metadata for passes associated with the template. Each object in the array represents a pass. **`404`** Template not found. **Examples** *Example request* ```http GET /v1/template/12345/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 3, "templateId": 12345, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/3/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da051", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "uninstalled", "uninstalledAt": "2023-05-19T06:17:02.000Z", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 1, "templateId": 12345, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/1/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e253", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` *Example request with external ID* ```http GET /v1/template/id/23456/passes HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response with external ID* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "passes": [{ "id": 3, "templateId": 23456, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/3/download", "serialNumber": "aff7ffbf-04d7-4180-9da2-c790e08da051", "createdAt": "2023-04-19T06:17:01.000Z", "updatedAt": "2023-04-19T06:17:01.000Z", "status": "uninstalled", "uninstalledAt": "2023-05-19T06:17:02.000Z", "installedAt": "2023-04-19T06:17:02.000Z", "platform": "android" }, { "id": 1, "templateId": 23456, "url": "https://d720-104-177-34-165.ngrok.io/v1/pass/1/download", "serialNumber": "34b6f9de-3745-4107-99ae-3f952208e253", "createdAt": "2023-04-05T17:55:23.000Z", "updatedAt": "2023-04-05T17:55:23.000Z", "status": "installed", "installedAt": "2023-04-05T17:55:23.000Z", "platform": "android" } ], "pagination": { "order": "id", "direction": "desc", "page": 1, "start": 0, "pageSize": 2 } } ``` --- ## Get template v2 {#gettemplatesv2} Get the template specified by the `templateId`. The template payload returned will be in the same format you would use in a `POST` or `PUT` operation unlike the [/template](/docs/developer/rest-api/wallet/operations/templates/#gettemplate) endpoint. [Jump to examples ↓](#gettemplatesv2-examples) ### `GET /templates/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to look up. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Responses** **`200`** A successful response returns returns the identifier of the template and dates when the template was created and last updated. Response body: **Content-Type:** `application/json` **All of:** - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`id`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - `oneOf` **Examples** *Example request* ```http GET /templates/179229 HTTP/1.1 Authorization: Basic ``` *Example request with external ID* ```http GET /templates/id/myTemplate HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "type": "loyalty", "name": "Member Card Android", "vendorId": 2, "vendor": "Google", "projectId": 7311, "description": "Member Card Android", "projectType": "loyalty", "createdAt": "2025-09-26T20:44:15.000Z", "updatedAt": "2025-09-26T20:44:16.000Z", "id": 179229, "deleted": false, "disabled": false, "expiryInfo": { "expiryDuration": 730, "expiryNever": null }, "headers": { "barcode_value": { "fieldType": "barcode", "value": "123456789", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_encoding": { "fieldType": "barcode", "value": "iso-8859-1", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcodeAltText": { "fieldType": "barcode", "value": "", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_type": { "fieldType": "barcode", "value": "PDF_417", "formatType": "String", "label": "", "hideEmpty": false, "required": false } }, "fields": { "image": { "fieldType": "titleModule", "value": "", "formatType": "String", "label": "http://storage.googleapis.com/wallet-stag-storage-bucket/1000002/images/ff9367b7cff7cad7fa67ae2c871485e3befae602_6fc517eff2d76511c062913946b9149876a17623_Metro-Logo-1200x1200.png", "hideEmpty": false, "required": false }, "Program Points": { "fieldType": "loyaltyPoints", "value": "3600", "formatType": "Number", "label": "Member Points", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Program Details": { "fieldType": "textModulesData", "value": "Pre-Membership for Metro Members", "formatType": "String", "label": "Pre-Member Program", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Tier": { "fieldType": "acctModule", "value": "Pre-Member", "formatType": "String", "label": "Member Level", "hideEmpty": false, "required": false, "order": 2, "row": 0, "col": 1 }, "Merchant Website": { "fieldType": "linksModuleData", "value": "Merchant Website", "formatType": "URL", "label": "www.example.com.sg", "hideEmpty": false, "required": false, "order": 0 }, "Member Name": { "fieldType": "acctModule", "value": "Henry Christian", "formatType": "String", "label": "Member Name", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Loyalty Program Name": { "fieldType": "titleModule", "value": "Metro", "formatType": "String", "label": "Pre-Member", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 } }, "locations": [ ] } ``` --- ## List templates {#listtemplates} List the headers for templates you created. [Jump to examples ↓](#listtemplates-examples) ### `GET /template/headers` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `pageSize` | `number` | | Number of templates per page. Defaults to 10. | | `page` | `number` | | The page you want to retrieve. Defaults to 1. | | `order` | `string` | | The order you want the projects returned in. Defaults to `id`. Possible values: `id`, `name`, `createdAt`, `updatedAt` | | `direction` | `string` | | The values ordered ascending or descending. Defaults to `DESC`. Possible values: `ASC`, `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Responses** **`200`** A successful response includes an array of template headers for templates you created. Look up an individual template to see field and header information for any individual template. Response body: **Content-Type:** `application/json; charset=utf-8` - **`count`** `string` The total number of results. - **`pagination`** `object` <[Pagination object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#paginationobject)> Contains information about pagination, according to your query parameters. - **`templateHeaders`** `array` A list of template header objects. **All of:** - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`id`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - [General template headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#templaterequestheaders) Meta information about templates; this object appears on all templates and identifies templates associated with a project. **Examples** *Example request* ```http GET /v1/template/headers HTTP/1.1 Authorization: Basic Api-Revision: 1.2 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "count": 2, "templateHeaders": [ { "vendor": "Google", "projectType": "memberCard", "projectId": "12345", "type": "Loyalty1", "vendorId": "2", "deleted": "False", "id": "12344", "updatedAt": "2013-07-01T18:28:54.000Z", "description": "description", "createdAt": "2013-07-01T18:28:54.000Z", "name": "New Wallet Template", "disabled": "False", "expiryDuration": 730 }, { "vendor": "Apple", "projectType": "memberCard", "projectId": "12346", "type": "Store Card", "vendorId": "1", "deleted": "False", "id": "12345", "updatedAt": "2013-07-01T18:28:33.000Z", "description": "Description", "createdAt": "2013-07-01T18:28:33.000Z", "name": "Loyalty Card", "disabled": "False", "expiryDuration": 730 } ], "pagination": { "order": "id", "page": 1, "start": 0, "direction": "DESC", "pageSize": 10 } } ``` --- ## Patch template {#patchtemplates} Update the template with the `overrides` object, performing a partial update. In the payload, you only need to provide the fields in your template that you want to override. [Jump to examples ↓](#patchtemplates-examples) ### `PATCH /templates/{id}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to update. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Request body** The structure of your template is determined by the device/wallet vendor you create passes for. **Content-Type:** `application/json` **One of:** - [Apple Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#iostemplate) A complete iOS template includes template meta information, headers, and fields. - [Google Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googletemplate) A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. **Responses** **`200`** A response returns the template's unique identifier. Use this `templateId` to reference the template in subsequent operations. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example patch template* ```http PATCH /templates/179229 HTTP/1.1 Authorization: Basic Content-Type: application/json { "fields" : { "Loyalty Program Name": { "fieldType": "titleModule", "value": "MVP", "formatType": "String", "label": "program", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "type": "loyalty", "name": "Member Card Android", "vendorId": 2, "vendor": "Google", "projectId": 7311, "description": "Member Card Android", "projectType": "loyalty", "createdAt": "2025-09-26T20:44:15.000Z", "updatedAt": "2025-09-26T20:44:16.000Z", "id": 179229, "deleted": false, "disabled": false, "expiryInfo": { "expiryDuration": 730, "expiryNever": null }, "headers": { "barcodeAltText": { "fieldType": "barcode", "value": "", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_type": { "fieldType": "barcode", "value": "PDF_417", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_value": { "fieldType": "barcode", "value": "123456789", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_encoding": { "fieldType": "barcode", "value": "iso-8859-1", "formatType": "String", "label": "", "hideEmpty": false, "required": false } }, "fields": { "image": { "fieldType": "titleModule", "value": "", "formatType": "String", "label": "http://storage.googleapis.com/wallet-stag-storage-bucket/1000002/images/ff9367b7cff7cad7fa67ae2c871485e3befae602_6fc517eff2d76511c062913946b9149876a17623_Metro-Logo-1200x1200.png", "hideEmpty": false, "required": false }, "Program Points": { "fieldType": "loyaltyPoints", "value": "3600", "formatType": "Number", "label": "Member Points", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Program Details": { "fieldType": "textModulesData", "value": "Pre-Membership for Metro Members", "formatType": "String", "label": "Pre-Member Program", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Tier": { "fieldType": "acctModule", "value": "Pre-Member", "formatType": "String", "label": "Member Level", "hideEmpty": false, "required": false, "order": 2, "row": 0, "col": 1 }, "Merchant Website": { "fieldType": "linksModuleData", "value": "Merchant Website", "formatType": "URL", "label": "www.example.com.sg", "hideEmpty": false, "required": false, "order": 0 }, "Member Name": { "fieldType": "acctModule", "value": "Henry Christian", "formatType": "String", "label": "Member Name", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Loyalty Program Name": { "fieldType": "titleModule", "value": "MVP", "formatType": "String", "label": "program", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 } } } ``` --- ## Publish a bulk update to passes {#updatepassesbytemplate} Updates all passes based on a particular template. The only information you can modify on passes for the specified template ID are images, barcode data, and the following fields: * Membership ID fields * Coupon codes * Barcode values or alternative text * Any other field or image on the pass [Jump to examples ↓](#updatepassesbytemplate-examples) ### `PUT /template/{templateId}/passes` {{< important >}} Updating the `order` value for `linkModulesData` can only be done in an Event or Boarding Pass template. {{< /important >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wpas **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `templateId` | `integer` | Required | The `templateId` of the template you want to get passes for. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Query parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `status` | `string` | | Find only passes matching the installation status. * `installed` — passes currently installed. * `uninstalled` — passes that have been uninstalled. * `been_installed` — passes that have been either installed or uninstalled. * `not_been_installed` — passes that have never been installed. Possible values: `installed`, `uninstalled`, `been_installed`, `not_been_installed` | | `pageSize` | `integer` | | The number of passes per page. Defaults to 10. Default: `10` | | `page` | `integer` | | The page of results you want to retrieve, starting at 1. Default: `1` | | `order` | `string` | | The order you want passes returned in, defaulting to `id`. Possible values: `id`, `createdAt`, `updatedAt` Default: `id` | | `direction` | `string` | | Determines whether to return values in ascending or descending order. Defaults to `DESC`. Possible values: `ASC`, `DESC` Default: `DESC` | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** Specify the fields you want to update. Any field you do not specify in this payload remains unchanged. **Content-Type:** `application/json` - **`fields`** `object` **Responses** **`200`** Returns a ticket ID as a reference for the update operation. Response body: **Content-Type:** `application/json` - **`ticketId`** `integer` A ticket you can use to reference this operation for status, troubleshooting, or logging purposes. **`404`** Template with ID `templateId` was not found. **Examples** *Example request* ```http PUT /v1/template/12345/passes HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "fields": { "Member Name": { "value": "Jack Handey" }, "barcode_value": { "value": "55555" }, "Points": { "value": 1000 } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "ticketId": 56789 } ``` --- ## Update template {#updatetemplate} Update the specified template. This endpoint takes any of the parameters used for Creating a Template. You can also add or remove fields from the template with this call by adding or omitting those fields from the request. To update the template payload in the same format as you would use in a `POST` or `PUT` operation, use the [/templates](/docs/developer/rest-api/wallet/operations/templates/#updatetemplatesv2) endpoint instead. [Jump to examples ↓](#updatetemplate-examples) ### `PUT /template/{id}` {{< note >}} Provide a complete template object when updating a template. This call replaces the existing template object in its entirety. You must include all keys and fields that should remain in the template, otherwise they are removed. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to update. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Request headers:** | Name | Type | Required | Description | |------|------|----------|-------------| | `Api-Revision` | `string` | Required | The particular API revision you want to use. In general, this is `1.2`. Possible values: `1.2` | **Request body** The structure of your template is determined by the device/wallet vendor you create passes for. **Content-Type:** `application/json` **One of:** - [Apple Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#iostemplate) A complete iOS template includes template meta information, headers, and fields. - [Google Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googletemplate) A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. **Responses** **`200`** A response returns the template's unique identifier. Use this `templateId` to reference the template in subsequent operations. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example request — Apple template* ```http PUT /v1/template/12345 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "headers": { "logo_color": { "formatType": "1", "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": "1", "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": "1", "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": "1", "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": "1", "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": "1", "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": "1", "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": "1", "fieldType": "topLevel", "value": "rgb(49,159,196)" } }, "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true }, "SiteAddress": { "formatType": "Number", "changeMessage": "New stuff, just for you at %@", "order": 2, "textAlignment": "textAlignmentCenter", "fieldType": "secondary", "value": "https://www.example.com/new?custnumb=123456", "label": "personalDeals", "required": false, "hideEmpty": true }, "InStore": { "formatType": "String", "changeMessage": "Or visit your nearest store at %@", "order": 1, "fieldType": "secondary", "value": "1234 Fake St.", "label": "nearestStore", "required": false, "hideEmpty": false } }, "beacons":[ { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 2, "minor": 346 } ], "vendor": "Apple", "projectType": "memberCard", "projectId": "1234", "type": "Store Card", "vendorId": "1", "deleted": "False", "description": "Description", "name": "Loyalty Card (Edited)", "disabled": "False" } ``` *Example request with external ID - Google template* ```http PUT /v1/template/id/12345 HTTP/1.1 Content-Type: application/json Authorization: Basic Api-Revision: 1.2 { "infoModuleData": { "hexFontColor": "#666666", "hexBackgroundColor": "#0096e1", "Program ID": { "label": "Program ID", "value": "12345678", "row": 0, "col": 0, "formatType": "String" }, "Tier Name": { "label": "Tier Name", "value": "Silver", "row": 0, "col": 1, "formatType": "String" }, "Last Updated": { "label": "Last Updated", "value": "Five days ago", "row": 1, "col": 0, "formatType": "String" } }, "headers": { "barcode_type": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_value": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_label": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_encoding": { "fieldType": "barcode", "value": "", "notShared": true }, "barcodeAltText": { "fieldType": "barcode", "value": "", "notShared": true } }, "textModulesData": { "Program Details": { "header": "Program Details", "body": "Some Basic Text", "row": 0, "col": 0, "formatType": "String" } }, "linksModuleData": { "Merchant Website": { "description": "Merchant Website", "uri": "http:\/\/www.example.com", "order": 1, "formatType": "URL" } }, "messageModule": { }, "imageModulesData": { }, "pointsModule": { "Tier": { "label": "Tier", "value": 2, "row": 0, "col": 1, "formatType": "Number", "numberStyle": "PKNumberStyleDecimal" }, "Points": { "label": "Points", "value": 1234, "row": 0, "col": 0, "formatType": "Number" } }, "notAssigned": { }, "titleModule": { "image": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "imageDescription": "Logo Image", "Program Name": { "label": "Program Name", "value": "UA", "row": 0, "col": 0, "formatType": "String" } }, "vendor": "Google", "projectType": "memberCard", "type": "Loyalty1", "vendorId": 2, "deleted": "False", "description": "description", "name": "Adding Google" } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": "12345" } ``` --- ## Update template v2 {#updatetemplatesv2} Update the template with the whole resource specified in the request, performing a complete replacement. You can also add or remove fields from the template with this call by adding or omitting those fields from the request. The template payload will be in the same format as in a `POST` or `PUT` operation, unlike the [/template](/docs/developer/rest-api/wallet/operations/templates/#updatetemplate) endpoint. [Jump to examples ↓](#updatetemplatesv2-examples) ### `PUT /templates/{id}` {{< note >}} Provide a complete template object when updating a template. This call replaces the existing template object in its entirety. You must include all keys and fields that should remain in the template, otherwise they will be removed. {{< /note >}} **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) - [oauth2Token]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-oauth2Token): wtmp **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | `string` | Required | The `templateId` of the template you want to update. For [External IDs](/docs/developer/rest-api/wallet/introduction/#external-ids), format the `{id}` as `id/{templateExternalId}`. | **Request body** The structure of your template is determined by the device/wallet vendor you create passes for. **Content-Type:** `application/json` **One of:** - [Apple Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#iostemplate) A complete iOS template includes template meta information, headers, and fields. - [Google Wallet template request]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googletemplate) A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. **Responses** **`200`** A response returns the template's unique identifier. Use this `templateId` to reference the template in subsequent operations. Response body: **Content-Type:** `application/json; charset=utf-8` - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Examples** *Example request* ```http PUT /templates/12345 HTTP/1.1 Content-Type: application/json Authorization: Basic { "type": "loyalty", "name": "Member Card Android", "vendorId": 2, "vendor": "Google", "projectId": 7311, "description": "Member Card Android", "projectType": "loyalty", "deleted": false, "disabled": false, "headers": { "barcode_value": { "fieldType": "barcode", "value": "123456789", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_encoding": { "fieldType": "barcode", "value": "iso-8859-1", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcodeAltText": { "fieldType": "barcode", "value": "", "formatType": "String", "label": "", "hideEmpty": false, "required": false }, "barcode_type": { "fieldType": "barcode", "value": "PDF_417", "formatType": "String", "label": "", "hideEmpty": false, "required": false } }, "fields": { "image": { "fieldType": "titleModule", "value": "Image description for title image" "formatType": "String", "label": "http://storage.googleapis.com/wallet-stag-storage-bucket/1000002/images/ff9367b7cff7cad7fa67ae2c871485e3befae602_6fc517eff2d76511c062913946b9149876a17623_Metro-Logo-1200x1200.png", "hideEmpty": false, "required": false }, "Program Points": { "fieldType": "loyaltyPoints", "value": "3600", "formatType": "Number", "label": "Member Points", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Program Details": { "fieldType": "textModulesData", "value": "Pre-Membership for Metro Members", "formatType": "String", "label": "Pre-Member Program", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Tier": { "fieldType": "acctModule", "value": "Pre-Member", "formatType": "String", "label": "Member Level", "hideEmpty": false, "required": false, "order": 2, "row": 0, "col": 1 }, "Merchant Website": { "fieldType": "linksModuleData", "value": "Merchant Website", "formatType": "URL", "label": "www.example.com.sg", "hideEmpty": false, "required": false, "order": 0 }, "Member Name": { "fieldType": "acctModule", "value": "Henry Christian", "formatType": "String", "label": "Member Name", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 }, "Loyalty Program Name": { "fieldType": "titleModule", "value": "Metro", "formatType": "String", "label": "Pre-Member", "hideEmpty": false, "required": false, "order": 1, "row": 0, "col": 0 } } } ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "templateId": 179229 } ``` --- # Tickets > Return status information about tickets or the server itself. For operations that cannot complete immediately, the system returns a `ticketId`. You can look up this `ticketId` to determine the true status of the operation. ## Check system status {#getsystemstatus} Ensure that you can make a connection to the Wallet API. [Jump to examples ↓](#getsystemstatus-examples) ### `GET /system/status` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Responses** **`200`** You have successfully established a connection with the server. Response body: **Content-Type:** `application/json` - **`Hello`** `string` A "Hello World" response tells you that everything is Ok. Possible values: `World` **Examples** *Example request* ```http GET /v1/system/status HTTP/1.1 ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "Hello": "World" } ``` --- ## Get ticket status {#getticketstatus} Get the status of a ticket. Some operations can't complete immediately and return a `ticketId`. Use this item to determine the true status of the operation. [Jump to examples ↓](#getticketstatus-examples) ### `GET /ticket/{ticketId}` **Security:** - [httpBasic]({{< ref "/developer/rest-api/wallet/introduction/" >}}#security-httpBasic) **Path parameters:** | Name | Type | Required | Description | |------|------|----------|-------------| | `ticketId` | `string` | Required | The ticket you want to know the status of. | **Responses** **`200`** Returns the status of a ticket. Response body: **Content-Type:** `application/json` - **`ID`** `integer` The identifier of the ticket. - **`children`** `object` - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`status`** `string` The status of the ticket. **Examples** *Example request* ```http GET /v1/ticket/123 HTTP/1.1 Authorization: Basic ``` *Response* ```http HTTP/1.1 200 OK Content-Type: application/json { "Status": "COMPLETED", "createdAt": "2013-03-28 18:18:36.0", "ID": 123, "children": { "...": "..." } } ``` --- ## Data Formats JSON schemas for API requests and responses. Schemas define the structure, types, and validation rules for data exchanged with the API. # Adaptive Links > Adaptive links detect the user's platform and install the correct pass for their device vendor. An adaptive link can specify an Apple and Google template. ## Adaptive Link request {#adaptivelinkrequest} An adaptive link request contains identifiers for the templates you used to generate passes from the link and any fields you want to set when users create passes from the link. If you need to create a boarding pass adaptive link, go to the [boarding pass object](/docs/developer/rest-api/wallet/schemas/flights-and-boarding-passes/). [Jump to examples ↓](#adaptivelinkrequest-examples) **All of:** - **`androidTemplateExternalId`** `string` The custom identifier of the Google template for passes issued from this adaptive link. - **`androidTemplateId`** `integer` The Google template for passes issued from the adaptive link. - **`availablePasses`** `integer` The total number of passes that can be created from this link. If absent, the link supports 1,000,000 passes. Default: `1000000` - **`iosTemplateExternalId`** `string` The custom identifier of the Apple template for passes issued from the adaptive link, if assigned. - **`iosTemplateId`** `integer` The iOS template for passes issued from the adaptive link. - **`isPersonalized`** `boolean` If true, each request (when a recipient uses an adaptive link) generates a new pass. You can update any of the individual passes generated from the adaptive link. If you generate the adaptive link using any request parameters, `isPersonalized` is automatically set to `true`. If false, only the first request generates a pass; subsequent requests generate a new instance of the same pass. When `isPersonalized` is `false`, you cannot update passes generated from an adaptive link by updating the adaptive link itself. Rather, you must use the Bulk Update Passes endpoint to push updates to the pass instances generated from the adaptive link. - **`landingPageUrl`** `string` The address users are redirected to if their device type cannot be detected or they cannot install the pass for another reason. Format: `url` - **`parameterEncoding`** `string` When set, allows url-encoded parameters to set or modify values when creating passes from the adaptive link. Possible values: `base64` - **`androidPassLinkId`** `string` A dynamic link for Android passes. Format: `uuid` - **`expirationDate`** `string` When set, indicates the date this adaptive link expires. An expired adaptive link will return a JSON object with an error message instead of a pass. Format: `date-time` - **`installLimit`** `integer` The number of times a user can install the pass. When the pass reaches its limit, attempts to install the pass are met with errors. This limit only affects the adaptive link itself, not actual Apple pass files. If you want to prevent users from installing shared passes on Apple devices, you should also set `sharingStatus` to prohibit sharing. - **`installLimitPerPassExternalId`** `integer` The number of times a user can install the pass that has an `externalId`. When the pass reaches its limit, attempts to install the pass are met with errors. This limit only affects the adaptive link itself, not actual Apple pass files. If you want to prevent users from installing shared passes on Apple devices, you should also set `sharingStatus` to prohibit sharing. - **`iosPassLinkId`** `string` A dynamic link for iOS passes. Format: `uuid` - **`locationRadius`** `integer` Determines the range, in miles, that a pass holder can be from a location to associate their pass with a location. If absent, the default location radius is 10 miles. Write only: true - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> An array of up to 10,000 locations associated with the adaptive link. Each pass supports up to 10 locations. If you exceed this limit, the passes will use the 10 locations nearest to a user (located by IP address) when they install the pass. You can also include a location radius and the maximum number of locations to be matched upon pass creation. Wallet sorts locations to be matched in order from closest to/furthest from the location provided by the device. Write only: true - **`maxResultLocations`** `integer` The maximum number of locations the pass recipient can match. If the pass holder matches multiple locations, locations are returned in order from closest to farthest. - **`payload`** `object` **REQUIRED** The field names and values you want to update for those pass fields. Changing a value will result in a change message notifying the user of the changed value. While the payload object is required, it can be an empty object. Write only: true **OBJECT PROPERTIES** - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` **Used in:** - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createadaptivelink) - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalid) - [Create Adaptive Link in project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalprojectid) - [Update Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#updateadaptivelink) **Examples** *Example Adaptive Link* ```json { "iosTemplateId": 12345, "androidTemplateId": 154321, "isPersonalized": "true", "iosPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "androidPassLinkId": "44e128a5-ac7a-4c9a-be4c-224b6bf81b20", "landingPageUrl": "https://example.com/landing.html", "expirationDate": "2022-10-01", "availablePasses": 100000, "ttlInDays": 30, "parameterEncoding": "base64", "locationRadius": 10, "maxResultLocations": 5, "payload": {}, "locations": [ { "latitude": 45.5898, "longitude": -122.5951, "city": "Portland", "country": "US", "region": "OR", "regionCode": "97218", "relevantText": "Welcome to Portland... Voodoo Donuts is only 11 miles away", "streetAddress1": "7000 NE Airport Way" }, { "latitude": 45.525492, "longitude": -122.686092, "city": "San Francisco", "country": "US", "region": "CA", "regionCode": "94104", "relevantText": "Welcome to the Ship!", "streetAddress1": "548 Market St. Suite 698370", "streetAddress2": "" }, { "latitude": 45.5205, "longitude": -122.6788, "relevantText": "See you at dinner tonight...or did you already fill up on donuts?" } ] } ``` --- ## Adaptive Link response {#adaptivelinkresponse} An adaptive link response includes URLs that users can access to detect and install a pass. [Jump to examples ↓](#adaptivelinkresponse-examples) **All of:** - **`androidTemplateExternalId`** `string` The custom identifier of the Google template for passes issued from this adaptive link. - **`androidTemplateId`** `integer` The Google template for passes issued from the adaptive link. - **`availablePasses`** `integer` The total number of passes that can be created from this link. If absent, the link supports 1,000,000 passes. Default: `1000000` - **`iosTemplateExternalId`** `string` The custom identifier of the Apple template for passes issued from the adaptive link, if assigned. - **`iosTemplateId`** `integer` The iOS template for passes issued from the adaptive link. - **`isPersonalized`** `boolean` If true, each request (when a recipient uses an adaptive link) generates a new pass. You can update any of the individual passes generated from the adaptive link. If you generate the adaptive link using any request parameters, `isPersonalized` is automatically set to `true`. If false, only the first request generates a pass; subsequent requests generate a new instance of the same pass. When `isPersonalized` is `false`, you cannot update passes generated from an adaptive link by updating the adaptive link itself. Rather, you must use the Bulk Update Passes endpoint to push updates to the pass instances generated from the adaptive link. - **`landingPageUrl`** `string` The address users are redirected to if their device type cannot be detected or they cannot install the pass for another reason. Format: `url` - **`parameterEncoding`** `string` When set, allows url-encoded parameters to set or modify values when creating passes from the adaptive link. Possible values: `base64` - **`adaptiveLinkId`** `integer` A unique identifier for the adaptive link. Use this value to reference the adaptive link in future operations. Read only: true - **`androidPassLinkId`** `string` A dynamic link for Android passes. This field cannot be provided for `links/adaptive/multiple` requests, nor is it provided in those responses (e.g., boarding passes, event tickets, etc.). Format: `uuid` - **`androidUrl`** `string` A pass URL specific to Android users. Format: `url` Read only: true - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`expirationDate`** `string` The date this adaptive link expires. This property appears in the response only if it has been explicitly set with a previous API request. Cannot be set to a date more than 1,080 days in the future. Format: `date` - **`iosPassLinkId`** `string` A dynamic link for iOS passes. This field cannot be provided for `links/adaptive/multiple` requests, nor is it provided in those responses (e.g., boarding passes, event tickets, etc.). Format: `uuid` - **`iosUrl`** `string` A pass URL specific to iOS users. Format: `url` Read only: true - **`isExpired`** `boolean` If true, the adaptive link is expired. An expired adaptive link will return a JSON object with an error message instead of a pass. - **`projectId`** `integer` The ID of the project. - **`ttlInDays`** `integer` The number of days of inactivity before this adaptive link automatically expires. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`url`** `string` The adaptive link URL itself; using this URL on an Android or iOS device will detect device types and install the correct pass. Format: `url` Read only: true **Used in:** - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createadaptivelink) - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalid) - [Create Adaptive Link in project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalprojectid) - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Get Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#getadaptivelinkexternalid) - [Get Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#getadaptivelink) - [Get Adaptive Link from project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#getadaptivelinkexternalprojectid) - [List Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#listadaptivelinks) - [List Adaptive Links for a project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#listadaptivelinksforproject) - [List Adaptive Links for a template]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#listadaptivelinksfortemplate) - [Update Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#updateadaptivelink) **Examples** *Example Adaptive Link response object* ```json { "adaptiveLinkId": "abchd345678", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "landingPageUrl": "https://example.com/landing.html", "isPersonalized": "true", "isExpired": true, "expirationDate": "2020-10-01", "availablePasses": 100000, "ttlInDays": 730 } ``` --- # Audience selection > Select an audience of passes for scheduled updates or other operations. ## Atomic selector {#atomicselector} Determines the property type you want to target. This can be tag, segment, template, pass or externalId. [Jump to examples ↓](#atomicselector-examples) - **`externalId`** `string[string]` The pass external ID. Must also include a template. Example: `1234` - **`passId`** `number[number]` The pass ID. Example: `1234` - **`segment`** `array[string]` The segment ID. Example: `00256e0b-b02f-4f12-a77f-4c3d57078330` - **`tag`** `array[string]` A tag is arbitrary metadata string used to identify and target passes. Example: `cool_tag,cool_cool_tag` - **`templateId`** `number[string]` The template ID. Example: `1234` **Used in:** - [Get schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#getschedule) - [List schedules]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#listschedules) - [Schedule an update or push notification]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#scheduleupdate) - [Update schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#updateschedule) **Examples** *Example atomic selector tag* ```json { "audience": { "tag": "TZ_PST" } } ``` *Example atomic selector segment* ```json { "audience": { "segment": "3b13666df-e5b3-4e42-8919-f8d63bd7ce2a" } } ``` *Example atomic selector template* ```json { "audience": { "templateId": 1234 } } ``` *Example atomic selector pass* ```json { "audience": { "passId": 1234 } } ``` *Example atomic selector external ID* ```json { "audience": { "and": [ { "externalId": "test_ext_id" }, { "templateId": "12345" } ] } } ``` --- ## Audience selector {#audienceselector} Determines the passes you want to target. [Jump to examples ↓](#audienceselector-examples) **One of:** - [Compound selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#compoundselector) Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors. The syntax can be either implicit, using an array of values associated with an atomic selector, or explicit, employing a boolean operator followed by an array of atomic expression objects. - [Atomic selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#atomicselector) Determines the property type you want to target. This can be tag, segment, template, pass or externalId. - `string` All passes. **Used in:** - [Get schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#getschedule) - [List schedules]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#listschedules) - [Schedule an update or push notification]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#scheduleupdate) - [Update schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#updateschedule) **Examples** *Example pass objects tagged for baseball or basketball and in time zone PST* ```json { "audience": { "AND": [ { "OR": [ { "tag": "baseball" }, { "tag": "basketball" } ] }, { "tag": "TZ_PST" } ] } } ``` *Example pass objects tagged for time zone ET and not for time zone PST* ```json { "audience": { "AND": [ { "tag": "TZ_ET" }, { "NOT": { "tag": "TZ_PST" } } ] } } ``` --- ## Compound selector {#compoundselector} Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors. The syntax can be either implicit, using an array of values associated with an atomic selector, or explicit, employing a boolean operator followed by an array of atomic expression objects. [Jump to examples ↓](#compoundselector-examples) **One of:** - [Atomic selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#atomicselector) Determines the property type you want to target. This can be tag, segment, template, pass or externalId. AND selector - **`AND`** `array` **One of:** - [Compound selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#compoundselector) Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors. The syntax can be either implicit, using an array of values associated with an atomic selector, or explicit, employing a boolean operator followed by an array of atomic expression objects. - [Atomic selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#atomicselector) Determines the property type you want to target. This can be tag, segment, template, pass or externalId. OR selector - **`OR`** `array` **One of:** - [Compound selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#compoundselector) Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors. The syntax can be either implicit, using an array of values associated with an atomic selector, or explicit, employing a boolean operator followed by an array of atomic expression objects. - [Atomic selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#atomicselector) Determines the property type you want to target. This can be tag, segment, template, pass or externalId. NOT selector - **`NOT`** `array` **One of:** - [Compound selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#compoundselector) Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors. The syntax can be either implicit, using an array of values associated with an atomic selector, or explicit, employing a boolean operator followed by an array of atomic expression objects. - [Atomic selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#atomicselector) Determines the property type you want to target. This can be tag, segment, template, pass or externalId. **Used in:** - [Get schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#getschedule) - [List schedules]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#listschedules) - [Schedule an update or push notification]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#scheduleupdate) - [Update schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#updateschedule) **Examples** *Example implicit OR* ```json { "audience": { "tag": [ "apples", "oranges", "bananas" ] } } ``` *Example explicit OR* ```json { "audience": { "OR": [ { "tag": "apples" }, { "tag": "oranges" }, { "tag": "bananas" } ] } } ``` --- # Event tickets > Schemas for creating events and event ticket adaptive links. An event ticket includes both event information and an array of attendees. ## Attendees {#attendees} An array of attendees for an event. Each object in the array represents a single attendee. [Jump to examples ↓](#attendees-examples) - **`adaptiveLinkExternalId`** `string` A custom identifier for a particular attendee's adaptive link. - **`fields`** `object` The information about or for the individual attendee's event ticket. **OBJECT PROPERTIES** - **`barcodeAltText`** `object` <[Pass field updates]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#fields)> Like other pass creation operations, when providing barcode information, you need only provide the value. When updating a field on a pass or an adaptive link, you need only provide the following items. You cannot update the position of the field or other information held by the template — only the field label, value, and the message the user receives when their pass is updated. - **`barcode_value`** `object` <[Pass field updates]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#fields)> Like other pass creation operations, when providing barcode information, you need only provide the value. When updating a field on a pass or an adaptive link, you need only provide the following items. You cannot update the position of the field or other information held by the template — only the field label, value, and the message the user receives when their pass is updated. - **`confirmationCode`** `object` The confirmation code for the ticket holder's event reservation. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`faceValue`** `object` The face value of the ticket, matching what would be printed on a physical version of the ticket. **OBJECT PROPERTIES** - **`currencyCode`** `string` Determines the type of currency if the `formatType` is set to `currency`. Possible values: `USD`, `EUR`, `CNY`, `JPY`, `GPB`, `RUB`, `AUD`, `CHF`, `CAD`, `HKD`, `SEK`, `NZD`, `KRW`, `SGD`, `NOK`, `MXN`, `INR` - **`micros`** `integer` The face value amount in micros. Format: `int64` - **`gate`** `object` The gate the ticket holder should use to enter the venue. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`row`** `object` The row of the ticket holder's seat. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`seat`** `object` The seat number for the ticket holder. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`section`** `object` The section that the ticket holder's seat is in. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` - **`ticketHolderName`** `object` The name of the ticket holder, if the ticket is assigned to a person. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`ticketNumber`** `object` The number of the ticket. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. - **`ticketType`** `object` The type of ticket, if applicable. Use this field to include information like "Adult", "Child", "VIP", etc. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` The value for this field. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Array of attendees* ```json { "attendees": [ { "adaptiveLinkExternalId": "abch3ExtId4", "fields": { "ticketHolderName": { "label": "Name", "value":"SMITH/SAM" }, "seat": { "value":"11" }, "ticketType": { "value":"VIP" }, "ticketNumber": { "value":"20595923485" }, "barcode_value": { "value": "1237" }, "barcodeAltText": { "value": "1237" }, "faceValue": { "value": "100" } } }, { "adaptiveLinkExternalId": "abch3ExtId5", "fields":{ "ticketHolderName": { "label": "Name", "value":"SMITH/MARY" }, "seat": { "value":"12" }, "ticketType": { "value":"VIP" }, "ticketNumber": { "value":"20595923486" }, "barcode_value": { "value": "1238" }, "barcodeAltText": { "value": "1238" }, "faceValue": { "value": "100" } } }, { "fields": { "ticketHolderName": { "label": "Name", "value":"SMITH/SARA" }, "seat":{ "value":"13" }, "ticketType":{ "value":"VIP" }, "ticketNumber":{ "value":"20595923487" }, "barcode_value": { "value": "1239" }, "barcodeAltText": { "value": "1239" }, "faceValue": { "value": "100" } } } ] } ``` --- ## Event request {#eventrequest} Represents an event scheduled at a specific time and venue. [Jump to examples ↓](#eventrequest-examples) - **`fields`** `object` **REQUIRED** Contains the objects representing an event. **OBJECT PROPERTIES** - **`doorsOpen`** `object` The date and time when ticket holders can begin to enter the venue. **OBJECT PROPERTIES** - **`label`** `string` The title for this event field as you want it to appear on a pass. Defaults to `Doors Open`. Example: `Doors Open` - **`value`** `string` Format: `date-time` - **`endTime`** `object` The date and time when the event ends. **OBJECT PROPERTIES** - **`label`** `string` The title for this event field, as you want it to appear on a pass. Defaults to `End Time`. Example: `End Time` - **`value`** `string` Format: `date-time` - **`eventName`** `object` **REQUIRED** The value represents the event name. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` - **`startTime`** `object` The date and time when the event begins. **OBJECT PROPERTIES** - **`label`** `string` The title for this event field, as you want it to appear on a pass. Defaults to `Start Time`. Example: `Start Time` - **`value`** `string` Format: `date-time` - **`venueAddress`** `object` **REQUIRED** The address of the venue. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` - **`venueTitle`** `object` **REQUIRED** The name of the venue where the event will take place. **OBJECT PROPERTIES** - **`label`** `string` The label for this field, as you want it to appear on the pass. If you do not provide a label, the event will use a default based off the parent object name. - **`value`** `string` - **`passGroups`** `array[string]` An array of eventId or eventExternalId values representing a group. You can reference the group to make changes to all associated events. You can set pass groups when creating an event or when creating an event ticket adaptive link. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#createevent) - [Create event with external ID]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#createeventexternalid) - [Get event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#getevent) - [Update event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#updateevent) **Examples** *Example event request object* ```json { "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } } } ``` --- ## Event response {#eventresponse} An event response returns identifiers that you can use to reference the event in other endpoints, along with the complete event request body. [Jump to examples ↓](#eventresponse-examples) **All of:** - [Event request]({{< ref "/developer/rest-api/wallet/schemas/event-tickets/" >}}#eventrequest) Represents an event scheduled at a specific time and venue. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`eventExternalId`** `string` An external identifier for an event. You can only assign an external identifier when creating an event. If you do assign an external identifier, requests for events or passes referencing the event will return the external ID in addition to the `eventId` created within Airship. - **`eventId`** `integer` The Airship-created identifier for an event. Read only: true - **`projectExternalId`** `string` Returned if you created the event using an external ID for the project. - **`projectId`** `integer` The ID of the Wallet project. - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true **Used in:** - [Create event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#createevent) - [Create event with external ID]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#createeventexternalid) - [Get event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#getevent) - [Update event]({{< ref "/developer/rest-api/wallet/operations/events/" >}}#updateevent) **Examples** *Response object* ```json { "eventId": 1234, "eventExternalId": "event123ExtId", "projectId": 12345, "projectExternalId": "project123ExtId", "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:12:32Z", "passGroups": ["giants_2019-09-25"], "fields": { "eventName": { "label": "Event", "value": "LA Dodgers at SF Giants" }, "venueTitle": { "label": "Venue", "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } } } ``` --- ## Event ticket Adaptive Link request {#eventticketrequest} An event ticket requires similar information to other adaptive link types, but does not support some of the same fields, and requires event and attendee information. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. You can create the event within this request or specify an event by `eventId` or `eventExternalId`. In either case, you must also provide an array of attendees for the event. [Jump to examples ↓](#eventticketrequest-examples) **All of:** - **`androidTemplateExternalId`** `string` The custom identifier of the Google template for passes issued from this adaptive link. - **`androidTemplateId`** `integer` The Google template for passes issued from the adaptive link. - **`availablePasses`** `integer` The total number of passes that can be created from this link. If absent, the link supports 1,000,000 passes. Default: `1000000` - **`iosTemplateExternalId`** `string` The custom identifier of the Apple template for passes issued from the adaptive link, if assigned. - **`iosTemplateId`** `integer` The iOS template for passes issued from the adaptive link. - **`isPersonalized`** `boolean` If true, each request (when a recipient uses an adaptive link) generates a new pass. You can update any of the individual passes generated from the adaptive link. If you generate the adaptive link using any request parameters, `isPersonalized` is automatically set to `true`. If false, only the first request generates a pass; subsequent requests generate a new instance of the same pass. When `isPersonalized` is `false`, you cannot update passes generated from an adaptive link by updating the adaptive link itself. Rather, you must use the Bulk Update Passes endpoint to push updates to the pass instances generated from the adaptive link. - **`landingPageUrl`** `string` The address users are redirected to if their device type cannot be detected or they cannot install the pass for another reason. Format: `url` - **`parameterEncoding`** `string` When set, allows url-encoded parameters to set or modify values when creating passes from the adaptive link. Possible values: `base64` - **`payload`** `object` **OBJECT PROPERTIES** - **`events`** `array` Each object in the array represents an event. Each event object must specify the `eventId` or `eventExternalId` of an existing event, or contain the `fields` object sufficient to create a new event. You can also provide the `eventExternalId` in conjunction with the `fields` object to assign an eventExternalId to a new event. **One of:** - `allOf` If you specify the `eventId` or `eventExternalId` of an existing event, you need only provide the attendees for the event ticket. - `allOf` If creating an event, you can provide an external ID for the event. You must then provide a complete event object. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example event ticket request object* ```json { "iosTemplateExternalId": "ios123ExtId", "androidTemplateExternalId": "android123ExtId", "payload": { "events": [ { "eventExternalId": "event123ExtId", "passGroups": [ "giants_2019-09-25" ], "fields": { "eventName": { "value": "LA Dodgers at SF Giants" }, "venueTitle": { "value": "AT&T Park" }, "venueAddress": { "label": "Address", "value": "24 Willie Mays Plaza\nSan Francisco, CA 94107" }, "doorsOpen": { "label": "Doors Open", "value": "2019-09-25T08:35:00" }, "startTime": { "label": "Start Time", "value": "2019-09-25T09:00:00" }, "endTime": { "label": "End Time", "value": "2019-09-25T11:00:00" } }, "attendees": [ { "adaptiveLinkExternalId": "abch3ExtId1", "fields": { "ticketHolderName": { "label": "Name", "value": "SMITH/JOE" }, "seat": { "value": "33" }, "ticketType": { "value": "VIP" }, "barcode_value": { "value": "1234" }, "barcodeAltText": { "value": "1234" }, "faceValue": { "value": "50" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "ticketHolderName": { "label": "Name", "value": "SMITH/SALLY" }, "seat": { "value": "34" }, "ticketType": { "value": "VIP" }, "barcode_value": { "value": "1235" }, "barcodeAltText": { "value": "1235" }, "faceValue": { "value": "50" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "ticketHolderName": { "label": "Name", "value": "SMITH/JACK" }, "seat": { "value": "35" }, "ticketType": { "value": "VIP" }, "barcode_value": { "value": "1236" }, "barcodeAltText": { "value": "1236" }, "faceValue": { "value": "50" } } } ] } ] } } ``` --- ## Event ticket Adaptive Link response {#eventticketresponse} The response for event ticket operations is much like any other adaptive link, with the addition of the identifier of the event and an HTTP status for each individual adaptive link. [Jump to examples ↓](#eventticketresponse-examples) **All of:** - [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) An adaptive link response includes URLs that users can access to detect and install a pass. - **`eventExternalId`** `string` An external identifier for an event. You can only assign an external identifier when creating an event. If you do assign an external identifier, requests for events or passes referencing the event will return the external ID in addition to the `eventId` created within Airship. - **`eventId`** `integer` The Airship-created identifier for an event. Read only: true - **`status`** `integer` The HTTP status code for the adaptive link operation. Example: `200` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example event ticket response array* ```json [ { "adaptiveLinkId": "abchd345678", "adaptiveLinkExternalId": "abch3ExtId1", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "eventId": 476, "eventExternalId": "event123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "createdAt": "2018-09-24T09:12:32Z", "updatedAt": "2018-09-24T09:15:32Z", "isPersonalized": "false", "availablePasses": 1000000, "iosPassLinkId": "a5711a29-7b38-41f2-8202-8f792df89b0b", "androidPassLinkId": "c1f512e5-fda3-4ddf-82c6-066c5681161d", "status": 200 }, {...}, {...} ] ``` --- # Flights and boarding passes > Schemas for creating flights and boarding pass adaptive links. A Boarding pass includes both flight information and an array of passengers. ## Boarding pass Adaptive Link request {#boardingpassrequest} A boarding pass adaptive link requires similar information to other adaptive link types, but the payload includes flight information and an array of passengers for each flight. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. [Jump to examples ↓](#boardingpassrequest-examples) **All of:** - **`androidTemplateExternalId`** `string` The custom identifier of the Google template for passes issued from this adaptive link. - **`androidTemplateId`** `integer` The Google template for passes issued from the adaptive link. - **`availablePasses`** `integer` The total number of passes that can be created from this link. If absent, the link supports 1,000,000 passes. Default: `1000000` - **`iosTemplateExternalId`** `string` The custom identifier of the Apple template for passes issued from the adaptive link, if assigned. - **`iosTemplateId`** `integer` The iOS template for passes issued from the adaptive link. - **`isPersonalized`** `boolean` If true, each request (when a recipient uses an adaptive link) generates a new pass. You can update any of the individual passes generated from the adaptive link. If you generate the adaptive link using any request parameters, `isPersonalized` is automatically set to `true`. If false, only the first request generates a pass; subsequent requests generate a new instance of the same pass. When `isPersonalized` is `false`, you cannot update passes generated from an adaptive link by updating the adaptive link itself. Rather, you must use the Bulk Update Passes endpoint to push updates to the pass instances generated from the adaptive link. - **`landingPageUrl`** `string` The address users are redirected to if their device type cannot be detected or they cannot install the pass for another reason. Format: `url` - **`parameterEncoding`** `string` When set, allows url-encoded parameters to set or modify values when creating passes from the adaptive link. Possible values: `base64` - **`payload`** `object` A boarding pass adaptive link object takes both flight and passenger information. You can provide the `flightId` or `flightExternalId` of an existing flight. Or, you can define a new flight using the `flights` object. If defining a new flight, you can provide a `flightExternalId`. Write only: true **OBJECT PROPERTIES** - **`flights`** `array` Each object in the array represents an event. Each event object must specify the `flightId` or `flightExternalId` of an existing event, or contain the `fields` object sufficient to create a new event. You can also provide the `eventExternalId` in conjunction with the `fields` object to assign an eventExternalId to a new event. **One of:** - `allOf` You can specify the `flightId` or `flightExternalId` of an existing flight, and then you need only populate the passengers for the flight. - `allOf` You can create a flight as a part of a boarding pass request. You can provide a `flightExternalId` for the flight you are creating, and then provide a complete flight object in addition to the array of `passengers` for the flight. - **`isEventTicketUpdatePermitted`** `boolean` True by default. If false, event information for existing events will not be updated as part of the POST call to the Adaptive Link API; a new event will still be created if it does not yet exist. Default: `true` - **`isFlightUpdatePermitted`** `boolean` True by default. If false, flight information for existing flights will not be updated as part of the POST call to the Adaptive Link API; a new flight will still be created if it does not yet exist. Default: `true` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example boarding pass Adaptive Link* ```json { "iosTemplateExternalId": "ios123ExtId", "androidTemplateExternalId": "android123ExtId", "payload": { "isEventTicketUpdatePermitted": false, "flights": [ { "flightExternalId": "flight123ExtId", "fields": { "flightNumber": { "value": "815" }, "airlineCode": { "value": "OA" }, "airlineName": { "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "value": "2018-07-30T08:35:00" }, "departureTime": { "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalTime": { "value": "2018-07-30T11:00:00" }, "flightStatus": { "value": "scheduled" } }, "passGroups": ["sfo-pdx-20180730"], "passengers": [ { "adaptiveLinkExternalId": "abch3ExtId1", "fields": { "seatNumber": { "value": "13A" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/JOE" }, "specialAssistance": { "label": "Special Assistance", "value": "Wheelchair" }, "barcode_value": { "value": "12345" }, "barcodeAltText": { "value": "12345" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13B" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SALLY" }, "barcode_value": { "value": "12346" }, "barcodeAltText": { "value": "12346" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13C" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SAM" }, "barcode_value": { "value": "12347" }, "barcodeAltText": { "value": "12347" } } } ] } ] } } ``` --- ## Boarding pass Adaptive Link response {#boardingpassresponse} The boarding pass operations return responses like other adaptive links, with the addition of the identifier of the event and an HTTP status for each individual adaptive link. Like other adaptive links, you must provide the `id` or `externalId` of an iOS or Android template. [Jump to examples ↓](#boardingpassresponse-examples) **All of:** - [Adaptive Link response]({{< ref "/developer/rest-api/wallet/schemas/adaptive-links/" >}}#adaptivelinkresponse) An adaptive link response includes URLs that users can access to detect and install a pass. - **`flightExternalId`** `string` An external, custom identifier for a flight. You can reference flights by `flightExternalId` rather than the Airship-generated `flightId`. When creating boarding passes, if you specify an existing flight by `flightExternalId`, you do not need to provide flight information in the `fields` object. If creating a new flight in the `fields` object, you can assign a new `flightExternalId` to the new flight. - **`flightId`** `integer` A unique, auto-generated identifier for a flight. When creating boarding passes, if you specify a flight by ID, you do not need to define the flight in the `fields` object. - **`status`** `integer` The HTTP status code for the adaptive link operation. Example: `200` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example boarding pass response* ```http HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "links": [ { "status": 201, "adaptiveLinkId": "abchd345678", "adaptiveLinkExternalId": "abch3ExtId1", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345678/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "eb94e8e0-4353-4e0b-bfe9-cfd21c52a540", "androidPassLinkId": "41c1ea48-f469-4968-b610-a98629ea19bc" }, { "status": 201, "adaptiveLinkId": "abchd345Id2", "adaptiveLinkExternalId": "abch3ExtId2", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "5d370e0d-0aa9-45c3-b7ab-eff0a3d4995b", "androidPassLinkId": "c60bd6c0-8f1e-4419-abb0-9f6fcb8a6fab" }, { "status": 201, "adaptiveLinkId": "abchd345Id2", "adaptiveLinkExternalId": "abch3ExtId2", "iosTemplateId": 12345, "iosTemplateExternalId": "ios123ExtId", "androidTemplateId": 154321, "androidTemplateExternalId": "android123ExtId", "url": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2", "iosUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/ios", "androidUrl": "https://wallet-api.urbanairship.com/v1/pass/adaptive/abchd345Id2/android", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "isPersonalized": "false", "availablePasses": 1000000, "ttlInDays": 30, "flightId": 465, "flightExternalId": "flight123ExtId", "iosPassLinkId": "5d370e0d-0aa9-45c3-b7ab-eff0a3d4995b", "androidPassLinkId": "c60bd6c0-8f1e-4419-abb0-9f6fcb8a6fab" } ] } ``` --- ## Boarding pass semantics {#boardingpasssemantics} 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`. **Any of:** - [Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics) For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - [Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics) For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Flight object {#flightrequest} A complete flight request object. The presence or absence of fields in the flight object may slightly affect the design of boarding passes. See [Google Wallet Boarding Pass Design](https://developers.google.com/pay/passes/guides/pass-verticals/boarding-passes/design) for more information on rendering logic for Google Wallet Boarding Passes. [Jump to examples ↓](#flightrequest-examples) - **`fields`** `object` **OBJECT PROPERTIES** - **`actualArrivalTime`** `object` The date and time when the flight actually lands. This field is normally populated in updates to the flight, as real-time information becomes available for the benefit of ticket holders. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Format: `date-time` - **`actualDepartureTime`** `object` The date and time when the flight actually departs. This field is normally populated in updates to the flight, as real-time information becomes available. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Format: `date-time` - **`airlineAllianceLogo`** `object` A URL for the airline alliance logo, if the airline belongs to an alliance. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`value`** `string` Format: `url` - **`airlineCode`** `object` **REQUIRED** The airline code. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`airlineLogo`** `object` A URL for the airline logo, shown on the front of the pass. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`value`** `string` Format: `url` - **`airlineName`** `object` **REQUIRED** The airline name. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`arrivalAirport`** `object` **REQUIRED** The airport the flight arrives at. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`arrivalGate`** `object` The gate that the flight arrives at. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`arrivalTerminal`** `object` The terminal that the flight arrives at. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`arrivalTime`** `object` The date and time the flight is scheduled to arrive at the `arrivalAirport`. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Format: `date-time` - **`boardingPolicy`** `object` The boarding policy for the airline and flight. If unset, Google will use `zoneBased`. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Possible values: `boardingPolicyOther`, `groupBased`, `zoneBased` - **`boardingTime`** `object` The date and time when the flight boards. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Format: `date-time` - **`departureAirport`** `object` **REQUIRED** The airport that the flight departs from. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`departureGate`** `object` The airport gate the flight departs from. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`departureTerminal`** `object` The airport terminal the flight departs from. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`departureTime`** `object` The date and time when the flight is scheduled to depart. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Format: `date-time` - **`flightNumber`** `object` **REQUIRED** The flight number. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`flightStatus`** `object` The status of the flight. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Possible values: `active`, `cancelled`, `landed`, `redirected`, `scheduled` - **`seatingPolicy`** `object` The seating policy for the airline and flight. If unset, Google will use `cabinBased`. **OBJECT PROPERTIES** - **`label`** `string` A label representing the field on the pass. Read only: true - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Field-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Possible values: `cabinBased`, `classBased`, `seatClassPolicyOther`, `tierBased` - **`semantics`** `object` <[Flight semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightsemantics)> **APPLE ONLY** Top-level flight semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. - **`universalLinks`** `object` <[Universal links]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#universallinksobject)> Special web links containing JSON key-value pairs used by Wallet to render buttons in the relevant sections of the pass. A list of key-value pairs that represents partner URLs. - **`passGroups`** `array[string]` An array of eventId or eventExternalId values representing a group. You can reference the group to make changes to all associated events. You can set pass groups when creating an event or when creating an event ticket adaptive link. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflight) - [Create flight with external ID]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflightexternalid) - [Get flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#getflight) - [Update flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#updateflight) **Examples** *Example flight request object* ```json { "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "value": "815" }, "airlineCode": { "value": "OA" }, "airlineName": { "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "value": "2018-07-30T08:35:00" }, "departureTime": { "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalTime": { "value": "2018-07-30T11:00:00" }, "flightStatus": { "value": "scheduled" } } } ``` --- ## Flight response {#flightresponse} A complete flight response, including identifiers to reference the flight and the fields defined within the flight. [Jump to examples ↓](#flightresponse-examples) **All of:** - [Flight object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#flightrequest) A complete flight request object. The presence or absence of fields in the flight object may slightly affect the design of boarding passes. See [Google Wallet Boarding Pass Design](https://developers.google.com/pay/passes/guides/pass-verticals/boarding-passes/design) for more information on rendering logic for Google Wallet Boarding Passes. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`flightId`** `integer` A unique, auto-generated identifier for the flight. Use this ID to reference the flight in future operations. Read only: true - **`projectExternalId`** `string` The identifier for the external project that the flight is associated with. Presently only if the project uses an external identifier. Read only: true - **`projectId`** `string` The project the flight is associated with. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true **Used in:** - [Create flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflight) - [Create flight with external ID]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflightexternalid) - [Get flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#getflight) - [Update flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#updateflight) **Examples** *Example flight response object* ```json { "flightId": 465, "flightExternalId": "flight123ExtId", "projectId": "12345", "projectExternalId": "project123ExtId", "createdAt": "2018-07-05T09:12:32Z", "updatedAt": "2018-07-05T09:12:32Z", "passGroups": ["sfo-pdx-20180730"], "fields": { "flightNumber": { "label": "Flight Number", "value": "815" }, "airlineCode": { "label": "Airline Code", "value": "OA" }, "airlineName": { "label": "Airline Name", "value": "Sabine Airlines" }, "departureAirport": { "label": "San Francisco", "value": "SFO" }, "departureGate": { "label": "Gate #", "value": "25" }, "boardingTime": { "label": "Boarding Time", "value": "2018-07-30T08:35:00" }, "departureTime": { "label": "Departure Time", "value": "2018-07-30T09:00:00" }, "arrivalAirport": { "label": "Portland", "value": "PDX" }, "arrivalGate": { "label": "Arrival Gate", "value": "" }, "arrivalTime": { "label": "Arrival Time", "value": "2018-07-30T11:00:00" }, "flightStatus": { "label": "Flight Status", "value": "scheduled" } } } ``` --- ## Flight semantics object {#flightsemantics} For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `flightNumber` and `originalDepartureTime`, that enhances passes. You can nest this object within `fields`. [Jump to examples ↓](#flightsemantics-examples) - **`airlineCode`** `string` The two-character IATA airline code. - **`currentArrivalDate`** `string` The ISO 8601 date-time the flight is currently scheduled to arrive. Format: `date-time` - **`currentBoardingDate`** `string` The ISO 8601 date-time the flight is currently scheduled to begin boarding. Format: `date-time` - **`currentDepartureDate`** `string` The ISO 8601 date-time the flight is currently scheduled to depart. Format: `date-time` - **`departureAirportCode`** `string` **REQUIRED** The three-letter IATA airport code the flight is departing from. - **`departureCityName`** `string` **REQUIRED** The name of the departure city. - **`departureGate`** `string` The gate number or letters of the departure gate. - **`departureLocation`** `object` The geographic coordinates of the transit departure location. - **`departureLocationSecurityPrograms`** `object` A list of security programs that exist in the departure airport. **Any of:** - [Transit security programs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#securityprograms) Security program names. - **`departureLocationTimeZone`** `string` **REQUIRED** The time zone for the departure location, such as America/Los_Angeles. - **`departureTerminal`** `string` The name or letter of the departure terminal. - **`destinationAirportCode`** `string` **REQUIRED** The three-letter IATA airport code the flight is going to. - **`destinationCityName`** `string` **REQUIRED** The name of the destination city. - **`destinationGate`** `string` The gate number or letters of the arrival gate. - **`destinationLocation`** `object` The geographic coordinates of the transit destination location. - **`destinationLocationSecurityPrograms`** `object` A list of security programs that exist in the destination airport. **Any of:** - [Transit security programs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#securityprograms) Security program names. - **`destinationLocationTimeZone`** `string` **REQUIRED** The time zone for the destination location, such as America/Los_Angeles. - **`destinationTerminal`** `string` The name or letter of the arrival terminal. - **`flightNumber`** `number` The one- to four-digit IATA flight number. - **`loungePlaceIDs`** `array[string]` A list of place IDs that reference the lounge locations. - **`originalArrivalDate`** `string` **REQUIRED** The ISO 8601 date-time the flight is originally scheduled to arrive. Format: `date-time` - **`originalBoardingDate`** `string` The ISO 8601 date-time the flight is originally scheduled to begin boarding. Format: `date-time` - **`originalDepartureDate`** `string` The ISO 8601 date-time the flight is originally scheduled to depart. Format: `date-time` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflight) - [Create flight with external ID]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflightexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#getflight) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#updateflight) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) **Examples** *Example flight semantics object* ```json { "airlineCode": "OA", "flightNumber": 2214, "originalBoardingDate": "2025-03-19T20:30:00-08:00", "currentBoardingDate": "2025-03-19T20:59:00-08:00", "originalDepartureDate": "2025-03-19T09:00:00-08:00", "currentDepartureDate": "2025-03-20T09:30:00-08:00", "originalArrivalDate": "2025-03-20T02:00:00-05:00", "currentArrivalDate": "2025-03-20T02:00:00-05:00", "departureAirportCode": "SFO", "departureCityName": "San Francisco", "departureLocationTimeZone": "America/Los_Angeles", "departureAirportLocation": { "latitude": 37.6191, "longitude": 122.3816 }, "departureLocationSecurityPrograms": [ "tsaPreCheck" ], "departureGate": "17B", "departureTerminal": "2", "destinationAirportCode": "JFK", "destinationCityName": "New York", "destinationLocationTimeZone": "America/New_York", "destinationAirportLocation": { "latitude": 40.6446, "longitude": 73.7797 }, "destinationGate": "6", "destinationTerminal": "1" } ``` --- ## Passenger semantics object {#passengersemantics} For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. [Jump to examples ↓](#passengersemantics-examples) - **`boardingGroup`** `string` A group number for boarding. - **`boardingSequenceNumber`** `string` A sequence number for boarding. - **`boardingZone`** `string` A zone number for boarding. - **`internationalDocumentsAreVerified`** `boolean` Denotes whether the ticket/passenger has met all the requirements for international travel. - **`internationalDocumentsVerifiedDeclarationName`** `string` The affirmation string that is displayed if the passenger meets the requirements for international travel. - **`membershipProgramName`** `string` The name of a frequent flyer or loyalty program. - **`membershipProgramNumber`** `string` The ticketed passenger's frequent flyer or loyalty number. - **`membershipProgramStatus`** `string` The ticketed passenger's frequent flyer or loyalty program status. - **`passengerAirlineSSRs`** `array` A list of airline-specific special service requests. **Any of:** - `object` The airline-specific service request. - **`passengerCapabilities`** `array` <[Passenger capabilities]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#passengercapabilities)> List of passenger capabilities. - **`passengerEligibleSecurityPrograms`** `array` <[Transit security programs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#securityprograms)> A list of security programs that the passenger is eligible for. Security program names. - **`passengerInformationSSRs`** `array` <[Passenger information SSRs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#passengerinformationssrs)> A list of Special Service Requests (SSRs) information for passengers; supports any valid four-letter IATA SSR code in addition to those listed. - **`passengerName`** `object` <[Passenger name object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#passengernamesemanticsobject)> **REQUIRED** - **`passengerServiceSSRs`** `array` <[Passenger service SSRs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#passengerservicessrs)> A list of Special Service Requests (SSRs) for passengers; supports any valid four-letter IATA SSR code in addition to those listed. - **`priorityStatus`** `string` Additional priority status the ticketed passenger holds. - **`seats`** `array` **Any of:** - [Passenger seat object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#seatsemanticsobject) Seating information, including cabin class. - **`ticketFareClass`** `string` A localizable string that denotes the ticket fare class. This value displays as a badge on the boarding pass. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) **Examples** *Example passenger semantics object* ```json { "passengerName": { "givenName": "Foo", "familyName": "Bar" }, "boardingGroup": "3", "passengerCapabilities": [ "priorityBoarding", "carryOn", "personalItem" ], "passengerEligibleSecurityPrograms": [ "tsaPreCheck", "tsaPrecheckTouchlessId" ], "seats": [ { "seatType": "Comfort+", "seatRow": "23", "seatNumber": "A" } ], "passengerServiceSSRs": [ "wheelChair" ], "membershipProgramName": "Fleet Rewards", "membershipProgramNumber": "12345", "membershipProgramStatus": "Gold", "priorityStatus": "Fleet Priority" } ``` --- ## Passengers {#passengers} An array of objects, each object representing a passenger/seat on a flight. Passengers are a part of the payload for boarding pass adaptive links. [Jump to examples ↓](#passengers-examples) - **`adaptiveLinkExternalId`** `string` The external ID you want to assign to a passenger's adaptive link. - **`fields`** `object` **OBJECT PROPERTIES** - **`barcodeAltText`** `object` <[Pass field updates]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#fields)> Like other pass creation operations, when providing barcode information, you need only provide the value. When updating a field on a pass or an adaptive link, you need only provide the following items. You cannot update the position of the field or other information held by the template — only the field label, value, and the message the user receives when their pass is updated. - **`barcode_value`** `object` <[Pass field updates]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#fields)> Like other pass creation operations, when providing barcode information, you need only provide the value. When updating a field on a pass or an adaptive link, you need only provide the following items. You cannot update the position of the field or other information held by the template — only the field label, value, and the message the user receives when their pass is updated. - **`boardingDoor`** `object` The door the passenger uses to board the plane. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` Possible values: `front`, `back` - **`boardingGroup`** `object` The boarding group for the passenger. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`boardingPosition`** `object` The value of the boarding position. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`boardingPrivilegeImage`** `object` The URL of the image; recommended size is 80 px tall by 80-780 px wide. **OBJECT PROPERTIES** - **`value`** `string` Format: `url` - **`confirmationCode`** `string` **REQUIRED** Confirmation code needed to check into this flight. This is the number that the passenger would enter into a kiosk at the airport to look up the flight and print a boarding pass. - **`eticketNumber`** `object` The eTicket Number for the passenger's boarding pass. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`frequentFlyerNumber`** `object` The passenger's frequent flyer number. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`frequentFlyerProgramName`** `object` The name of the frequent flyer program the passenger belongs to. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`passengerName`** `object` **REQUIRED** The name of the passenger as it will appear on the pass. **OBJECT PROPERTIES** - **`value`** `string` - **`seatClass`** `object` The passenger's seat class. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`seatNumber`** `object` The seat number the passenger will sit in. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`securityProgramLogo`** `string` The URL of the logo for the security program. Recommended size is 80 px tall and 80-780 px wide. Format: `url` - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> Top-level semantics for a passenger, which can include passenger and/or flight 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`. - **`sequenceNumber`** `object` The sequence number on the boarding pass. This usually matches the sequence in which the passengers checked in. **OBJECT PROPERTIES** - **`semantics`** `object` <[Passenger semantics object]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#passengersemantics)> **APPLE ONLY** Field-level passenger semantics. For Apple boarding passes only, a JSON object that uses key-value pairs to add rich, machine-readable data, such as `passengerName` and `seats`, that enhances passes. You can nest this object within `fields`. - **`value`** `string` - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example array of passengers* ```json { "passengers": [ { "adaptiveLinkExternalId": "abch3ExtId1", "fields": { "seatNumber": { "value": "13A" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/JOE" }, "specialAssistance": { "label": "Special Assistance", "value": "Wheelchair" }, "barcode_value": { "value": "12345" }, "barcodeAltText": { "value": "12345" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13B" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SALLY" }, "barcode_value": { "value": "12346" }, "barcodeAltText": { "value": "12346" } } }, { "adaptiveLinkExternalId": "abch3ExtId2", "fields": { "seatNumber": { "value": "13C" }, "confirmationCode": { "value": "E4583B" }, "passengerName": { "value": "SMITH/SAM" }, "barcode_value": { "value": "12347" }, "barcodeAltText": { "value": "12347" } } } ] } ``` --- # OAuth > Schemas for OAuth token requests, including scopes, assertion JWTs, and subject identifiers. ## Assertion JWT {#assertionjwt} A JSON Web Token (JWT) used for authorization in [OAuth token requests](/docs/developer/rest-api/wallet/operations/oauth/#requestoauthtoken). The JWT must be signed with the private key corresponding to the `client_id` in the `kid` header using the ES384 algorithm. **All of:** - **Headers** `object` Assertion JWT headers - **`alg`** `string` **REQUIRED** The signing algorithm. Possible values: `ES384` - **`kid`** `string` **REQUIRED** The key used to sign the JWT, the `client_id`. - **Claims** `object` Assertion JWT claims - **`aud`** `string` **REQUIRED** The valid request endpoint. Example: `https://oauth2.asnapius.com/token` - **`exp`** `integer` **REQUIRED** The `assertion`'s expiration timestamp in seconds since epoch, after which it is not valid. The expiry must not be more than 10 minutes in the future. This is for the `assertion`, not for the token that will be returned. Example: `1681862754` - **`iat`** `integer` **REQUIRED** The issue timestamp in seconds since epoch. Example: `168186250` - **`ipaddr`** `string` A space-delimited list of CIDR representations of valid IP addresses to which the issued token is restricted. - **`iss`** `string` **REQUIRED** The issuer, the `client_id`. - **`nonce`** `string` **REQUIRED** A unique string that must not have been used recently with this `client_id`. We will store this for a minimum of 2 hours. If you are relying on the nonce to defend against replay attacks, it is recommended to also enforce a narrow *ipaddr* range in order to prevent requests that utilize the returned access token from being replayed by an outside client. Min length: 1, Max length: 50 - **`scope`** `string` <[OAuth Scope]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#oauthscope)> A space-delimited list of scopes to which the returned claim should be restricted. If not provided, the full list of scopes the `client_id` is granted will be in the returned claim. The value of the scope parameter is a list of space-delimited, case-sensitive strings. If multiple scopes are specified, their order does not matter. Each string adds an additional access range to the requested scope. For more information about scope values, see [OAuth token scopes](/docs/developer/rest-api/wallet/api-auth-reference/#oauth-token-scopes) in the *Wallet API Authorization Reference* documentation. * `wadl`: Adaptive Links * `wevt`: Events * `wfli`: Flights * `wnot`: Notifications * `wpas`: Passes * `wprj`: Projects * `wsch`: Schedules * `wseg`: Segments * `wrpt`: Statistics * `wtmp`: Templates Possible values: `wadl`, `wevt`, `wfli`, `wnot`, `wpas`, `wprj`, `wsch`, `wseg`, `wrpt`, `wtmp` - **`sub`** `object` <[Subject]({{< ref "/developer/rest-api/wallet/schemas/oauth/" >}}#subject)> **REQUIRED** A space-delimited set of identifiers for which subjects a token is allowed. An `app` subject is required. Example: `app:`. A space-delimited set of identifiers for which subjects a token is allowed. Example: `app:` * `app`: May operate on the given app **Used in:** - [Request token]({{< ref "/developer/rest-api/wallet/operations/oauth/" >}}#requestoauthtoken) --- ## OAuth Scope {#oauthscope} The value of the scope parameter is a list of space-delimited, case-sensitive strings. If multiple scopes are specified, their order does not matter. Each string adds an additional access range to the requested scope. For more information about scope values, see [OAuth token scopes](/docs/developer/rest-api/wallet/api-auth-reference/#oauth-token-scopes) in the *Wallet API Authorization Reference* documentation. * `wadl`: Adaptive Links * `wevt`: Events * `wfli`: Flights * `wnot`: Notifications * `wpas`: Passes * `wprj`: Projects * `wsch`: Schedules * `wseg`: Segments * `wrpt`: Statistics * `wtmp`: Templates `string` Allowed values: `wadl`, `wevt`, `wfli`, `wnot`, `wpas`, `wprj`, `wsch`, `wseg`, `wrpt`, `wtmp` **Used in:** - [Request token]({{< ref "/developer/rest-api/wallet/operations/oauth/" >}}#requestoauthtoken) --- ## Subject {#subject} A space-delimited set of identifiers for which subjects a token is allowed. Example: `app:` * `app`: May operate on the given app **Used in:** - [Request token]({{< ref "/developer/rest-api/wallet/operations/oauth/" >}}#requestoauthtoken) --- # Passes > Schemas used when creating passes (as opposed to adaptive links). ## Apple Wallet pass request {#createpassapplewalletrequest} A pass for Apple Wallet. [Jump to examples ↓](#createpassapplewalletrequest-examples) - **`beacons`** `array` <[Beacon object]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#beacon)> 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](/docs/developer/rest-api/wallet/schemas/others/#iostemplateheaderobject) for information about available header objects for Apple Wallet templates and passes. **OBJECT PROPERTIES** - **`expirationDate`** `string` May contain `value` and `label` fields. `value` indicates the expiration date of the pass. `label` can be set to either `valid` or `voided`, where `valid` indicates a non-expired pass and `voided` indicates that the pass is no longer accepted. Format: `date-time` - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> 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. See [Enable NFC Support for your Passes](/docs/guides/wallet/user-guide/design-template/nfc/) for setup instructions. **OBJECT PROPERTIES** - **`encryptionPublicKey`** `string` **REQUIRED** The public encryption key for NFC communications. Use a Base64 encoded X.509 `SubjectPublicKeyInfo` structure containing a ECDH public key for group P256. - **`message`** `string` **REQUIRED** 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: single` in 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. Example: `[object Object]` **OBJECT PROPERTIES** - **`installs`** `integer` The number of users who have installed the pass from the URL specified in the `path` field. Read only: true - **`path`** `string` The URL for the pass. - **`type`** `string` **REQUIRED** 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 `path` URL. Read only: true - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> 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`. - **`tags`** `array[string]` 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. Read only: true **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) **Examples** *Example pass for Apple Wallet* ```json { "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:\/\/example.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 {#createpassapplewalletresponse} A pass response includes both identifiers and the content of all fields on a pass. [Jump to examples ↓](#createpassapplewalletresponse-examples) **All of:** - [Apple Wallet pass request]({{< ref "/developer/rest-api/wallet/schemas/passes/" >}}#createpassapplewalletrequest) A pass for Apple Wallet. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`externalId`** `string` The external ID for the pass, returned only if you created the pass using an external ID. Read only: true - **`id`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`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: single` in 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. Example: `[object Object]` **OBJECT PROPERTIES** - **`installs`** `integer` The number of users who have installed the pass from the URL specified in the `path` field. Read only: true - **`path`** `string` The URL for the pass. - **`type`** `string` **REQUIRED** 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 `path` URL. Read only: true - **`serialNumber`** `string` Format: `uuid` Read only: true - **`status`** `string` Indicates whether a pass has been installed or not. Possible values: `installed`, `not_been_installed` Read only: true - **`tags`** `array[string]` Tags associated with the pass. - **`uaEntityId`** `string` Format: `uuid` Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`url`** `string` The URL for the pass. Format: `url` **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) **Examples** *Example Apple Wallet pass response* ```json { "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:\/\/example.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 {#beacon} 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). [Jump to examples ↓](#beacon-examples) - **`major`** `integer` **REQUIRED** Major identifier of a beacon. Format: `int32` Example: `2` - **`minor`** `integer` **REQUIRED** Minor identifier of a beacon. Format: `int32` Example: `346` - **`relevantText`** `string` **REQUIRED** Text displayed on the lock screen. Example: `You are near the Ship` - **`uuid`** `string` **REQUIRED** Unique identifier of a beacon. Example: `55502220-A123-A88A-F321-555A444B333C` **Used in:** - [Add or update beacons for Apple Wallet pass]({{< ref "/developer/rest-api/wallet/operations/apple-passes-only/" >}}#addreplacebeaconsforpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [List beacons on Apple Wallet pass]({{< ref "/developer/rest-api/wallet/operations/apple-passes-only/" >}}#getbeaconsforpassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) **Examples** *Example beacon object* ```json { "uuid": "55502220-A123-A88A-F321-555A444B333C", "relevantText": "You are near the Ship", "major": 2, "minor": 346 } ``` --- ## Google Wallet pass request {#createpassandroidpayrequest} 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. [Jump to examples ↓](#createpassandroidpayrequest-examples) - **`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 `value` you want to change for the field and the `changeMessage` if you want to notify pass holders of the change in the value. - **`headers`** `object` Include objects from the template `headers` object if you want to change the `label`, `value`, or `changeMessage` for fields in the pass header — like barcodes and titles. **OBJECT PROPERTIES** - **`expirationDate`** `string` May contain `value` and `label` fields. `value` indicates the expiration date of the pass. `label` can be set to either `valid` or `voided`, where `valid` indicates a non-expired pass and `voided` indicates that the pass is no longer accepted. Format: `date-time` - **`locations`** `array` <[Location object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#locationobject)> A list of locations associated with a pass. - **`publicUrl`** `object` **REQUIRED** 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: single` in 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. Example: `[object Object]` **OBJECT PROPERTIES** - **`installs`** `integer` The number of users who have installed the pass from the URL specified in the `path` field. Read only: true - **`path`** `string` The URL for the pass. - **`type`** `string` **REQUIRED** 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 `path` URL. Read only: true - **`templateId`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) **Examples** *Example Google pass request* ```json { "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 {#createpassandroidpayresponse} 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. [Jump to examples ↓](#createpassandroidpayresponse-examples) - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`externalId`** `string` The external ID for the pass, returned only if you created the pass using an external ID. Read only: true - **`fields`** `object` Contains all populated fields from the template. The `fieldType` within each object indicates the `module` it belonged to. While all fields take a similar shape, the response may contain different keys to represent the `value` or `label` from the originating template field. This has to do with the way that Google Wallet interprets templates and passes. **OBJECT PROPERTIES** - **`offerModule`** `object` Specific to google coupons, this module contains information about redeeming the coupon. **OBJECT PROPERTIES** - **`endTime`** `string` The expiration date for the offer. Format: `date-time` - **`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]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#googleheaders)> Fields appearing in the `headers` object for a Google pass template. Header fields typically follow the same model as other fields for Google Wallet templates and passes, but often have specific `value`, `fieldType`, and `formatType` values. - **`id`** `integer` The internal identifier for the pass. Use this ID to get or modify the pass in other calls. Read only: true - **`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: single` in 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. Example: `[object Object]` **OBJECT PROPERTIES** - **`installs`** `integer` The number of users who have installed the pass from the URL specified in the `path` field. Read only: true - **`path`** `string` The URL for the pass. - **`type`** `string` **REQUIRED** 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 `path` URL. Read only: true - **`serialNumber`** `string` Format: `uuid` Read only: true - **`status`** `string` Indicates whether a pass has been installed or not. Possible values: `installed`, `not_been_installed` Read only: true - **`tags`** `array[string]` Tags associated with the pass. - **`uaEntityId`** `string` Format: `uuid` Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`url`** `string` The URL for the pass. Format: `url` **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) **Examples** *Example Google pass response* ```json { "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://example.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://example.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://example.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" } ``` --- # Project objects > Request and Response schemas for `/project` endpoints. ## Project request {#projectrequest} A project request determines the type of passes you can create and the types of barcode your passes will use. [Jump to examples ↓](#projectrequest-examples) - **`description`** `string` **REQUIRED** A description for the project. - **`name`** `string` **REQUIRED** The name of your project. - **`projectType`** `string` **REQUIRED** The type of pass the template supports; matches the `type` setting for the parent project. Possible values: `memberCard`, `coupon`, `boardingPass`, `eventTicket`, `generic`, `loyalty`, `giftCard` - **`settings`** `object` Contains barcode information for the project. **OBJECT PROPERTIES** - **`barcode_alt_text`** `string` Alternate text for the barcode. This text assists the user if they hover over the barcode or the barcode doesn't render. - **`barcode_default_value`** `string` The default value for the barcode. If you do not set a new value when creating a pass, the pass will use this value. - **`barcode_encoding`** `string` Barcode encoding is set at the project level and inherited by templates and passes. Possible values: `iso-8859-1` - **`barcode_label`** `string` The title of the barcode; appears above the barcode in templates. You can change this value when creating or updating templates or passes. - **`barcode_type`** `string` The format of the barcode supported by the project and resulting passes. Possible values: `pdf417`, `aztec`, `code128`, `qr`, `upc-a`, `ean-13`, `code-39` **Used in:** - [Create project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createproject) - [Create project with external ID]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createprojectexternalid) - [Duplicate project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#duplicateproject) - [Get project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#getproject) - [List projects]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#listprojects) - [Update project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#updateproject) **Examples** *Example project request* ```json { "name": "Aztec Barcode", "projectType": "loyalty", "description": "Aztec Barcode", "settings": { "barcode_alt_text": "123json=456789", "barcode_label": "Member ID", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_type": "pdf417" } } ``` --- ## Project response {#projectpayload} A project response includes all fields in a project request, along with identifiers for the project and a list of templates created within the project. [Jump to examples ↓](#projectpayload-examples) **All of:** - [Project request]({{< ref "/developer/rest-api/wallet/schemas/project-objects/" >}}#projectrequest) A project request determines the type of passes you can create and the types of barcode your passes will use. - **`contextId`** `string` Append this value to `go.urbanairship.com/projects/` to access your project. Read only: true - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`externalId`** `string` The custom, external identifier of the project. This key only appears if you assigned an external ID to the project. - **`id`** `integer` The identifier for the project, used to reference the project in other payloads. Read only: true - **`templates`** `array` An array of templates belonging to the project. When creating a new project, this array is empty. Read only: true **All of:** - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`id`** `integer` The identifier for the template. You can recall the template by ID in other operations. Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - [General template headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#templaterequestheaders) Meta information about templates; this object appears on all templates and identifies templates associated with a project. - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true **Used in:** - [Create project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createproject) - [Create project with external ID]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createprojectexternalid) - [Duplicate project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#duplicateproject) - [Get project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#getproject) - [List projects]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#listprojects) - [Update project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#updateproject) **Examples** *Example project response* ```json { "updatedAt": "2013-06-27T20:55:06.000Z", "id": "12345", "contextId":"myvWLcm8QN3Iq2K4fXT-Bv", "templates": [ { "vendor": "Apple", "projectType": "loyalty", "projectId": "12345", "type": "Store Card", "vendorId": "1", "deleted": "False", "id": "1234", "updatedAt": "2013-06-27T20:58:05.000Z", "description": "Template 1", "createdAt": "2013-06-27T20:51:09.000Z", "name": "Template 1", "disabled": "False" } ], "description": "Aztec Barcode", "createdAt": "2013-06-27T20:51:02.000Z", "settings": { "barcode_alt_text": "123456789", "barcode_default_value": "123456789", "barcode_encoding": "iso-8859-1", "barcode_label": "Member ID", "barcode_type_text": "Aztec", "barcode_type": "aztec" }, "name": "Aztec Barcode", "projectType": "loyalty" } ``` --- # Template objects > Template objects vary based on the vendor they're intended for and the types of passes you want to create. ## Apple Pass personalization requirements {#personalizationrequirements} [Jump to examples ↓](#personalizationrequirements-examples) - **`description`** `string` **REQUIRED** A brief description of the rewards program that the recipient is signing up for. The description appears on the signup sheet, under the personalization logo. - **`imageUrl`** `string` The URL of the image you want to appear at the top of the signup form. This image must be a 150 x 40 point PNG image. Format: `url` - **`requiredPersonalizationFields`** `array[string]` **REQUIRED** An array of strings representing fields that a customer must provide to sign up for your rewards/loyalty program. Some keys populate multiple fields in the personalization callback or on passes. * name - requires the user to enter their `fullName`. This also populates the `givenName` and `familyName` fields on passes and/or personalization callbacks. * postalCode - prompts the user for their postal code. This populates both `postalCode` and `ISOCountryCode` on passes and/or personalization callbacks. * emailAddress - requires the user's email address. * phoneNumber - requires the user's phone number. Min items: 1, Max items: 4 Possible values: `name`, `postalCode`, `emailAddress`, `phoneNumber` - **`termsAndConditions`** `string` The terms and conditions for the reward program. If present, this information appears after the user enters their personal information and taps Next. The user then has the option to agree to the terms, or to cancel the signup process. **Used in:** - [Add personalization requirements]({{< ref "/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/" >}}#addpersonalizationrequirements) - [Delete personalization requirements]({{< ref "/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/" >}}#removepersonalizationrequirements) - [Get personalization requirements]({{< ref "/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/" >}}#getpersonalizationrequirements) - [Update personalization requirements]({{< ref "/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/" >}}#updatepersonalizationrequirements) **Examples** *Example Apple loyalty personalization requirements* ```json { "requiredPersonalizationFields": ["name", "postalCode", "emailAddress", "phoneNumber" ], "description": "Enter your information to sign up and earn points.", "termsAndConditions": "Terms and conditions go here" } ``` --- ## Apple Wallet template request {#iostemplate} A complete iOS template includes template meta information, headers, and fields. [Jump to examples ↓](#iostemplate-examples) **All of:** - [General template headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#templaterequestheaders) Meta information about templates; this object appears on all templates and identifies templates associated with a project. - [iOS template headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#iosheaders) The iOS template `headers` object can contain the following objects. Each object has a `formatType`, `fieldType`, and `value`. * `formatType` is always `1`, indicating that the `value` is a string. * `fieldType` is `topLevel` — a text or color value on the top-front of the pass, `image`, or `barcode`. * `value` is the default value for the header field. - [iOS fields]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#iosfieldobject) Defines fields on iOS templates and subsequent passes generated from the template. **Used in:** - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example Apple Wallet template request* ```json { "headers": { "logo_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": 1, "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": 1, "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": 1, "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(49,159,196)" } }, "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true }, "SiteAddress": { "formatType": "Number", "changeMessage": "New stuff, just for you at %@", "order": 2, "textAlignment": "textAlignmentCenter", "fieldType": "secondary", "value": "https://www.example.com/new?custnumb=123456", "label": "personalDeals", "required": false, "hideEmpty": true }, "InStore": { "formatType": "String", "changeMessage": "Or visit your nearest store at %@", "order": 1, "fieldType": "secondary", "value": "1234 Fake St.", "label": "nearestStore", "required": false, "hideEmpty": false } }, "vendor": "Apple", "projectType": "memberCard", "projectId": 1234, "type": "Store Card", "vendorId": 1, "deleted": "False", "description": "Description", "name": "Loyalty Card", "disabled": "False" } ``` --- ## Google Wallet template request {#googletemplate} A google template organizes fields into a series of module objects. Include only the objects you want to populate for a particular template; some modules may not apply to your template type. [Jump to examples ↓](#googletemplate-examples) **All of:** - [General template headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#templaterequestheaders) Meta information about templates; this object appears on all templates and identifies templates associated with a project. - [Google fields]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#googletemplaterequestfieldsmodel) Fields on a Google pass are organized into modules. Modules define how fields on the pass are organized and appear. Fields within each module are objects with a string names. **Used in:** - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example Google template request* ```json { "infoModuleData": { "hexFontColor": "#666666", "hexBackgroundColor": "#0096e1", "Program ID": { "label": "Program ID", "value": "12345678", "row": 0, "col": 0, "formatType": "String" }, "Tier Name": { "label": "Tier Name", "value": "Silver", "row": 0, "col": 1, "formatType": "String" }, "Last Updated": { "label": "Last Updated", "value": "Five days ago", "row": 1, "col": 0, "formatType": "String" } }, "headers": { "barcode_type": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_value": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_label": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_encoding": { "fieldType": "barcode", "value": "", "notShared": true }, "barcodeAltText": { "fieldType": "barcode", "value": "", "notShared": true } }, "textModulesData": { "Program Details": { "header": "Program Details", "body": "Some Basic Text", "row": 0, "col": 0, "formatType": "String" } }, "linksModuleData": { "Merchant Website": { "description": "Merchant Website", "uri": "http:\/\/www.example.com", "order": 1, "formatType": "URL" } }, "messageModule": { }, "imageModulesData": { }, "pointsModule": { "Tier": { "label": "Tier", "value": 2, "row": 0, "col": 1, "formatType": "Number", "numberStyle": "PKNumberStyleDecimal" }, "Points": { "label": "Points", "value": 1234, "row": 0, "col": 0, "formatType": "Number" } }, "notAssigned": { }, "titleModule": { "image": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "imageDescription": "Logo Image", "Program Name": { "label": "Program Name", "value": "UA", "row": 0, "col": 0, "formatType": "String" } }, "vendor": "Google", "projectType": "memberCard", "type": "Loyalty1", "vendorId": 2, "deleted": "False", "description": "description", "name": "Adding Google" } ``` --- ## Optional fields for Google headers {#googleheaderitemshared} Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. [Jump to examples ↓](#googleheaderitemshared-examples) - **`changeMessage`** `string` The message that appears when you update this field. Nullable: true - **`hideEmpty`** `boolean` If true, the field is hidden if empty. - **`ignoresTimeZone`** `boolean` if true, the date-time value in a field on an Apple Wallet pass is not offset to account for the pass recipient's time zone. This may be helpful for things like boarding passes or events, where your times are set local to an airport or venue and should not change based on a user's device. When applied to a non-date-time field or a Google template, this setting is ignored. - **`label`** `string` In most cases, you should not set a label for a Google template header. In responses, the label is typically an empty string. - **`required`** `boolean` Indicates whether or not the field is required on passes created from this template. - **`textAlignment`** `string` The alignment of text on the pass. Possible values: `textAlignmentLeft`, `textAlignmentCenter`, `textAlignmentRight`, `textAlignmentNatural` **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example Google header object with optional keys* ```json { "background_color": { "ignoresTimeZone": null, "changeMessage": null, "label": "", "hideEmpty": false, "formatType": "String", "value": "#006491", "fieldType": "topLevel", "required": false } } ``` --- # Additional Schemas > Schemas that are not grouped by a specific tag. These include core data objects and shared schemas used across multiple operations. ## Apple template header object {#iostemplateheaderobject} An object in `headers` for an iOS template or pass contains the following items. - **`fieldType`** `string` The type of field for the iOS header. Possible values: `topLevel`, `image`, `barcode` - **`formatType`** `integer` Indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The default value for the field/header. While the value is always a string, it takes on a different format based on the `fieldType` and purpose. --- ## Callback object {#callbackobject} [Jump to examples ↓](#callbackobject-examples) - **`createdAt`** `string` The date-time when the pass was created. Format: `date-time` - **`externalId`** `string` The external ID for the pass, if set. - **`passId`** `integer` The ID of the pass installed or uninstalled. - **`platform`** `string` The platform on which the pass is installed. Possible values: `android`, `ios` - **`serialNumber`** `string` The serial number of the pass. This string is generated by the vendor — Apple or Google. - **`templateId`** `integer` The ID of the template the pass was created from. - **`updatedAt`** `string` The date-time when the pass was last updated. Format: `date-time` **Examples** *Example callback object* ```json { "passId": 149440311, "templateId": 158327, "serialNumber": "3388000000005047792.158327_92a3e4d1-5110-3aca-a26e-fb21618aa5f2_149440311", "createdAt": "2020-09-11T22:47:22.000Z", "updatedAt": "2020-09-11T22:47:22.000Z", "externalId": "coolexample", "platform": "android" } ``` --- ## Callback personalization object {#callbackpersonalizationobject} You must [add personalization requirements](/docs/developer/rest-api/wallet/operations/apple-wallet-pass-personalization/) to Apple templates before users can personalize passes created from them. [Jump to examples ↓](#callbackpersonalizationobject-examples) **All of:** - [Callback object]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#callbackobject) - **`personalizationInfo`** `object` **Examples** *Example callback with personalization object* ```json { "passId": "12345", "templateId": "25035", "serialNumber": "6779a823-7c8f-4145-a640-c688069a3465", "createdAt": "2022-01-23T20:46:50Z", "platform": "ios", "personalizationInfo": { "fullName": "John LastName", "givenName": "John", "familyName": "LastName", "emailAddress": "test@example.com", "postalCode": "95051", "ISOCountryCode": "US", "phoneNumber": "408-409-1234" } } ``` --- ## Certificate object {#certificateobject} [Jump to examples ↓](#certificateobject-examples) - **`baseName`** `string` Read only: true - **`certificate`** `string` A base64-encoded string of the p12 certificate with the private key. - **`comment`** `string` A description for the certificate. - **`createdAt`** `string` The date and time when the item was created. Format: `date-time` Read only: true - **`default`** `boolean` If true, the certificate is the default for new projects. If you have multiple certificates and set a new default to `true`, the current default is set to `false`. Default: `false` - **`enabled`** `boolean` Indicates whether or not the certificate is in use. Default: `true` - **`expired`** `boolean` If true, the certificate has expired and cannot be used to generate new passes. Read only: true - **`name`** `string` A name for the certificate. - **`nfcSupport`** `boolean` If true, the certificate supports passes that can make use of NFC. Read only: true - **`password`** `string` The password for the p12 file, if the certificate was exported with a password. - **`teamIdentifier`** `string` Read only: true - **`updatedAt`** `string` The date and time when the item was last updated. Format: `date-time` Read only: true - **`vendor`** `string` The vendor of the certificate. Possible values: `Apple` **Used in:** - [Add new certificate]({{< ref "/developer/rest-api/wallet/operations/certificates/" >}}#addcertificate) - [Get certificate]({{< ref "/developer/rest-api/wallet/operations/certificates/" >}}#getcertificate) - [List certificates]({{< ref "/developer/rest-api/wallet/operations/certificates/" >}}#getcertificates) - [Update certificate]({{< ref "/developer/rest-api/wallet/operations/certificates/" >}}#updatecertificate) **Examples** *Example Apple certificate response* ```json { "id": "40adce15-5c52-479d-8620-54c21cd851a6", "vendor": "Apple", "baseName": "pass.com.myName.test", "name": "editable name", "comment": "something about this cert", "teamIdentifier": "9M8MY376H5", "nfcSupport": false, "enabled": false, "createdAt": "2018-05-26T23:23:21Z", "updatedAt": "2019-05-26T22:23:21Z", "expired": false, "validityStart": "2018-05-26T23:45:00Z", "validityEnd": "2019-05-26T23:45:00Z", "templates": [ {"id": 123,"name": "templateName1"}, {"id": 221,"name": "templateName2"} ] } ``` --- ## General template headers {#templaterequestheaders} Meta information about templates; this object appears on all templates and identifies templates associated with a project. [Jump to examples ↓](#templaterequestheaders-examples) - **`deleted`** `boolean` If true, the template is deleted. You can no longer create passes from this template. - **`description`** `string` A description for the template. - **`disabled`** `boolean` If true, the template is disabled; you cannot create new passes for this template until you update the template and enable it again. - **`expiryInfo`** `object` Determine when passes generated from the template should expire. **One of:** - **Expire on a date** `object` Set the specific expiration date for passes generated from this template. Passes expire at 12:00 AM on the date you provide. - **`expiryDate`** `string` The date when passes expire. Format: `date` - **`expiryTimeZone`** `string` Passes expire at 12:00 AM in the time zone you set. - **Expire after** `object` Expire passes generated from this template after the specified number of minutes after creation. - **`expiryDuration`** `integer` The number of days after creation that passes will expire. - **Never expire** `object` Passes generated from the template will never expire. - **`expireNever`** `string` Any string value (or null) will prevent passes generated from this template from expiring. - **`name`** `string` **REQUIRED** The name of the template. - **`projectId`** `integer` The ID of the Wallet project. - **`projectType`** `string` The type of pass the template supports; matches the `type` setting for the parent project. Possible values: `memberCard`, `coupon`, `boardingPass`, `eventTicket`, `generic`, `loyalty`, `giftCard` - **`type`** `string` The type of pass the template supports. This value corresponds to the `projectType`. Possible values: `memberCard`, `coupon`, `boardingPass`, `eventTicket`, `generic`, `loyalty`, `giftCard` - **`vendor`** `string` **REQUIRED** The device vendor the template is designed for. Possible values: `Apple`, `Google` - **`vendorId`** `integer` **REQUIRED** Corresponds to the `vendor` the template supports. `1` indicates an Apple template; `2` indicates a Google template. Possible values: `1`, `2` **Used in:** - [Create project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createproject) - [Create project with external ID]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#createprojectexternalid) - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Duplicate project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#duplicateproject) - [Get project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#getproject) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [List projects]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#listprojects) - [List templates]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#listtemplates) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update project]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#updateproject) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example template headers* ```json { "vendor": "Google", "projectType": "memberCard", "type": "Loyalty1", "vendorId": 2, "deleted": "False", "description": "description", "name": "Adding Google" } ``` --- ## Google fields {#googletemplaterequestfieldsmodel} Fields on a Google pass are organized into modules. Modules define how fields on the pass are organized and appear. Fields within each module are objects with a string names. [Jump to examples ↓](#googletemplaterequestfieldsmodel-examples) - **`acctModule`** `object` Information associated with an account or membership. These are typically items like the `accountIdLabel` on Loyalty cards or `balance` items on a gift card. - **`headers`** `object` <[Google headers]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#googleheaders)> Google template headers define barcode and top-level information for passes. Fields appearing in the `headers` object for a Google pass template. Header fields typically follow the same model as other fields for Google Wallet templates and passes, but often have specific `value`, `fieldType`, and `formatType` values. - **`imageModulesData`** `object` Contains an image on the pass outside the header. - **`infoModuleData`** `object` Info module - **`linkModulesData`** `object` Contains links including URLs, phone numbers, and email addresses, that you want to make available on the pass. This module typically appears at the bottom of the pass. - **`offerModule`** `object` Specific to google coupons, this module contains information about redeeming the coupon. **OBJECT PROPERTIES** - **`endTime`** `string` The expiration date for the offer. Format: `date-time` - **`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` - **`pointsModule`** `object` Contains information related to `points` that pass users accrue or spend. This module is typically used on loyalty passes. - **`textModulesData`** `object` Contains text information for a pass. The text module typically has information in a header-body format. - **`titleModule`** `object` Contains title and header information specific to each pass type (as opposed to common items held within `headers`). These are items typically referenced by `class` in Google pass designs. **Used in:** - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example Google fields* ```json { "infoModuleData": { "hexFontColor": "#666666", "hexBackgroundColor": "#0096e1", "Program ID": { "label": "Program ID", "value": "12345678", "row": 0, "col": 0, "formatType": "String" }, "Tier Name": { "label": "Tier Name", "value": "Silver", "row": 0, "col": 1, "formatType": "String" }, "Last Updated": { "label": "Last Updated", "value": "Five days ago", "row": 1, "col": 0, "formatType": "String" } }, "textModulesData": { "Program Details": { "header": "Program Details", "body": "Some Basic Text", "row": 0, "col": 0, "formatType": "String" } }, "linksModuleData": { "Merchant Website": { "description": "Merchant Website", "uri": "http:\/\/www.example.com", "order": 1, "formatType": "URL" } }, "messageModule": { }, "imageModulesData": { }, "pointsModule": { "Tier": { "label": "Tier", "value": 2, "row": 0, "col": 1, "formatType": "Number", "numberStyle": "PKNumberStyleDecimal" }, "Points": { "label": "Points", "value": 1234, "row": 0, "col": 0, "formatType": "Number" } }, "notAssigned": { }, "titleModule": { "image": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png", "imageDescription": "Logo Image", "Program Name": { "label": "Program Name", "value": "UA", "row": 0, "col": 0, "formatType": "String" } } } ``` --- ## Google headers {#googleheaders} Fields appearing in the `headers` object for a Google pass template. Header fields typically follow the same model as other fields for Google Wallet templates and passes, but often have specific `value`, `fieldType`, and `formatType` values. [Jump to examples ↓](#googleheaders-examples) - **`background_color`** `object` Sets the background color for the pass. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `topLevel` for `color` and `text` headers. Possible values: `topLevel` - **`value`** `string` The `color` objects take an rgb value in the format `rgb(255, 255, 255)`. Format: `rgb` - **`background_image`** `object` A background image for the pass. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` - **`barcodeAltText`** `object` Alternate text displayed below the barcode. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The alternate text for the barcode on the template. - **`barcode_encoding`** `object` The encoding format for the barcode. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` Presently, `iso-8859-1` is the only supported value. Possible values: `iso-8859-1` - **`barcode_type`** `object` The type of barcode supported by the template. This value must be the same as the `barcode_type` set at the project level. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The format of the barcode supported by the project and resulting passes. Possible values: `pdf417`, `aztec`, `code128`, `qr`, `upc-a`, `ean-13`, `code-39` - **`barcode_value`** `object` The default value for the barcode used by the template. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` This value is a default for the barcode. You may set a new or personalized value when creating adaptive links or passes. - **`footer_image`** `object` The footer image for a template. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` - **`foreground_color`** `object` Sets the foreground color for the template. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `topLevel` for `color` and `text` headers. Possible values: `topLevel` - **`value`** `string` The `color` objects take an rgb value in the format `rgb(255, 255, 255)`. Format: `rgb` - **`header`** `object` Sets the generic pass header. Required for the generic pass type. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `topLevel` for `text` headers. Possible values: `topLevel` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` Header text field. Format: `text` - **`icon_image`** `object` The icon image for the template. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` - **`logo_image`** `object` Specifies the template logo image. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` - **`logo_text`** `object` Sets the text under the logo image. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The alternate text for the `logo_image`. - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` - **`strip_image`** `object` The image residing in the barcode strip. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` - **`subheader`** `object` Sets the optional generic pass subheader. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `topLevel` for `text` headers. Possible values: `topLevel` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` Header text field. Format: `text` - **`suppress_strip_shine`** `object` Determines whether or not to suppress the strip shine effect on barcodes. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `boolean` - **`thumbnail_image`** `object` An object containing the URL for the thumbnail image. **All of:** - [Optional fields for Google headers]({{< ref "/developer/rest-api/wallet/schemas/template-objects/" >}}#googleheaderitemshared) Header objects for Google Wallet templates use many of the same keys as fields on the template/pass. Populate these keys as necessary. Template responses include these keys with their default values. - - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `string` Indicates that the field takes a string value. While the `formatType` for non-header fields can be another data type, header fields always take string values. In general, you do not have to set this value. Airship can determine the `formatType` from the `fieldType`, and objects in the `headers` array are always String types. Possible values: `String` - **`value`** `string` The URL for the header image. Format: `url` **Used in:** - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example Google headers* ```json { "headers": { "barcode_type": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_value": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_label": { "fieldType": "barcode", "value": "", "notShared": true }, "barcode_encoding": { "fieldType": "barcode", "value": "", "notShared": true }, "barcodeAltText": { "fieldType": "barcode", "value": "", "notShared": true } } } ``` --- ## iOS fields {#iosfieldobject} Defines fields on iOS templates and subsequent passes generated from the template. [Jump to examples ↓](#iosfieldobject-examples) - **`fields`** `object` All non-header fields on an iOS template sit inside this object. **Used in:** - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example iOS field* ```json { "fields": { "Coupon": { "formatType": "String", "changeMessage": "Enjoy %@ off your next order!", "order": 1, "fieldType": "primary", "textAlignment": "textAlignmentRight", "value": "20%", "label": "coupon", "required": false, "hideEmpty": true } } } ``` --- ## iOS template headers {#iosheaders} The iOS template `headers` object can contain the following objects. Each object has a `formatType`, `fieldType`, and `value`. * `formatType` is always `1`, indicating that the `value` is a string. * `fieldType` is `topLevel` — a text or color value on the top-front of the pass, `image`, or `barcode`. * `value` is the default value for the header field. [Jump to examples ↓](#iosheaders-examples) - **`background_color`** `object` Sets the background color for the pass. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `topLevel` for `color` and `text` headers. Possible values: `topLevel` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The `color` objects take an rgb value in the format `rgb(255, 255, 255)`. Format: `rgb` - **`background_image`** `object` A background image for the pass. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` - **`barcodeAltText`** `object` Alternate text displayed below the barcode. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The alternate text for the barcode on the template. - **`barcode_encoding`** `object` The encoding format for the barcode. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` Presently, `iso-8859-1` is the only supported value. Possible values: `iso-8859-1` - **`barcode_type`** `object` The type of barcode supported by the template. This value must be the same as the `barcode_type` set at the project level. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The format of the barcode supported by the project and resulting passes. Possible values: `pdf417`, `aztec`, `code128`, `qr`, `upc-a`, `ean-13`, `code-39` - **`barcode_value`** `object` The default value for the barcode used by the template. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` This value is a default for the barcode. You may set a new or personalized value when creating adaptive links or passes. - **`footer_image`** `object` The footer image for a template. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` - **`foreground_color`** `object` Sets the foreground color for the template. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `topLevel` for `color` and `text` headers. Possible values: `topLevel` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The `color` objects take an rgb value in the format `rgb(255, 255, 255)`. Format: `rgb` - **`icon_image`** `object` The icon image for the template. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` - **`logo_color`** `object` Specifies the color of the logo on the template. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `topLevel` for `color` and `text` headers. Possible values: `topLevel` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The `color` objects take an rgb value in the format `rgb(255, 255, 255)`. Format: `rgb` - **`logo_image`** `object` Specifies the template logo image. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` - **`logo_text`** `object` Sets the text under the logo image. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The alternate text for the `logo_image`. - **`relevantDate`** `object` Sets the relevant date value that serves as the notification trigger for time-based pass relevance. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is a top-level pass attribute. Possible values: `topLevel` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The [date-time](/docs/developer/rest-api/wallet/introduction/#datetime-format) string indicating when the pass becomes relevant. - **`sharingStatus`** `object` A `field` determining 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 other `fields`, you only need to set the `value` within 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, `oneUserOneDevice` prohibits 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. Nullable: true - **`value`** `string` **REQUIRED** Determines whether a pass supports sharing across users, devices, or both. iOS interprets this as a boolean setting: `oneUserOneDevice` prohibits sharing; all other values allow sharing. Possible values: `multipleHolders`, `oneUserAllDevices`, `oneUserOneDevice` Default: `multipleHolders` - **`strip_image`** `object` The image residing in the barcode strip. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` - **`suppress_strip_shine`** `object` Determines whether or not to suppress the strip shine effect on barcodes. **OBJECT PROPERTIES** - **`fieldType`** `string` Set to `barcode` for all barcode headers. Possible values: `barcode` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `boolean` - **`thumbnail_image`** `object` An object containing the URL for the thumbnail image. **OBJECT PROPERTIES** - **`fieldType`** `string` Indicates that the `value` is an image. Possible values: `image` - **`formatType`** `integer` For iOS, a value of `1` indicates that the `formatType` for the field is a string. Possible values: `1` - **`value`** `string` The URL for the header image. Format: `url` **Used in:** - [Create template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createtemplate) - [Create template with external ID]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#createexternaltemplate) - [Get template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplate) - [Get template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#gettemplatesv2) - [Patch template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#patchtemplates) - [Update template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplate) - [Update template v2]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#updatetemplatesv2) **Examples** *Example iOS headers* ```json { "headers": { "logo_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(24,86,148)" }, "icon_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-icon.png" }, "logo_text": { "formatType": 1, "fieldType": "topLevel", "value": "Logo Text" }, "barcode_encoding": { "formatType": 1, "fieldType": "barcode", "value": "iso-8859-1" }, "suppress_strip_shine": { "formatType": 1, "fieldType": "topLevel", "value": "true" }, "logo_image": { "formatType": 1, "fieldType": "image", "value": "https:\/\/example.com\/passtools_prod\/1\/images\/default-pass-logo.png" }, "foreground_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(255,255,255)" }, "background_color": { "formatType": 1, "fieldType": "topLevel", "value": "rgb(49,159,196)" } } } ``` --- ## Linked Passes {#linkedpasses} An object containing a `passURIs` array of passes to link. [Jump to examples ↓](#linkedpasses-examples) - **`passURIs`** `array` <[Pass URIs]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#passuris)> A list of URIs identifying wallet passes to link. **Used in:** - [Auto link passes to existing Google Pass]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassid) - [Auto link passes to Google Pass with external ID]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassexternalid) - [Auto link passes to Google Pass with external template ID]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassandtemplateexternalid) **Examples** *Example linked passes object* ```json { "passURIs" : ["v1/pass/adaptive/fqsl9UyW3O7", "v1/pass/12345"] } ``` --- ## Location object {#locationobject} Represents a location on a pass or an adaptive link. Place objects in the locations array to add location information to passes and templates. Updating locations on a pass or template will replace all locations on that pass; if you want to add to the locations on a pass, you must provide all locations already included on the pass and any additional locations you want to add. Apple Wallet Each pass supports up to 10 locations. If you exceed this limit for an iOS pass, we will use the 10 locations nearest to a user (located by IP address) when they install the pass. [Jump to examples ↓](#locationobject-examples) - **`city`** `string` The location city. - **`country`** `string` The country abbreviation or name. - **`latitude`** `number` **REQUIRED** The latitude of the location. Format: `double` - **`longitude`** `number` **REQUIRED** The longitude of the location. Format: `double` - **`region`** `string` The region or state name. - **`regionCode`** `string` The region or zip code. - **`relevantText`** `string` An optional value shown as lock screen text for iOS when the device is close to this location. - **`streetAddress1`** `string` The first line of the location address. - **`streetAddress2`** `string` The second line of the location address. **Used in:** - [Add locations to pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#addlocationstopassfromtemplateexternalid) - [Add locations to pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#addlocationstopass) - [Add locations to template]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#addlocationstotemplate) - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createadaptivelink) - [Create Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalid) - [Create Adaptive Link in project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#createadaptivelinkexternalprojectid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Delete locations from pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#deletelocationfrompassfromtemplateexternalid) - [Delete locations from pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#deletelocationfrompass) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#updateadaptivelink) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) **Examples** *Example location object* ```json { "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" } ``` --- ## Pagination object {#paginationobject} Contains information about pagination, according to your query parameters. [Jump to examples ↓](#paginationobject-examples) - **`direction`** `string` The direction of results, ascending, or descending. Possible values: `ASC`, `DESC` - **`order`** `string` The key in the result set that you want to order results by. Defaults to `id`. - **`page`** `integer` The page you are on. Multiply by the page size to determine the result set on the page. - **`pageSize`** `integer` The number of results per page. - **`start`** `integer` The first result on the page; results begin with 0. **Used in:** - [Get template passes]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#getpassesbytemplate) - [List all tags]({{< ref "/developer/rest-api/wallet/operations/tags/" >}}#listalltags) - [List certificates]({{< ref "/developer/rest-api/wallet/operations/certificates/" >}}#getcertificates) - [List event passes]({{< ref "/developer/rest-api/wallet/operations/event-passes/" >}}#getpassesbyevent) - [List flight passes]({{< ref "/developer/rest-api/wallet/operations/flight-passes/" >}}#getpassesbyflight) - [List passes]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpasses) - [List passes for a tag]({{< ref "/developer/rest-api/wallet/operations/tags/" >}}#listpassesfortag) - [List passes for a tag]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#listpassesfortag) - [List passes for an Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpassesbyadaptivelink) - [List passes for an Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#getpassesbyadaptivelink) - [List passes for an Adaptive Link for a project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#getpassesbyadaptivelinkforproject) - [List passes for an Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#getpassesbyadaptivelinkforexternalproject) - [List projects]({{< ref "/developer/rest-api/wallet/operations/projects/" >}}#listprojects) - [List templates]({{< ref "/developer/rest-api/wallet/operations/templates/" >}}#listtemplates) **Examples** *Example list pagination* ```json { "pagination": { "order": "id", "page": 1, "start": 0, "direction": "DESC", "pageSize": 10 } } ``` --- ## Pass field updates {#fields} When updating a field on a pass or an adaptive link, you need only provide the following items. You cannot update the position of the field or other information held by the template — only the field label, value, and the message the user receives when their pass is updated. [Jump to examples ↓](#fields-examples) - **`changeMessage`** `string` The message that appears when you change the value or label for a field. Use `%@` to pass variables to the field. - **`label`** `string` The field label, usually represented as a title on the pass. Only provide the label if you want to use a different label than is provided by the template. - **`semantics`** `object` <[Boarding pass semantics]({{< ref "/developer/rest-api/wallet/schemas/flights-and-boarding-passes/" >}}#boardingpasssemantics)> **APPLE ONLY** Field-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`. - **`value`** `string` **REQUIRED** The default value for the field. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) **Examples** *Example update to a field called "Coupon"* ```json { "Coupon": { "changeMessage": "Enjoy %@ off your next order!", "value": "20%", "label": "Coupon" } } ``` --- ## Pass URIs {#passuris} A list of URIs identifying wallet passes to link. **Used in:** - [Auto link passes to existing Google Pass]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassid) - [Auto link passes to Google Pass with external ID]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassexternalid) - [Auto link passes to Google Pass with external template ID]({{< ref "/developer/rest-api/wallet/operations/google-passes-only/" >}}#autolinkedpassesforpassandtemplateexternalid) --- ## Passenger capabilities {#passengercapabilities} List of passenger capabilities. **Array items — Any of:** Possible values: `preBoarding` The passenger is eligible for pre-boarding. Possible values: `priorityBoarding` The passenger is eligible for priority boarding. Possible values: `carryOn` The passenger's fare allows them to bring a carry-on item. Possible values: `personalItem` The passenger's fare allows them to bring a personal item. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Passenger information SSRs {#passengerinformationssrs} A list of Special Service Requests (SSRs) information for passengers; supports any valid four-letter IATA SSR code in addition to those listed. `string` Allowed values: `infantLap` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Passenger name object {#passengernamesemanticsobject} - **`familyName`** `string` The person's family name or last name. - **`givenName`** `string` The person's given name; also called the forename or first name in some countries. - **`middleName`** `string` The person's middle name. - **`namePrefix`** `string` The prefix for the person's name, such as "Dr". - **`nameSuffix`** `string` The suffix for the person's name, such as "Junior". - **`nickname`** `string` The person's nickname. - **`phoneticRepresentation`** `string` The phonetic representation of the person's name. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Passenger seat object {#seatsemanticsobject} Seating information, including cabin class. - **`seatAisle`** `string` The aisle that contains the seat. - **`seatDescription`** `string` A description of the seat, such as a flat bed seat. - **`seatIdentifier`** `string` The identifier code for the seat. - **`seatLevel`** `string` The level that contains the seat. - **`seatNumber`** `string` The number of the seat. - **`seatRow`** `string` The row that contains the seat. - **`seatSection`** `string` The section that contains the seat. - **`seatSectionColor`** `string` A color associated with identifying the seat, specified as a CSS-style RGB triple, such as `rgb(23, 187, 82)`. - **`seatType`** `string` The type of seat, such as reserved seating. **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Passenger service SSRs {#passengerservicessrs} A list of Special Service Requests (SSRs) for passengers; supports any valid four-letter IATA SSR code in addition to those listed. `string` Allowed values: `wheelChair`, `serviceAnimal`, `carryOnPet`, `unAccompaniedMinor` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Schedule update object {#scheduleupdateobject} Specifies updates to passes or adaptive links at a particular date and time. [Jump to examples ↓](#scheduleupdateobject-examples) - **`name`** `string` A name for the schedule. - **`schedule`** `object` **OBJECT PROPERTIES** - **`scheduled_time`** `string` The ISO 8601 inclusive date, optionally including an offset, e.g., 2007-03-01T13:00:00+08:00. The value will be converted and stored as UTC. Format: `date-time` - **`update`** `object` The updates you want to make to an `audience` or `pass`, generated from a `template` within the project. Cannot also use the "notify" object when using "update". **OBJECT PROPERTIES** - **`audience`** `object` <[Audience selector]({{< ref "/developer/rest-api/wallet/schemas/audience-selection/" >}}#audienceselector)> Determines the passes you want to target. - **`pass`** `object` **OBJECT PROPERTIES** - **`fields`** `object` - **`url`** `string` A URL to get the schedule object. Format: `url` Read only: true **Used in:** - [Get schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#getschedule) - [List schedules]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#listschedules) - [Schedule an update or push notification]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#scheduleupdate) - [Update schedule]({{< ref "/developer/rest-api/wallet/operations/schedules/" >}}#updateschedule) **Examples** *Scheduled pass update* ```json { "name": "New Offer Update", "schedule": { "scheduled_time": "2017-04-10T18:45:00" }, "update": { "audience": { "tag": "TZ_ET" }, "pass": { "fields": { "primary1": { "value": "$20 Off" }, "secondary1": { "value": "Mega Offer" } } }, "template": "12345" } } ``` --- ## Segment selector {#segmentselector} Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. [Jump to examples ↓](#segmentselector-examples) **Any of:** AND selector - **`and`** `array` **One of:** - **`tag`** `string` - [Segment selector]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#segmentselector) Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. OR selector - **`or`** `array` **One of:** - **`tag`** `string` - [Segment selector]({{< ref "/developer/rest-api/wallet/schemas/others/" >}}#segmentselector) Boolean tag selectors specifying a group of passes. You can nest `AND` and `OR` selectors. NOT selector - **`not`** `object[object]` Defines an event value to match. **Used in:** - [Create segment]({{< ref "/developer/rest-api/wallet/operations/segments/" >}}#createsegment) - [Look up segment]({{< ref "/developer/rest-api/wallet/operations/segments/" >}}#getsegment) - [Update segment]({{< ref "/developer/rest-api/wallet/operations/segments/" >}}#updatesegment) **Examples** *Segment selector* ```json { "and": [ { "tag": "TZ_PST" }, { "not": { "tag": "TZ_ET" } } ] } ``` --- ## Transit security programs {#securityprograms} Security program names. **Array items — Any of:** Possible values: `tsaPreCheck` Wallet will display a TSA PreCheck icon on the boarding pass. Possible values: `tsaPrecheckTouchlessId` If present, Wallet will display a TSA PreCheck Touchless ID icon on the boarding pass. Possible values: `oss` One Stop Security. Possible values: `iti` International to International. Possible values: `itd` International to Domestic. Possible values: `globalEntry` Global Entry. Possible values: `clear` CLEAR **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflight) - [Create flight with external ID]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflightexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassexternalid) - [Create pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createpass) - [Create pass from a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#createpassfromtemplateexternalid) - [Generates a pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#createdynamiclink) - [Get flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#getflight) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#getpassfromtemplateexternalid) - [Get pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#getpass) - [Update flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#updateflight) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update pass for a template]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassfromtemplateexternalid) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Universal links {#universallinksobject} A list of key-value pairs that represents partner URLs. - **`accessibilityURL`** `string` The URL for special assistance. Format: `url` - **`bagPolicyURL`** `string` The URL for the bag policy information. Format: `url` - **`changeSeatURL`** `string` The URL for seat change. Format: `url` - **`entertainmentURL`** `string` The URL for inflight entertainment. Format: `url` - **`managementURL`** `string` The URL for managing the reservation. Format: `url` - **`orderFoodURL`** `string` The URL for ordering a meal. Format: `url` - **`purchaseAdditionalBaggageURL`** `string` The URL for adding/purchasing additional bags. Format: `url` - **`purchaseLoungeAccessURL`** `string` The URL for purchasing lounge access. Format: `url` - **`purchaseWifiURL`** `string` The URL for purchasing inflight Wi-Fi. Format: `url` - **`registerServiceAnimalURL`** `string` The URL for registering a service animal. Format: `url` - **`reportLostBagURL`** `string` The URL for reporting a lost bag. Format: `url` - **`requestWheelchairURL`** `string` The URL for requesting a wheelchair. Format: `url` - **`transitProviderEmail`** `string` The URL for the airline email address. Format: `email` - **`transitProviderPhoneNumber`** `string` The URL for the airline phone number. Format: `url` - **`transitProviderWebsiteURL`** `string` The URL for the airline website. Format: `url` - **`upgradeURL`** `string` The URL for upgrading a seat or fare. Format: `url` **Used in:** - [Create boarding pass or event ticket Adaptive Links]({{< ref "/developer/rest-api/wallet/operations/adaptive-links/" >}}#createboardingpassoreventticketadaptivelinks) - [Create flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflight) - [Create flight with external ID]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#createflightexternalid) - [Get flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#getflight) - [Update flight]({{< ref "/developer/rest-api/wallet/operations/flights/" >}}#updateflight) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes-with-external-ids/" >}}#updatepassexternalid) - [Update pass]({{< ref "/developer/rest-api/wallet/operations/passes/" >}}#updatepass) - [Update passes from Adaptive Link]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesexternalid) - [Update passes from Adaptive Link for an external project]({{< ref "/developer/rest-api/wallet/operations/adaptive-links-with-external-ids/" >}}#updatepassesfromadaptivelinkexternalid) --- ## Server Libraries Server libraries for using the Wallet API. # Wallet Python Library > Python library for using the Airship Wallet API.## Resources - [GitHub Repo](https://github.com/urbanairship/reach-python-library) - [Python Package Index (PyPI)](https://pypi.python.org/pypi/uareach) - [Wallet API Reference](https://www.airship.com/docs/developer/rest-api/wallet/) - [Python Wallet Library API Reference](https://www.airship.com/docs/reference/libraries/wallet/latest) > **Important:** Airship is no longer actively developing this library but will respond to feature requests, issues, and pull requests submitted to the [Airship Support site](https://support.airship.com). This library provides sample code, and Airship makes no guarantees as to completeness or regularity of updates. ## Installation Install using `pip`: ```bash pip install urbanairship ``` ## Example usage **Basic usage example** ```python import uareach as ua client = ua.Reach('email', 'wallet_key') my_pass = ua.get_pass(client, pass_id=12345) ```