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.

See the Getting Started Guide 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 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 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

  • 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.

Libraries

Airship maintains open source server libraries to support your integrations with our APIs in multiple languages. Click below for library documentation.

Base URL

Select the domain associated with your Airship project.

  • 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://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

  • Basic Auth HTTP (basic)

    All Wallet operations use basic authorization. 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 you Project Key and Secret from your Wallet project. Go to Settings, then API.

    Only TLS 1.2 and TLS 1.3 are supported for Wallet API endpoint access. See also Mobile Wallet Reference: Security.