Overview
The File Upload API allows you to schedule bulk FI requests by uploading a file containing consent IDs and optional configuration.
Notes
- Supported file formats are CSV and JSON only.
- Maximum file size is 10 MB.
- Files must be UTF-8 encoded (without BOM for CSV).
Authentication
This API requires authentication using the following headers:
Your unique client identifier provided by FinPro during onboarding.
Your confidential client secret key provided by FinPro.
The unique identifier for your application.
Your organization’s unique identifier assigned by FinPro.
Must be set to multipart/form-data.
Request Parameters
The request uses multipart form data with the following fields:
The CSV or JSON file containing consent IDs and optional per-row configuration. Maximum size: 10 MB.
Optional batch identifier (5-60 characters, alphanumeric with hyphens and underscores). If omitted, the server generates one.
Optional alias for reference_id. If both are provided, reference_id is used.
Optional JSON or JSON string with global defaults: fiDataRangeFrom, fiDataRangeTo, configId.
Optional alias for global_config.
Global default start date for financial data (ISO 8601 format). Applied to rows that don’t specify their own value.
Global default end date for financial data (ISO 8601 format). Applied to rows that don’t specify their own value.
Global default analytics configuration ID. Applied to rows that don’t specify their own value.
The CSV file must have a header row with the following columns:
| Column | Required | Description |
|---|
consentId | Yes | The consent identifier (UUID format) |
fiDataRangeFrom | No | Start date override (ISO 8601 format) |
fiDataRangeTo | No | End date override (ISO 8601 format) |
configId | No | Analytics config override |
CSV Example:
consentId,fiDataRangeFrom,fiDataRangeTo,configId
54450ac0-8bcb-4b9c-ad74-29b4fabe18f7,2024-01-01T00:00:00Z,2024-06-30T23:59:59Z,config-1
7b2d9e3a-1f4c-4a8b-9c6d-2e5f8a9b0c1d,,,config-2
9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d,2024-07-01T00:00:00Z,2024-12-31T23:59:59Z,
CSV Rules:
- Header row is required
- UTF-8 encoding (no BOM)
- Comma delimiter
- Empty cells use the global defaults provided in form data
- Wrap values in quotes if they contain commas
The JSON file can be either an array or an object with a consents_list array:
[
{ "consent_id": "54450ac0-8bcb-4b9c-ad74-29b4fabe18f7", "fiDataRangeFrom": "2024-01-01T00:00:00Z", "fiDataRangeTo": "2024-06-30T23:59:59Z", "configId": "config-1" },
{ "consentId": "7b2d9e3a-1f4c-4a8b-9c6d-2e5f8a9b0c1d", "configId": "config-2" }
]
Both consent_id and consentId are accepted in JSON rows.
Response Parameters
The API version that processed the request.
The timestamp when the response was generated (ISO 8601 format).
A unique transaction ID for this API call.
The status of the API call. Returns "success" when the file is accepted.
A human-readable message describing the result.
Contains batch details and tracking information.
The reference ID you provided for this batch.
An internal batch identifier generated by the system.
Storage location for the uploaded file (database or s3).
The current batch status. Initially "FILE_UPLOADED".
Success Response Example
{
"ver": "1.0",
"timestamp": "2024-11-10T12:00:00Z",
"txnid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "success",
"message": "File uploaded successfully",
"data": {
"reference_id": "batch-20251110-002",
"batch_id": "7c3e8a92-4b5d-6f7e-8a9b-0c1d2e3f4a5b",
"storage_type": "database",
"status": "FILE_UPLOADED"
}
}
Error Responses
Unsupported File Type
When the uploaded file is not CSV or JSON:
{
"ver": "1.0",
"timestamp": "2024-11-10T12:00:00Z",
"txnid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"errorCode": "UnsupportedFileType",
"errorMsg": "Only JSON or CSV files are accepted",
"errorDetails": {
"providedType": "application/pdf",
"acceptedTypes": ["application/json", "text/csv"]
}
}
HTTP Status Code: 400 Bad Request
File Too Large
When the file exceeds the maximum size:
{
"ver": "1.0",
"timestamp": "2024-11-10T12:00:00Z",
"txnid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"errorCode": "FileTooLarge",
"errorMsg": "File size exceeds maximum allowed",
"errorDetails": {
"providedSize": 52428800,
"maxSize": 10485760,
"maxSizeMB": 10
}
}
HTTP Status Code: 413 Payload Too Large
Duplicate Reference ID
When the reference_id already exists:
{
"ver": "1.0",
"timestamp": "2024-11-10T12:00:00Z",
"txnid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"errorCode": "DuplicateReferenceId",
"errorMsg": "reference_id 'batch-20251110-002' already exists"
}
HTTP Status Code: 409 Conflict
Common Error Codes
| Error Code | Description |
|---|
UnsupportedFileType | The file format is not CSV or JSON. |
FileTooLarge | The file exceeds the 10 MB limit. |
DuplicateReferenceId | A batch with this reference_id already exists. |
InvalidFileContent | The file content could not be parsed (malformed CSV/JSON). |