Download document PDF
The PDF of a finalised invoice or quote.
GET https://cotlet.dev/api/v1/lexware-office/documents/{document_id}/pdf/download
read
Returns a download link for the PDF Lexware Office generated when the document was finalised. A draft has no PDF; use get_document to read it instead. For an e-invoice in XRechnung format the document is an XML file, and the link points to that file.
Parameters
| Name | Type | Description |
|---|---|---|
| document_id string required | string | Document ID from list_documents or create_invoice. |
Request
curl https://cotlet.dev/api/v1/lexware-office/documents/document_8c41d2/pdf/download \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("lexware-office", "download_document_pdf", {"document_id":"document_8c41d2"}) const result = await cotlet.call('lexware-office', 'download_document_pdf', {"document_id":"document_8c41d2"}); cotlet call lexware-office download_document_pdf --data '{"document_id":"document_8c41d2"}' Example response
{
"document_id": "d_9c31be",
"number": "RE1031",
"file_name": "RE1031.pdf",
"download_url": "https://files.example.com/f_3b90aa/RE1031.pdf"
}