# Visa Digital Benefits Platform

Search API Reference

- [Getting Started](https://developer.visa.com/capabilities/vdbp/docs-getting-started)
- [How to Use VDBP](https://developer.visa.com/capabilities/vdbp/docs-how-to)
- [Authentication Method](https://developer.visa.com/capabilities/vdbp/docs-authentication)
- [VDBP Response Codes & Descriptions](https://developer.visa.com/capabilities/vdbp/response-codes-and-descriptions)
- [Product Terms](https://developer.visa.com/capabilities/vdbp/product-terms)
- [Request & Response Codes](https://developer.visa.com/request_response_codes)

# Benefit File

## Benefit File  v1 - Latest

This endpoint retrieves the files associated to a benefit. The files are fetched based on the benefit. It is a GET request that requires the benefit id, the date, language, and file type as a parameter in the URL. The response will include a pdf or text file that can be downloaded. The benefit details are returned in a structured JSON format for easy parsing and integration with other systems.

### Request

##### query Parameters

|       |     |
|-------|-----|
| asOfDate | string<br>Permits historical, present or future looking views of account information (if this element is not provided, the default value is today) |
| benefitId<br>required | string<br>Id of the benefit that the files are associated with |
| download | string<br>Whether to download or inline (any value other than false is considered to be true) |
| fileKey<br>required | string<br>File key to identify unique file if there are multiple with the same code |
| fileTypeCd<br>required | string<br>File type code to filter files |
| language | string<br>File language to filter files |

### Responses

#### 200 Success

##### Response Schema:     text/plain                           text/plain  application/doc  application/pdf  application/octet-stream

string <binary>

#### 400 Bad Request (the request was unacceptable often due to required missing or invalid request parameters)

##### Response Schema: application/json

|       |     |
|-------|-----|
| correlationId | string 
[ 1 .. 100 ] characters <br>Id to track the request thru different system |
| message | string 
[ 10 .. 100 ] characters <br>Short Description about the Response |
| reason | string<br>Reason about the API Response<br>Enum:"SUCCESS" "MOD_10" "CLIENT_ERROR" "INVALID_INPUT" "INVALID_REQUEST_FORMAT" "NOT_FOUND" "NO_PORTFOLIO_FOUND" "NO_BENEFIT_PORTFOLIO_FOUND" "COULD_NOT_FIND_ACCOUNT_RANGE_FOR_CARD_NUM" "CONFLICTING_CARD_ACCOUNT_RANGES" "COULD_NOT_FIND_PRODUCT_TYPE_FOR_THE_CARD" "NO_ORGANIZATION_FOUND" "BIN_MANAGEMENT_IS_UNDEFINED" "MULTIPLE_CLE_TYP_FOUND" "PARSE_ERROR" "FORBIDDEN" "NOT_AUTHORIZED" "INTERNAL_SERVER_ERROR" "BIN_NOT_ASSOCIATED_WITH_ISSUER" "CAQ_PARSE_ERROR" "SERVICE_UNAVAILABLE_ERROR" "INVALID_USER_ID" "INVALID_MESSAGE_ID" "INVALID_APPLICATION_ID" "INVALID_PAN" "INVALID_DATE" "INVALID_PAN_LENGTH" "PAN_MISMATCH" "PACKAGE_NOT_FOUND" "UNSUPPORTED_MEDIA_TYPE" |
| requestMessageId | string 
[ 1 .. 100 ] characters <br>Id to track the request from the client |
| responseCode | string 
[ 3 .. 10 ] characters <br>Response Code from the API |
| status | integer <int32>  
[ 3 .. 100 ] <br>Status of the API Response |
| subResponseCode | string 
[ 3 .. 100 ] characters <br>Sub Response Code from the API for better debugging |

#### 401 Access Denied (not authorized for this request or lack of permission to access API)

##### Response Schema: application/json

#### 404 Not Found (unique or valid data could not be found for the request parameters)

##### Response Schema: application/json

#### 500 Internal Server Error

##### Response Schema: application/json

get/vdbp-benefits/getbenefitfile

Sandbox server

https://sandbox.api.visa.com/vdbp-benefits/getbenefitfile

## Response samples

- 400
- 401
- 404
- 500

application/json

```json
{"responseStatus": {"reason": "INVALID_INPUT",
"status": 400,
"message": "Invalid request parameter",
"responseCode": "17",
"correlationId": "VDBP_1001101",
"subResponseCode": "00",
"requestMessageId": "1111"
}}
```
