Create a File
Before uploading a file, you need to create a File
resource.
Once created, you can upload your file to the new File
resource. For more info, see Uploading files to Finix.
curl -X POST \
https://finix.sandbox-payments-api.com/files \
-u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"display_name": "My Drivers License",
"linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
"type": "DRIVERS_LICENSE_FRONT",
"tags": {
"key_1": "value_1"
}
}'
Example Response:
{
"id": "FILE_bJecqoRPasStEPVpvKHtgA",
"status": "REQUIRES_UPLOAD",
"created_at": "2022-02-25T16:11:33.382399-08:00",
"updated_at": "2022-02-25T16:11:33.435191-08:00",
"linked_type": "MERCHANT",
"linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
"extension": null,
"display_name": "My Drivers License",
"type": "DRIVERS_LICENSE_FRONT",
"platform_id": "PLqGYwxrZE6m9336CAjEoC9E",
"application_id": "APxgfXGA3fKjA6yzKUBSm7rf",
"tags": {
"key_1": "value_1"
}
}
HTTP Request
POST https://finix.sandbox-payments-api.com/files
Request Arguments
Field | Type | Description | Enum values (if relevant) |
---|---|---|---|
display_name |
string, optional | The name of the File you'll create. |
|
linked_to |
string, required | The resource ID that you want linked to the File . e.g. Merchant ID |
|
type |
ENUM value, required | The type of document. | Available values include: Identity Verification
|
tags |
object, optional | A custom value you can include to annotate the File object's metadata (e.g. file number) |
Response
Field | Type | Description |
---|---|---|
id |
string | Your File ID. |
status |
string | The status of the file's review. The statuses available includes: |
created_at |
string | Timestamp of when the File was created |
updated_at |
string | Timestamp of when the File was updated |
linked_type |
string | Autofills to Merchant |
linked_to |
string | The resource ID the File is linked to |
extension |
string | The extension of the file |
display_name |
string | The name of the File object. If you don't provide a name, Finix will name the object with the convention: FILE(fileid) |
type |
string | The type of document |
tags |
object | A custom value you can include to annotate the File object's metadata (e.g. file number) |