Files
Get file details and it's binary data.
GET /v1/consumer/files/{fileReference}
Supports dynamic token replacement in file retrieval URLs. Any query string parameters passed to this endpoint. will be used to replace tokens in the format [tokenName] in the file's retrieval URL. Example: calling with ?fromDate=2002-11-10&endDate=2023-11-10 will replace [fromDate] and [endDate] tokens. Tokens without matching query parameters are replaced with empty strings.
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
fileReference | path | Yes | A globally unique internal file reference (UUID). |
Responses
| Status | Description |
|---|---|
200 | The request was successful but does not return any results. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
result | object | No | A file attached to a consumer record, such as a proof of identity or supporting KYC document. |
{
"success": true,
"result": {
"fileType": "Unspecified",
"kycResults": [],
"reference": "00000000-0000-0000-0000-000000000000",
"yourReference": "string",
"description": "string",
"fileName": "string",
"mimeType": "string",
"base64Data": "string",
"createdDate": "string",
"lastUpdatedDate": "string",
"isActive": true
}
}Code samples
// @vantagepay/vantagepay
const file = await client.consumers.downloadFile('99998888-7777-6666-5555-444433332211')
console.log(file?.fileName, file?.base64Data)// VantagePay.SDK
var file = await client.Consumers.DownloadFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"));Send file via email using the configured email delivery URL.
POST /v1/consumer/files/{fileReference}/email
If the file has an EmailFileUrl configured, this endpoint will call that URL to trigger email delivery. If no URL is configured, the system will fall back to using the email queue service (not yet implemented). Supports dynamic token replacement similar to GetFileAsync.
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
fileReference | path | Yes | A globally unique internal file reference (UUID). |
emailAddress | query | No | The emails recipient's email address. |
Responses
| Status | Description |
|---|---|
200 | The request was successful but does not return any results. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.emailFile('99998888-7777-6666-5555-444433332211', 'customer@example.com')// VantagePay.SDK
await client.Consumers.EmailFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"), "customer@example.com");Send file via SMS using the configured SMS delivery URL.
POST /v1/consumer/files/{fileReference}/sms
If the file has an SmsFileUrl configured, this endpoint will call that URL to trigger SMS delivery. If no URL is configured, the system will fall back to using the SMS queue service (not yet implemented). Supports dynamic token replacement similar to GetFileAsync.
Auth: Access token (Bearer).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
fileReference | path | Yes | A globally unique internal file reference (UUID). |
msisdn | query | No | The SMS recipient's mobile number. |
Responses
| Status | Description |
|---|---|
200 | The request was successful but does not return any results. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
{
"success": true
}Code samples
// @vantagepay/vantagepay
await client.consumers.smsFile('99998888-7777-6666-5555-444433332211', '233555666112')// VantagePay.SDK
await client.Consumers.SmsFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"), "233555666112");