/v1/invoice-layoutReturns the company’s invoice layout: the template its ZUGFeRD PDFs are printed from, with its language and switches. A company that never saved a layout gets the standard template in German as version 0, with createdBy: null and no createdAt. A layout saved with the retired designer is returned as it was stored, and the company’s PDFs print the standard template until it saves a template. Any credential may read it.
Response
A 200 answer carries these fields.
- layoutobjectRequired
kind("template"),template("standard" or "din5008"),lang("de" or "en"),switches(what the page shows), and optionallylogo(an embedded image) andtexts(intro,closing,footer). A layout saved with the retired designer is returned as stored, and does not print. - versionintegerRequired
- createdAtstring
When this version was saved. Empty for version 0.
- createdBystring
The person who saved it. Null for version 0.
Status codes
| Status | Meaning |
|---|---|
200 |
The current layout. |
401 |
No usable credential was sent (invalid_credentials). |
503 |
No database is configured (store_unavailable), so no layout can be read. |
/v1/invoice-layoutcurl https://api.certinvo.com/v1/invoice-layout \
-H "Authorization: Bearer $CERTINVO_API_KEY"const response = await fetch(`https://api.certinvo.com/v1/invoice-layout`, {
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
response = requests.get(
"https://api.certinvo.com/v1/invoice-layout",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text){
"layout": {},
"version": 0,
"createdAt": "string",
"createdBy": "string"
}