PDF invoice API
PDF invoice API
Download a finished PDF for an invoice you created. The file uses the same totals, tax and client name as the link you send to the customer.
Base URL https://invoicetxt.com Auth Authorization: Bearer itxt_live_…
GET/v1/invoices/{id}/pdf
Download the file
GET https://invoicetxt.com/v1/invoices/{id}/pdf with the same Bearer key that owns the invoice. The response is application/pdf, not JSON. Save the bytes as a file.
The customer can also open /download/{id}.pdf from the invoice link. Use the API download when your own system needs to store the file, attach it to a job record, or hand it to an accountant.
| Field | Type | Description | |
|---|---|---|---|
id | string | required | Path parameter. The 10-character id from the create response. The response body is the PDF, not JSON. |
curl -L https://invoicetxt.com/v1/invoices/INVOICE_ID/pdf \
-H 'Authorization: Bearer itxt_live_your_key' \
-o invoice.pdfWhat is on the PDF
The PDF shows the invoice number, the client, the issue date, the due terms, each line, the tax and the total. Currency other than USD is stored on the invoice and shown in the on-screen invoice. The PDF amounts use the same numbers you sent.
If the invoice has been acknowledged, the on-screen invoice shows the signer’s name and time. Download the PDF after that event if you want the file that matches the latest total.
Errors
404 means the id is unknown or it belongs to another account. 401 means the key is missing or revoked. Do not retry a 401 in a loop. Create a new key in the workspace and replace the old one.