Get invoice PDF
The invoice as a PDF file, base64 encoded.
GET https://cotlet.dev/api/v1/ifirma/invoices/{invoice_id}/pdf
read
Returns the PDF of one issued invoice as base64 with its file name. Set duplicate to true for a duplicate, which carries the date it was downloaded.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
| duplicate boolean | boolean | true for a duplicate. Default: false. |
Request
curl https://cotlet.dev/api/v1/ifirma/invoices/1/pdf \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("ifirma", "get_invoice_pdf", {"invoice_id":1}) const result = await cotlet.call('ifirma', 'get_invoice_pdf', {"invoice_id":1}); cotlet call ifirma get_invoice_pdf --data '{"invoice_id":1}' Example response
{
"invoice_id": 7020118,
"file_name": "41-2026.pdf",
"content_base64": "JVBERi0xLjQKJcfsj6IK..."
}