v1

latestOpenAPI 3.0.22026-07-26123510445.2 KB
File Service

Upload A File

Upload a file to UQPAY. The maximum size of the upload file is up to 20MB. Supported file types include jpeg, png, jpg, doc, docx, pdf. When you upload a file, the API responds with a file_id. This file ID can then be referenced as required as part of the attachments object in our other endpoints.

post/v1/files/upload

Query parameters

notesstring

The notes of the uploaded file, max length is 50 characters

Headers

x-on-behalf-ofstring

Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts API. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.

x-idempotency-keystring uuid

A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.

Response

OK - Successfully uploaded a file.

create_timestring required

Timestamp when the file was uploaded.

file_idstring required

Unique identifier for the uploaded file. Use this ID to reference the file in other API calls.

file_namestring required

Original name of the uploaded file including extension.

file_typestring required

File extension type (e.g., png, pdf, docx).

sizeinteger required

File size in bytes.

notesstring required

Optional notes associated with the file.

Example response

{
  "create_time": "2024-08-22T17:12:58+08:00",
  "file_id": "b3d9d2d5-4c12-4946-a09d-953e82sed2b0",
  "file_name": "example.png",
  "file_type": "png",
  "size": 123456,
  "notes": "This is a note"
}