POST /files
GET /files
GET /files/{file_id}
GET /files/{file_id}/external_links
POST /files/{file_id}/external_links
POST /files/{file_id}/upload
GET /files/{file_id}/download
GET /files/{file_id}/external_link/{external_link_id}
Use Finix's File API to upload and manage files for your merchants.
Related Guides: File Uploads, Onboarding Rejections
Before uploading a file, you need to create a File
resource.
Once created, you can upload your file to the new File
resource.
Single File object
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files" \ -H "Content-Type: application/json" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -X POST \ -d '{ "display_name": "Bank Statement (January 2024)", "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk", "type": "BANK_STATEMENT" }'
{- "id": "FILE_puUe2Fxc6PyPxZzu4HwPyy",
- "status": "REQUIRES_UPLOAD",
- "created_at": "2024-08-28T21:30:27.442543Z",
- "updated_at": "2024-08-28T21:30:27.46643Z",
- "linked_type": "MERCHANT",
- "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
- "extension": null,
- "display_name": "Bank Statement (January 2024)",
- "type": "BANK_STATEMENT",
- "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
- "application_id": "APgPDQrLD52TYvqazjHJJchM",
- "tags": { },
- "identity_id": "ID82tmeBrw6ithr8DjDnAdVb"
}
Retrieve a list of previously created files
.
For details on how to query endpoints using the available parameters, see Query Parameters.
List of File objects
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
{- "_embedded": {
- "files": [
- {
- "id": "FILE_abki8bFEjq51eZ5w2pYFik",
- "created_at": "2024-08-16T18:50:25.770825Z",
- "updated_at": "2024-08-16T18:50:25.807321Z",
- "application_id": "APgPDQrLD52TYvqazjHJJchM",
- "display_name": "Bank Statement (January 2024)",
- "extension": "png",
- "identity_id": null,
- "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
- "linked_type": "MERCHANT",
- "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
- "status": "UPLOADED",
- "type": "BANK_STATEMENT"
}, - {
- "id": "FILE_eCecW4LCMMfY7nfnBrKpX8",
- "created_at": "2024-10-11T21:19:46.273063Z",
- "updated_at": "2024-10-11T21:19:46.296136Z",
- "application_id": "APgPDQrLD52TYvqazjHJJchM",
- "display_name": "Bank Statement (February 2024)",
- "extension": null,
- "identity_id": null,
- "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
- "linked_type": "MERCHANT",
- "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
- "status": "REQUIRES_UPLOAD",
- "type": "BANK_STATEMENT"
}
]
}, - "page": {
- "limit": 10,
- "next_cursor": "FILE_abki8bFEjq51eZ5w2pYFik"
}
}
Retrieve the details of a File
resource.
Single File object
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_abki8bFEjq51eZ5w2pYFik" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
{- "id": "FILE_puUe2Fxc6PyPxZzu4HwPyy",
- "status": "REQUIRES_UPLOAD",
- "created_at": "2024-08-28T21:30:27.442543Z",
- "updated_at": "2024-08-28T21:30:27.46643Z",
- "linked_type": "MERCHANT",
- "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
- "extension": null,
- "display_name": "Bank Statement (January 2024)",
- "type": "BANK_STATEMENT",
- "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
- "application_id": "APgPDQrLD52TYvqazjHJJchM",
- "tags": { },
- "identity_id": "ID82tmeBrw6ithr8DjDnAdVb"
}
List the previously created external_links
for a File
.
For details on how to query endpoints using the available parameters, see Query Parameters.
List of external_link objects
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_abki8bFEjq51eZ5w2pYFik/external_links" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
{- "_embedded": {
- "external_links": [
- {
- "id": "EL_sVv61JP93htzDFTtNhbsdd",
- "created_at": "2022-05-24T06:50:51.94704Z",
- "duration": null,
- "expired": true,
- "expires_at": "2022-05-24T07:05:51.934426Z",
- "file_id": "FILE_bJecqoRPasStEPVpvKHtgA",
- "tags": { },
- "type": "UPLOAD",
- "user_id": "USsRhsHYZGBPnQw8CByJyEQW"
}, - {
- "id": "EL_dh5YS66GePpkeSVyL4VdBL",
- "created_at": "2022-03-22T01:07:05.074313Z",
- "duration": null,
- "expired": true,
- "expires_at": "2022-03-22T01:22:05.070415Z",
- "file_id": "FILE_bJecqoRPasStEPVpvKHtgA",
- "tags": { },
- "type": "UPLOAD",
- "user_id": "USsRhsHYZGBPnQw8CByJyEQW"
}
]
}, - "page": {
- "limit": 10,
- "next_cursor": "EL_dh5YS66GePpkeSVyL4VdBL"
}
}
Create an external_link
resource to share with users so they can upload files directly from their browser. For more info, see Uploading files to Finix.
Single external_link object
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStEPVpvKHtgA/external_links" \ -H "Content-Type: application/json" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -X POST \ -d '{ "duration": 10080, "type": "UPLOAD" }'
{- "id": "EL_9b4Bb7PgJDducJrNWdqiq3",
- "created_at": "2024-08-28T22:09:56.215417Z",
- "type": "UPLOAD",
- "expires_at": "2024-09-04T22:09:56.201401Z",
- "user_id": "USsRhsHYZGBPnQw8CByJyEQW",
- "file_id": "FILE_wcKwLdmHLkDcwMBHwz1FaY",
- "duration": null,
- "tags": { },
- "expired": false
}
Upload files directly with a multipart/form-data
request.
Single File object
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStEPVpvKHtgA/upload" \ -H "Content-Type: multipart/form-data" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -X POST \ -F "file=@/Users/Desktop/finix_file.png"
{- "id": "FILE_puUe2Fxc6PyPxZzu4HwPyy",
- "status": "REQUIRES_UPLOAD",
- "created_at": "2024-08-28T21:30:27.442543Z",
- "updated_at": "2024-08-28T21:30:27.46643Z",
- "linked_type": "MERCHANT",
- "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
- "extension": null,
- "display_name": "Bank Statement (January 2024)",
- "type": "BANK_STATEMENT",
- "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
- "application_id": "APgPDQrLD52TYvqazjHJJchM",
- "tags": { },
- "identity_id": "ID82tmeBrw6ithr8DjDnAdVb"
}
Download a file that was uploaded to a File
resource.
Example response
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStGPVpvKHtgA/download" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
{}
Fetch a previously created external_link
resource.
Single external_link object
Authentication information is missing or invalid
Forbidden
Object does not exist
Not Acceptable
curl "https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStEPVpvKHtgA/external_links/EL_dh5YS66GePpkeSVyL4VdBL" \ -H "Finix-Version: 2022-02-01" \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
{- "id": "EL_9b4Bb7PgJDducJrNWdqiq3",
- "created_at": "2024-08-28T22:09:56.215417Z",
- "type": "UPLOAD",
- "expires_at": "2024-09-04T22:09:56.201401Z",
- "user_id": "USsRhsHYZGBPnQw8CByJyEQW",
- "file_id": "FILE_wcKwLdmHLkDcwMBHwz1FaY",
- "duration": null,
- "tags": { },
- "expired": false
}