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

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.

Jump to examples ↓

POST /project/{projectId}/nfcMerchants

Security:

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 add or lookup NFC merchant information for. For External IDs, format the {projectId} as id/{projectExternalId}.

Request body:

  • Content-Type: application/json

    Describes NFC support for your project (and related templates/passes).

    OBJECT PROPERTIES
    • keyVersion integer

      The SSH protocol version for your key. Can be set to 1.

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

      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.

    • Content-Type: application/json

      A response contains information generated by Airship and/or gathered from Google Wallet services.

      All of
      • Describes NFC support for your project (and related templates/passes).

        OBJECT PROPERTIES
        • keyVersion integer

          The SSH protocol version for your key. Can be set to 1.

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

          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

      • OBJECT PROPERTIES
        • 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

        • merchantId string

          The Airship-generated UUID for your NFC merchant information.

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

Examples

Example request — Apple and Google vendors

POST /v1/project/13137/nfcMerchants HTTP/1.1
Authorization: Basic <authorization string>
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

POST /v1/project/id/13137/nfcMerchants HTTP/1.1
Authorization: Basic <authorization string>
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/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

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.

Jump to examples ↓

POST /project

Security:

Request headers:

  • Api-Revision stringREQUIRED
    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

    A project request determines the type of passes you can create and the types of barcode your passes will use.

Responses

  • 200

    Create a project. Your project is based around a pass type and your certificates.

    • Content-Type: application/json; charset=utf-8

      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.

Examples

Example request

POST /v1/project HTTP/1.1
Content-Type: application/json
Authorization: Basic <Base64 key>
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/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

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.

Jump to examples ↓

POST /project/id/{externalId}

Security:

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:

  • externalId stringREQUIRED
    The custom/external ID you want to use for your project.

Request body:

Create a project. Your project is based around a pass type and your certificates.

  • Content-Type: application/json; charset=utf-8

    A project request determines the type of passes you can create and the types of barcode your passes will use.

Responses

  • 200

    Create a project. Your project is based around a pass type and your certificates.

    • Content-Type: application/json; charset=utf-8

      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.

Examples

Example request

POST /v1/project/id/67890 HTTP/1.1
Content-Type: application/json
Authorization: Basic <Base64 key>
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/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

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 ↓

DELETE /project/{projectId}/nfcMerchants/{merchantId}

Security:

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 add or lookup NFC merchant information for. For External IDs, format the {projectId} as id/{projectExternalId}.
  • merchantId stringREQUIRED
    The merchant ID you want to modify.

Responses

  • 200

    The merchant information was deleted.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • merchantId string

        The merchant ID that you deleted.

      • updatedAt string

        The date and time when the merchant information was deleted.

Examples

Example request

DELETE /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

DELETE /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request

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

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 call, with new identifiers for the new project.

Jump to examples ↓

POST /project/duplicate/{projectId}

Security:

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 you want to duplicate. For External IDs, format the {projectId} as id/{externalId}.

Responses

  • 200

    A project and a list of templates within the project.

    • Content-Type: application/json

      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.

Examples

Example request

POST /v1/project/duplicate/12345 HTTP/1.1
Authorization: Basic <Base64 key>
Api-Revision: 1.2

Response

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

POST /v1/project/duplicate/id/67890 HTTP/1.1
Authorization: Basic <Base64 key>
Api-Revision: 1.2

Response with external ID

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

Get an individual NFC merchant.

Jump to examples ↓

GET /project/{projectId}/nfcMerchants/{merchantId}

Security:

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 add or lookup NFC merchant information for. For External IDs, format the {projectId} as id/{projectExternalId}.
  • merchantId stringREQUIRED
    The merchant ID you want to modify.

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.

    • Content-Type: application/json

      A response contains information generated by Airship and/or gathered from Google Wallet services.

      All of
      • Describes NFC support for your project (and related templates/passes).

        OBJECT PROPERTIES
        • keyVersion integer

          The SSH protocol version for your key. Can be set to 1.

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

          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

      • OBJECT PROPERTIES
        • 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

        • merchantId string

          The Airship-generated UUID for your NFC merchant information.

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

