Download Links
Mint a download link for a document PDF
Credential: a company's API key or OAuth token.
Returns a short-lived URL that serves the document. Fetch it with a plain GET — it carries its own credential and takes no API key.
The four billing documents render as application/pdf, for a stored PDF and for one rendered on demand (draft=true, or a document with no stored file), because redeeming re-runs the same render the :id/pdf route runs. document serves a stored original — an uploaded receipt, supplier invoice or email — as the content type it was stored under.
Required Scopes
The same scope the document's own read requires:
invoices-read—invoice,credit-notequotes-read—quoteorder-confirmations-read—order-confirmationjournal-entries-read—document
query Parameters
documentTypeWhich document the link should serve. The four billing documents render to a PDF; document is a stored original (an uploaded receipt, supplier invoice or email) served as its stored content type.
documentIdId of the document
draftRender the draft watermark version instead of the stored PDF. Ignored for document.
Mint a download link for a document PDF › Responses
Link minted
urlFetch this URL directly to download the file. It needs no API key — the URL itself is the credential.
expiresAtWhen the link stops working
Download a minted link
Credential: a company's API key or OAuth token.
Streams the document — application/pdf for a billing document, the stored content type for a document. Takes no API key — the signed token in the path is the credential, and it names the one document it may serve.
path Parameters
tokenThe token from the minted URL
Download a minted link › Responses
Binary stream