GET
/v1/invoices/{id}/pagesReturns the invoice’s printed A4 pages, each page as a PNG image, for a screen to show. It is not a file download, and viewing it is not recorded as one. No PDF is returned.
An invoice you sent is drawn from the PDF stored for it, the file its buyer got. An invoice with no stored PDF is drawn from its canonical model in your saved layout and the language it was filed in. An invoice you received is drawn from its model in your template, without your logo or texts.
Path parameters
- idstring (uuid)Required
Response
A 200 answer carries these fields.
- pagesarray of string (byte)Required
Each page as a PNG image, base64-encoded.
Status codes
| Status | Meaning |
|---|---|
200 |
The printed pages. |
401 |
No usable credential was sent (invalid_credentials). |
404 |
No such invoice exists for this company, or it has no model to draw (unknown_invoice). |
409 |
The invoice’s model cannot be printed (conversion_would_be_incomplete), or no model it holds is the one its newest check was made from. |
502 |
The printer could not run (engine_unavailable). |
GET
/v1/invoices/{id}/pagesExample
curl https://api.certinvo.com/v1/invoices/$INVOICE_ID/pages \
-H "Authorization: Bearer $CERTINVO_API_KEY"const invoiceId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'
const response = await fetch(`https://api.certinvo.com/v1/invoices/${invoiceId}/pages`, {
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
invoice_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"
response = requests.get(
f"https://api.certinvo.com/v1/invoices/{invoice_id}/pages",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)200
application/json
{
"pages": [
"string"
]
}Success response