Uploading files
Various APIs require document attachments with some types supporting multiple file. For example EMIRATES_ID
could be front and back as separate JPEG files.
Upload document API provides a secure upload with a unique identifier for each document. This identifier can then be used to link the file to a business document requirement, related person or account API requiring a file upload.
Files must be submitted as multipart/form-data
including the binary file. Supported formats include PDF, JPG, and PNG.
Usage
- Each file must be uploaded separately.
- A valid bearer token is required in the
Authorization
header. - This API only performs storage — document classification or linking must be handled via the related business or person APIs using the returned
id
.
Example
curl -L 'https://api.hubpay.ae/v1/account/documents/upload' \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'AccountId: 058a2d45-139c-436b-8d1f-eec265e0f418' \
-H 'Authorization: Bearer <token>' \
-F 'file=@"/path/to/file"'
Refer to the API Reference for more details.