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


[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 <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*

```http
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
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 <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
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 <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
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 <authorization string>
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 <authorization string>
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 <Base64 key>
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 <Base64 key>
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 <authorization string>
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 <authorization string>
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 <Base64 key>
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 <Base64 key>
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 <authorization string>
Api-Revision: 1.2

```

*Example request with external ID*

```http
GET /v1/project/id/13137/nfcMerchants HTTP/1.1
Authorization: Basic <authorization string>
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 <Base64 key>
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 <authorization string>
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 <authorization string>
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 <Base64 key>
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 <Base64 key>
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"
}

```

---

