v1

latestOpenAPI 3.0.02026-07-244074117.0 KB
Files

Import a file

Import a file from a URL. The file will be downloaded and optionally attached to an order.

post/v4/files/import

Request body

urlstring required
orderIdstring required

The ID of the order to which the file will be attached.

purpose'order_invoice' required

The purpose of the file.

namestring

The name of the file. If not provided, the name of the file will be parsed from the URL path or Content-Disposition header..

mimeTypestring

The MIME type of the file. If not provided, the MIME type will be parsed from the URL response header.

expectedMd5string

The expected MD5 hash of the file. If provided, the file will be validated against the expected MD5 hash and not imported if the hash does not match.

expectedSizeBytesnumber

The expected number of bytes to be downloaded. If provided, the file will be validated against the expected size and not imported if the size does not match.

Response

The created order.

idstring required
importUrlstring

The URL the file was imported from.

importStatus'pending' | 'succeeded' | 'failed' required
orderIdstring required
purposestring required