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.

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 ↓

POST /links/adaptive

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

  • Content-Type: application/json

    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.

  • 200

    A successful request results in an adaptive link.

    • Content-Type: application/json

      An adaptive link response includes URLs that users can access to detect and install a pass.

  • 404

    Could not find template(s), or could not find or create Dynamic Link object(s).

Example request

POST /v1/links/adaptive HTTP/1.1
Authorization: Basic <authorization string>
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

POST /v1/links/adaptive HTTP/1.1
Authorization: Basic <authorization string>
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

POST /v1/links/adaptive HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json

{
  "iosTemplateId": 12345,
  "androidTemplateId": 154321,
  "isPersonalized": "true",
  "payload": {"fields": {"tier": {"value": "gold"}}}
}

Example request with locations

POST /v1/links/adaptive HTTP/1.1
Authorization: Basic <authorization string>
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": "Portland",
         "country": "US",
         "region": "OR",
         "regionCode": "97209",
         "relevantText": "Welcome to the Ship!",
         "streetAddress1": "1417 NW Everett St #300",
         "streetAddress2": ""
      },
      {
         "latitude": 45.5205,
         "longitude": -122.6788,
         "relevantText": "See you at dinner tonight… or did you already hit voodoo donuts?"
      }
]
}

Response

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

POST /links/adaptive/multiple/project/{projectId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId stringREQUIRED
    The project you want to create the boarding pass in.

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

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

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

    • Content-Type: application/json
      OBJECT PROPERTIES
      • An array of adaptive links.

Example boarding pass request

POST /v1/links/adaptive/multiple/project/12345 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json

{
  "iosTemplateExternalId": "ios123ExtId",
  "androidTemplateExternalId": "android123ExtId",
  "payload": {
    "flights": [
      {
        "flightExternalId": "flight123ExtId",
        "fields": {
          "flightNumber": { "value": "815" },
          "airlineCode": { "value": "WN" },
          "airlineName": { "value": "Southwest 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/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"
    },
  ]
}

Deletes an adaptive link.

Jump to examples ↓

DELETE /links/adaptive/{adaptiveLinkId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • adaptiveLinkId stringREQUIRED
    The ID of the adaptive link.
  • 200

    The adaptive link was successfully deleted. A successful operation returns no content.

  • 404

    Could not find an entry with specified adaptiveLinkId.

Example request

DELETE /v1/links/adaptive/rthBWAWDaAA HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

HTTP/1.1 200 OK
Content-Type: application/json

{}

Generates a multi-pass bundle from an Adaptive Link.

Jump to examples ↓

GET /pass/adaptive

Query parameters:

  • ids stringREQUIRED
    Comma-separated Adaptive Link IDs to bundle.
  • deviceType stringREQUIRED
    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:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

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

    • Content-Type: application/json

      Type: object

      A publicUrl for Android users or the landing page URL if the device type was set to web or was not specified.

    • Content-Type: application/vnd.apple.pkpass

      Type: object

      A .pkpass file for iOS users.

  • 404

    Could not find an entry with specified adaptiveLinkId.

Example iOS request

GET /v1/pass/adaptive?ids=rthBWAWDaAA,Y0E6EXuTx5i&deviceType=ios HTTP/1.1

iOS response

HTTP/1.1 200 OK
Content-Type: application/vnd.apple.pkpass

[.pkpass]

Example Android request

GET /v1/pass/adaptive?ids=rthBWAWDaAA,Y0E6EXuTx5i&deviceType=android HTTP/1.1

Android response

HTTP/1.1 301 Redirect

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 ↓

GET /pass/adaptive/{adaptiveLinkId}/{deviceType}

Query parameters:

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

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • adaptiveLinkId stringREQUIRED
    The identifier of the adaptive link you want to create a pass from.
  • deviceType stringREQUIRED
    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

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

    • Content-Type: application/json

      Type: object

      A publicUrl for Android users or the landing page URL if the device type was set to web or was not specified.

    • Content-Type: application/vnd.apple.pkpass

      Type: object

      A .pkpass file for iOS users.

  • 404

    Could not find an entry with specified adaptiveLinkId.

Example iOS request

GET /v1/pass/adaptive/rthBWAWDaAA/ios HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

iOS response

HTTP/1.1 200 OK
Content-Type: application/vnd.apple.pkpass

[.pkpass]

Example Android request

GET /v1/pass/adaptive/rthBWAWDaAA/android HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Android response

HTTP/1.1 301 Redirect

Returns information about a single adaptive link.

Jump to examples ↓

GET /links/adaptive/{adaptiveLinkId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • adaptiveLinkId stringREQUIRED
    The ID of the adaptive link.
  • 200

    Lists urls and available passes for an individual link.

    • Content-Type: application/json

      An adaptive link response includes URLs that users can access to detect and install a pass.

  • 404

    Could not find an entry with specified adaptiveLinkId.

Example request

GET /v1/links/adaptive/abchd345678 HTTP/1.1
Authorization: Basic <authorization string>

Response

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
}

Returns a list of adaptive links.

Jump to examples ↓

GET /links/adaptive

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

  • 200

    Returns a list of all adaptive links for the account.

    • Content-Type: application/json
      OBJECT PROPERTIES

Example request

GET /v1/links/adaptive HTTP/1.1
Authorization: Basic <authorization string>

Response

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

Returns a list of adaptive links for a project.

Jump to examples ↓

GET /links/adaptive/projects/{projectId}

Security:

Query parameters:

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

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId stringREQUIRED
    The ID of the project.

Responses

  • 200

    Returns a list of all adaptive links for a project.

    • Content-Type: application/json
      OBJECT PROPERTIES

Examples

Example request

GET /v1/links/adaptive/projects/7331?pageSize=2 HTTP/1.1
Authorization: Basic <authorization string>

Response

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

Returns a list of adaptive links for a template.

Jump to examples ↓

GET /links/adaptive/projects/{projectId}/templates/{templateId}

Security:

Query parameters:

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

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId stringREQUIRED
    The ID of the project.
  • templateId stringREQUIRED
    The ID of the template.

Responses

  • 200

    Returns a list of all adaptive links for a template.

    • Content-Type: application/json
      OBJECT PROPERTIES

Examples

Example request

GET /v1/links/adaptive/projects/7331/templates/106178 HTTP/1.1
Authorization: Basic <authorization string>

Response

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.

Jump to examples ↓

GET /links/adaptive/{adaptiveLinkId}/passes

Query parameters:

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

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • adaptiveLinkId stringREQUIRED
    The adaptive link ID used for pass creation.
  • 200

    A successful request returns a paged list of passes for a particular adaptive link.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • count integer

        The total number of passes associated with an adaptive link.

      • pagination object<Pagination object>

        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.

Example request

GET /v1/links/adaptive/rthBWAWDaAA/passes HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

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

List passes for an adaptive link for a project.

Jump to examples ↓

GET /links/adaptive/project/{projectId}/id/{adaptiveLinkExternalId}/passes

Security:

Query parameters:

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

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectId stringREQUIRED
    The ID of the project, generated by Airship, containing the adaptive link.
  • adaptiveLinkExternalId stringREQUIRED
    The adaptive link external ID used for pass creation.

Responses

  • 200

    A successful request returns a paged list of passes for a particular adaptive link.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • count integer

        The total number of passes associated with an adaptive link.

      • pagination object<Pagination object>

        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

GET /v1/links/adaptive/project/6884/id/my_ext_121924_2/passes HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

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

List passes for an adaptive link for an external project.

Jump to examples ↓

GET /links/adaptive/project/id/{projectExternalId}/id/{adaptiveLinkExternalId}/passes

Security:

Query parameters:

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

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • projectExternalId stringREQUIRED
    The external ID of the project containing an adaptive link.
  • adaptiveLinkExternalId stringREQUIRED
    The adaptive link external ID used for pass creation.

Responses

  • 200

    A successful request returns a paged list of passes for a particular adaptive link.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • count integer

        The total number of passes associated with an adaptive link.

      • pagination object<Pagination object>

        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

GET /v1/links/adaptive/project/id/exid_7294/id/my_ext_flight_111924_2/passes HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

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
  }
}

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 ↓

PUT /links/adaptive/{adaptiveLinkId}

Request headers:

  • Api-Revision stringREQUIRED
    The particular API revision you want to use. In general, this is 1.2.

    Possible values: 1.2

Path parameters:

  • adaptiveLinkId stringREQUIRED
    The ID of the adaptive link.

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

    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.

  • 200

    A successful request results in an adaptive link.

    • Content-Type: application/json

      An adaptive link response includes URLs that users can access to detect and install a pass.

  • 404

    Could not find templates or Dynamic Link object(s).

Example request

PUT /v1/links/adaptive/as3shd345 HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json

{
   "iosTemplateId": 12345,
   "androidTemplateId": 154321,
   "isPersonalized": "true",
   "landingPageUrl": "https://example.com/landing.html",
   "payload": {"fields": {"tier": {"value": "gold"}}}
}

Response

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
}