Developer Docs

← Back to Console

Secure Documents

The Secure Documents API (POST /e9v3/secure_doc_delivery) uploads one or more documents and returns a hosted, shareable link. Unlike the order and inventory writes, this endpoint is synchronous: it stores the upload and responds 201 with the document URL directly — there is no job to poll.

What it’s for

Authentication

See the Authentication guide for how to obtain a JWT token with the orders:write scope.

Request

Send the payload as multipart/form-data.

POST /e9v3/secure_doc_delivery
Authorization: Bearer <jwt-token>
Content-Type: multipart/form-data

Form fields

Field Type Required Description
files binary (repeatable) Yes One or more files to upload. Repeat the part to send several documents in one request. A legacy single part named file is also accepted.
order_id text No Order reference. Labels the stored document (Order {order_id}) and is recorded as its task number.

Constraints

Example

# Get a token (see the Authentication guide), then upload
curl -X POST https://api.equos.one/e9v3/secure_doc_delivery \
  -H "Authorization: Bearer $TOKEN" \
  -F "files=@invoice.pdf" \
  -F "order_id=SO-1234"

Upload several files in one request by repeating the files part:

curl -X POST https://api.equos.one/e9v3/secure_doc_delivery \
  -H "Authorization: Bearer $TOKEN" \
  -F "files=@invoice.pdf" \
  -F "files=@line-items.csv"

Response (201 Created)

{
  "document_url": "https://docs.equos.one/r/a1b2c3"
}

The document_url is absolute ({publicBaseURL}/r/{shortCode}) when a public base URL is configured, otherwise root-relative (/r/{shortCode}).

Error Handling

All errors return the shape { "error": "...", "code": "..." }.

Status code Meaning
400 parse_error Malformed multipart body
400 file_required No file part was supplied
400 invalid_file_type A file that is not PDF or CSV was included
401 — Missing or invalid Bearer token
429 — Rate limit exceeded (1 request/sec per key, burst 10)
500 shortcode_error Failed to allocate a short code for the link
500 create_link_error Failed to create the hosted link
500 file_open_error Failed to read an uploaded file
500 upload_error Failed to store an uploaded file

Next Steps