Skip to content

API reference

Save the company's invoice layout

Other routes API

PUT/v1/invoice-layout

Saves the layout as a new, immutable version. The next ZUGFeRD PDF the company files is printed from it. Only a signed-in person may call this. An API key is refused with 401 session_required. Only a template is saved: anything else, a design of the retired designer among them, or a template, language or switch the engine does not have, is refused with 400 invalid_layout, and the message names why.

Request body

application/json, required

  • layoutobjectRequired

    The layout, as GET returns 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 optionally logo (an embedded image) and texts (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 new version, which is now current.
400 The layout was refused (invalid_layout). Nothing was changed.
401 No usable credential (invalid_credentials), or an API key was used (session_required).
503 No database is configured (store_unavailable), so no layout can be saved.
PUT/v1/invoice-layout
Example
curl -X PUT https://api.certinvo.com/v1/invoice-layout \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const response = await fetch(`https://api.certinvo.com/v1/invoice-layout`, {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: await readFile('body.json'),
})
console.log(response.status, await response.json())
import os

import requests

response = requests.put(
    "https://api.certinvo.com/v1/invoice-layout",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
200
application/json
{
  "layout": {},
  "version": 0,
  "createdAt": "string",
  "createdBy": "string"
}
Success response
PUT
/v1/invoice-layout
Save the company's invoice layout
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/invoice-layout" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "layout": {}
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close