# Alias Directory Service

Search API Reference

- [Getting Started with Visa Alias Directory Service](https://developer.visa.com/capabilities/alias-directory-service/docs-getting-started)
- [Use Cases and Implementation Examples](https://developer.visa.com/capabilities/alias-directory-service/alias-directory-use-cases)
- [Authentication and Encryption](https://developer.visa.com/capabilities/alias-directory-service/docs-authentication)
- [How to Use Visa Alias Directory Service](https://developer.visa.com/capabilities/alias-directory-service/docs-how-to)
- [How to Use Directory Network Manager](https://developer.visa.com/capabilities/alias-directory-service/docs-how-to-use-dnm)
- [How to Use Batch Processing](https://developer.visa.com/capabilities/alias-directory-service/docs-how-to-use-batch)
- [Error Codes](https://developer.visa.com/capabilities/alias-directory-service/docs-error-codes)
- [Frequently Asked Questions](https://developer.visa.com/capabilities/alias-directory-service/faq)
- [Product Terms](https://developer.visa.com/capabilities/alias-directory-service/ProductTerms)
- [Request & Response Codes](https://developer.visa.com/request_response_codes)

# Alias Lifecycle Management

These are the API specifications for Alias Directory 2.0.

Alias Lifecycle Management Bundle

## Get All Payment Credentials  v1 - Latest

Get all _Payment Credentials_ of an existing **Alias**

### Request

##### path Parameters

|     |     |
| --- | --- |
| aliasId<br>required | string 36 characters <br>The UUID generated by Alias Directory which identifies the create report request.<br>Example: e336c8c8-2945-4be3-af3e-951ec2d01219 |

### Responses

#### 200
OK - Get All Payment Credentials Response

##### Response Schema: application/json

Array

Any of:

CardGetResponseBankGetResponse

|     |     |
| --- | --- |
| accountNumber<br>required | string [ 12 .. 19 ] characters ^\d*$<br>Primary account number of the card<br>Example: "4111111145551142" |
| billingAddress<br>required | object |
| |     |     |
| --- | --- |
| country<br>required | string <We recommend to use the Alpha-3>  3 characters <br>Country code using 3-character ISO 3166 (Alpha 3) format<br>ISO20022 element name: Creditor -> Postal Address -> Country<br>Example: "USA" |
| addressLine1 | string [ 0 .. 99 ] characters <br>Address line 1<br>ISO20022 element name: Creditor -> Postal Address -> Address Line<br>Example: "1000 Market Street" |
| addressLine2 | string [ 0 .. 99 ] characters <br>Address line 2<br>ISO20022 element name: Creditor -> Postal Address -> Address Line<br>Example: "Suite 101" |
| buildingNumber | string [ 1 .. 60 ] characters <br>Building number<br>ISO20022 element name: Creditor -> Postal Address -> Building Number<br>Example: "56" |
| city | string [ 1 .. 35 ] characters <br>City<br>ISO20022 element name: Creditor -> Postal Address -> Town Name<br>Example: "San Francisco" |
| minorSubdivisionCode | string [ 1 .. 50 ] characters <br>Minor Subdivision Code<br>ISO20022 element name: Creditor -> Postal Address -> Country Sub Division<br>Example: "CA" |
| postalCode | string [ 1 .. 16 ] characters <br>Postal code number of the addresses<br>ISO20022 element name: Creditor -> Postal Address -> Postal Code<br>Example: "94105" |
| state | string <We recommend to use the ISO 3166-2>  [ 1 .. 16 ] characters <br>State (ISO 3166-2)<br>Example: "CA" |
| streetName | string [ 1 .. 60 ] characters <br>Street Name<br>Example: "12" | |
| type<br>required | string<br>In this case, the value must be `CARD`<br>Enum:"BANK""CARD"<br>Example: "CARD" |
| accountNumberType | string<br>Card account number type. Valid values: 'NIUBIZ', 'PAN' and 'TOKEN'.<br>Enum:"NIUBIZ""PAN""TOKEN"<br>Example: "TOKEN" |
| cardType | string [ 1 .. 70 ] characters <br>Card type description. Reference to Field 62.23—Product ID of available card products. e.g. Visa Platinum.<br>Example: "Visa Platinum" |
| createdOn | string <date-time> \d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.000Z<br>Date when it was initially created<br>Example: "2021-06-21T13:00:00.645Z" |
| currencyCode | string 3 characters <br>Recipient card currency code<br>Format: 3-character ISO-4217 (Alpha-3) currency code<br>(Refer to Payouts Endpoint Guide on country-specific required fields and lengths)<br>ISO20022 field name: Creditor Account Currency<br>Example: "USD" |
| expirationDate | string <YYYY-MM> <br>Expiration date for the card. This is required for certain markets.<br>Example: "2026-01" |
| externalId | string [ 1 .. 100 ] characters <br>externalId is a client-provided identifier for the payment credential. If clients already use an identifier for the payment credential in their internal systems, they can re-use the same value here and manage the payment credential with this identifier.<br>Example: "63421837-d597-4f0f-89e4-930c1a7b9e85" |
| id | string 36 characters <br>This is an UUID generated by Alias Directory which identifies the payment credential<br>Example: "a44c9553-e687-4f3c-b7e7-a4245d9f238e" |
| issuerName | string [ 1 .. 150 ] characters <br>Name of the issuer of the card<br>Example: "Bank A" |
| lastFourDigits | string 4 characters ^\d*$<br>Last four digits of the PAN of the card<br>Example: "1142" |
| lastUpdatedOn | string <date-time> \d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.000Z<br>Date when it was last modified. This field comes in the response only if any field in the PC was modified/updated.<br>Example: "2021-06-22T15:12:00.322Z" |
| nameOnCard | string [ 1 .. 120 ] characters <br>Name that appears on the Card. Clients in CEMEA and the EU must use only one first letter of customer’s last name followed by dot symbol to create or modify an Alias record. For example, Alias record for customer John Smith should be created or modified by Participant with First and Last name fields as 'John S.'<br>Example: "Alex Miller" |
| preferredFor | Array of objects [ 0 .. 3 ] items <br>Indicates if a payment credential is a preferred **Receiving**, **Sending**, or **Paying** account. **Receiving** allows for funds to be pushed into the payment credential. **Sending** allows for funds to be sent from the payment credential. **Paying** allows for the payment credential to be used for purchases. More than one preferred type can be used. |
| Array

|     |     |
| --- | --- |
| type<br>required | string<br>Enum:"RECEIVE""SEND""PAY" |
| date | string <date-time> <br>Date and time when set as preferred<br>Example: "2021-01-01T22:52:46Z" | |
| status | string<br>Payment Credential status. DELETED payment credentials won't be returned.<br>Enum:"ACTIVE""BLOCKED""DISABLED""EXPIRED"<br>Example: "ACTIVE" |

#### 400
Bad Request. Returned when any field validations fails or when any required fields is missing or when request is inconsistent with the Request definitions.

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorCode<br>required | string [ 0 .. 10 ] characters <br>Code to identify the type of error. The value will be `400` in this case.<br>Example: "400" |
| errorMessages<br>required | Array of strings<br>Description of the error reason<br>Example: ["getPaymentCredentials.aliasId: size must be between 0 and 36"] |

#### 404
Not Found. The server can't find the requested resource.

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorCode<br>required | string [ 0 .. 10 ] characters <br>Code to identify the type of error.<br>Example: "LDS-30002" |
| errorMessages<br>required | Array of strings<br>Description of the error reason<br>Example: ["Alias not found"] |

#### 500
Internal Server Error

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorCode<br>required | string [ 0 .. 10 ] characters <br>Code to identify the type of error. The value will be `500` in this case.<br>Example: "500" |
| errorMessages<br>required | Array of strings<br>Description of the error reason<br>Example: ["Internal Server Error"] |

get/aliasdirectory/v1/aliases/{aliasId}/paymentCredentials

Sandbox server

https://sandbox.api.visa.com/aliasdirectory/v1/aliases/{aliasId}/paymentCredentials

Response samples

- 200
- 400
- 404
- 500

application/json

```json
[
  {
    "id": "a44c9553-e687-4f3c-b7e7-a4245d9f238e",
    "accountNumberType": "TOKEN",
    "type": "CARD",
    "cardType": "Visa Platinum",
    "issuerName": "Bank A",
    "nameOnCard": "Alex Miller",
    "currencyCode": "USD",
    "accountNumber": "4111111145551142",
    "billingAddress": {
      "city": "San Francisco",
      "state": "CA",
      "country": "USA",
      "postalCode": "94105",
      "streetName": "12",
      "addressLine1": "1000 Market Street",
      "addressLine2": "Suite 101",
      "buildingNumber": "56",
      "minorSubdivisionCode": "CA"
    },
    "expirationDate": "2026-01",
    "lastFourDigits": "1142",
    "externalId": "63421837-d597-4f0f-89e4-930c1a7b9e85",
    "preferredFor": [{
      "date": "2021-01-01T22:52:46Z",
      "type": "RECEIVE"
    }],
    "status": "ACTIVE",
    "createdOn": "2021-06-21T13:00:00.645Z",
    "lastUpdatedOn": "2021-06-22T15:12:00.322Z"
  }
]
```
