Create an invoice document and upload authorization

post/v1/documents

Request

  • Base URL
    https://api.temlavo.com
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Strongly recommended: one key per invoice, in printable ASCII without spaces or commas. Retries must send the same key and the same body; changing the body under a key that is still active returns idempotency_conflict.

Temlavo-Upload-Recovery'confirm-existing'

Lets a retry recover a file that already uploaded: an exact retry of a document still waiting for its file returns upload: null once the file exists. Call Confirm upload before uploading again. Creating a document never starts processing.

Request body

filenamestring required

Filename with 1..255 Unicode code points, no surrounding whitespace, and no Cc/U+2028/U+2029 control characters

content_type'application/pdf' | 'image/jpeg' | 'image/png' required
file_size_bytesinteger required

Exact size of the file you will upload, up to 20 MiB. Confirm upload checks the stored file against it.

external_idstring

Opaque external ID with 1..255 Unicode code points, no surrounding whitespace, and no Cc/U+2028/U+2029 control characters

accounting_entity_idstring

Opaque case-sensitive accounting entity namespace with 1..255 Unicode code points, no surrounding whitespace, and no Cc/U+2028/U+2029 control characters

callback_urlstring uri

HTTPS callback URL using a DNS hostname and port 443, with 1..2048 Unicode code points, no fragment, no surrounding whitespace, no embedded credentials, and no Cc/U+2028/U+2029 control characters

metadataCustomerMetadata

Response

A retry with the same key and body. It returns the existing document, which may include a fresh upload URL while it still waits for its file. If it returns awaiting_upload, call upload-complete before uploading again: the file may already have arrived.

OR
OR
OR
OR
OR
OR

Changes

No recorded changes to this operation across all 1 revision of this API.