Skip to main content
POST
Create a file upload
Required scope: orders:write. Send an Idempotency-Key. After a timeout, retry with the same key and metadata to get the same file ID with a new form. The file can be up to 12,582,912 bytes. The response contains a file ID and a temporary upload form. Send a multipart POST to the returned URL, add each returned field, and add the file last with the field name file. Do not send your API Bearer token to the upload URL. The file belongs to an order only after you add its ID to file_ids when you create or change the order. Read Files and inspections for a complete upload example.

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials.

Scopes

orders:write

Check prices, upload files, and change customer orders.

Headers

Idempotency-Key
string
required

A unique key for this logical write across the customer account. Reuse it only for retries of the same operation and request data.

Required string length: 8 - 255
X-Request-Id
string

A caller-supplied request identifier for support.

Required string length: 1 - 255

Body

application/json

Metadata used to create a temporary direct-upload form.

name
string
required

Original file name shown with the uploaded document.

Required string length: 1 - 255
category
enum<string>
required

Use power_of_attorney only for a power of attorney. Use customer_document for other files, including pickup release documents.

Available options:
power_of_attorney,
customer_document
media_type
enum<string>
required

MIME type of the file that will be uploaded.

Available options:
application/pdf,
image/jpeg,
image/png
size_bytes
integer
required

Exact file size in bytes. The maximum is 12 MiB.

Required range: 1 <= x <= 12582912
description
string

Customer-facing explanation of what the uploaded document contains.

Minimum string length: 1

Response

The upload request is ready.

File ID and temporary multipart form for direct upload.

file_id
string
required

ID to add to an order after the upload succeeds.

Pattern: ^file_[a-z0-9-]+$
upload
object
required

Temporary form that accepts the file contents.