Utilities
File uploads
Certain endpoints, such as those for onboarding, require specific files to be uploaded. To enhance the application submission process, Affinity provides dedicated file upload endpoints.
Parameter | Type | Description | |
|---|---|---|---|
1. |
| binary | The allowed format for the file to be uploaded are |
2. |
| string | Should be one of the document types listed below |
Document types
Type | Description | Allowed file types |
|---|---|---|
| Proof of residence file | png, jpeg, pdf |
| Picture of ID card | png, jpeg |
| Residency permit for Non-Ghanaians | png, jpeg, pdf |
| Signature of customer | png, jpeg |
| Selfie or face of customer | png, jpeg |
| Amendment document for businesses | |
| Renewal document for businesses | |
| Regulation document for businesses | |
| Partnership document for businesses | |
| Incorporation document for businesses | |
| Endorsement document for businesses | |
| Public verification document for businesses |
Upload a file
Request parameters
Responses
Field | Type | Description | |
|---|---|---|---|
1. |
| string | The unique identifier of the file. This will be the field to use in any application that requires a file. |
2. |
| string | A temporary URL to the uploaded file |
File URL generation
Since the files uploaded via the upload endpoint are private, you must generate a temporary link with a 15-minute validity period.
Parameters
Parameter | Type | Description | |
|---|---|---|---|
1. |
| string | The key that was generated from the file upload endpoint e.g. |
Making the request
Generate file url
Request parameters
Responses
Field | Type | Description | |
|---|---|---|---|
1. |
| string | Temporary link valid for 15-minutes |