Examples

Example request

GET /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

GET /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

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

Get the project with the specified id. The response includes information about the project (set when Creating a Project) and an array of templates associated with the project. The templates array contains all the information found in the templateHeader object.

Jump to examples ↓

GET /project/{projectId}

Security:

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. For External IDs, format the {projectId} as id/{externalId}.

Responses

  • 200

    A project and a list of templates within the project.

    • Content-Type: application/json

      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.

Examples

Example request

GET /v1/project/12345 HTTP/1.1
Authorization: Basic <Base64 key>
Api-Revision: 1.2

Response

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

GET /v1/project/id/myProject HTTP/1.1
Authorization: Basic <Base64 key>
Api-Revision: 1.2

Response with external ID

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

Return all NFC merchant information for a project.

Jump to examples ↓

GET /project/{projectId}/nfcMerchants

Security:

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 add or lookup NFC merchant information for. For External IDs, format the {projectId} as id/{projectExternalId}.

Responses

  • 200

    Returns all NFC merchants associated with your Airship Wallet project.

    • Content-Type: application/json
      OBJECT PROPERTIES
      • merchants array

Examples

Example request

GET /v1/project/13137/nfcMerchants HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Example request with external ID

GET /v1/project/id/13137/nfcMerchants HTTP/1.1
Authorization: Basic <authorization string>
Api-Revision: 1.2

Response

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

List the projects belonging to you.

Jump to examples ↓

GET /project

Security:

Query parameters:

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

  • Api-Revision stringREQUIRED
    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.

    • Content-Type: application/json; charset=utf-8
      OBJECT PROPERTIES
      • count string

        The total number of results.

      • pagination object<Pagination object>

        Contains information about pagination, according to your query parameters.

      • projects array

Examples

Example request

GET /v1/project HTTP/1.1
Authorization: Basic <Base64 key>
Api-Revision: 1.2

Response

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

Update your NFC merchant information.

Jump to examples ↓

PUT /project/{projectId}/nfcMerchants/{merchantId}

Security:

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 add or lookup NFC merchant information for. For External IDs, format the {projectId} as id/{projectExternalId}.
  • merchantId stringREQUIRED
    The merchant ID you want to modify.

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

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

    • Content-Type: application/json

      A response contains information generated by Airship and/or gathered from Google Wallet services.

      All of
      • Describes NFC support for your project (and related templates/passes).

        OBJECT PROPERTIES
        • keyVersion integer

          The SSH protocol version for your key. Can be set to 1.

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

          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

      • OBJECT PROPERTIES
        • 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

        • merchantId string

          The Airship-generated UUID for your NFC merchant information.

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

Examples

Example request

PUT /v1/project/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "merchantName": "Example Merchant",
  "merchantEmail": "my_merchant@example.com"
}

Example request with external ID

PUT /v1/project/id/13137/nfcMerchants/23c0da58-3b79-4d44-9191-b69faef7b24c HTTP/1.1
Authorization: Basic <authorization string>
Content-Type: application/json
Api-Revision: 1.2

{
  "merchantName": "Example Merchant",
  "merchantEmail": "my_merchant@example.com"
}

Response

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

Update a project.

Jump to 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 are unchanged.

Security:

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. For External IDs, format the {projectId} as id/{externalId}.

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

    A project request determines the type of passes you can create and the types of barcode your passes will use.

Responses

  • 200

    Returns project metadata and a list of templates for the project.

    • Content-Type: application/json

      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.

Examples

Example request

PUT /v1/project/12345 HTTP/1.1
Content-Type: application/json
Authorization: Basic <Base64 key>
Api-Revision: 1.2

{
  "name": "New And Improved Name",
  "description": "Significantly more detailed description"
}

Response

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

PUT /v1/project/id/myProject HTTP/1.1
Content-Type: application/json
Authorization: Basic <Base64 key>
Api-Revision: 1.2

{
  "name": "New And Improved Name",
  "description": "Significantly more detailed description"
}

Response with external ID

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