# Visa BIN Attribute Sharing Service
Visa BIN Attribute Sharing Service

## Version: 1

### Servers

| URL | Description |
| --- | ----------- |
| https://sandbox.api.visa.com | Sandbox server |

---
## BIN File Transfer
Transfer Account/Token Range File

### [POST] /filedeliveryservice/v1/binFileTransfer
**BIN File Transfer**

Get access to a BIN Account/Token Range file in csv format

#### Request Body

BIN File Transfer request payload

| Required | Schema |
| -------- | ------ |
|  Yes | **application/json**: { **"requestData"**: { **"fileName"**: string }, **"requestHeader"**: { **"requestTS"**: string (YYYY-MM-DDThh:mm:ss.sss), **"requestMessageId"**: string } }<br> |

#### Responses

| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | BinFileTransfer Response | **application/json**: object<br> |
| 400 | Request Data Invalid |  |
| 401 | Unauthorized |  |
| 500 | Error Codes | **application/json**: { **"CDI001"**: object, **"CDI002"**: object, **"CDI012"**: object, **"CDI052"**: object, **"CDI071"**: object, **"CDI249"**: object, **"CDI250"**: object }<br> |

---
### Schemas

#### errorCodes Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| CDI001 | object | Internal service failure | No |
| CDI002 | object | XML Parsing Failure | No |
| CDI012 | object | Request header length is invalid | No |
| CDI052 | object | Client Authentication failed | No |
| CDI071 | object | Exception in Group level entitlement process | No |
| CDI249 | object | Payment Account Type validation failure | No |
| CDI250 | object | Atleast one of the required/mandatory fields is missing in the request | No |

#### BinFileTransferResponse Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| BinFileTransferResponse | object |  |  |

#### responseData Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| responseData | object |  |  |

#### requestHeader Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| requestTS | string (YYYY-MM-DDThh:mm:ss.sss) | Date and time at which Request is sent (up to milliseconds in GMT). Ex: 2008-09-19T00:00:00.000 | Yes |
| requestMessageId | string | A string which uniquely identifies the service request. Requesting application need to create this unique message Id | Yes |

#### requestData Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| fileName | string | Name of the file | Yes |

#### BinFileTransferRequest Schema

| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| requestData | { **"fileName"**: string } |  | No |
| requestHeader | { **"requestTS"**: string (YYYY-MM-DDThh:mm:ss.sss), **"requestMessageId"**: string } |  | No |
