Skip to main content
POST
Upload Order Documents
Certain orders need supporting documents — for example, when compliance requests information (status: 11) or when the order is waiting for supporting documents (status: 31). Use this endpoint to upload up to five files per call. Accepted formats are JPG, JPEG, PNG, and PDF, with a maximum size of 5 MB per file. An upload to an order in status: 11 moves it to status: 12. For fiat_to_crypto and crypto_to_fiat orders, an upload to an order in status: 31 moves it to status: 40 (pending payment). A fiat_to_fiat order shows status: 31 only while its required documents are missing; after the upload it shows its underlying status (41 or 51). Other uploads in accepted statuses do not change the status; see the note below on which uploads are attached.

Endpoint

Use https://api-test.velafi.com/v2/order/invoice for sandbox testing.

Request Headers

Request Parameters

integer
required
The numeric ID of the order to which the documents should be attached.
string
required
The type of the order. Must be one of fiat_to_crypto, crypto_to_fiat, or fiat_to_fiat.
file
required
One or more files to upload. Maximum 5 files per request. Each file must be at most 5 MB. Supported formats: jpg, jpeg, png, pdf.

Response Fields

integer
Response status code. 200 indicates success.
string
Human-readable response message.
boolean
true if the documents were successfully uploaded.

Example

Uploads are accepted only in these statuses: for fiat_to_crypto and crypto_to_fiat orders, 11, 12, 31, 32, 40, 50, and 60; for fiat_to_fiat orders, 10, 11, 12, 31, 41, 51, and 60. Uploads to orders in any other status return an error. Check the current status with GET /v2/order/detail before uploading.
File size and count limits: maximum 5 files per upload request, maximum 5 MB per individual file. Supported formats are jpg, jpeg, png, and pdf.
For fiat_to_crypto and crypto_to_fiat orders outside an RFI (status: 11 or 12), only the first upload is attached to the order. Later uploads still return data: true but are not attached. During an RFI, each upload replaces the previously uploaded RFI files.