Skip to content

API reference

Confirm a correction's class for DATEV

Invoices API

PUT/v1/invoices/{id}/correction

Confirms the class the DATEV export books this correction by: non-financial books nothing, financial the difference, replacement the original reversed plus this invoice. The class may be raised above the derived one, never lowered. It is written once.

Path parameters

  • idstring (uuid)Required

Request body

application/json, required

  • classstringRequired
    One of non-financial, financial, replacement.

Response

A 200 answer carries these fields.

  • correctsobjectRequired
    Show 2 child fields
    • idstring (uuid)Required
    • invoiceNumberstring or nullRequired
  • derivedClassstringRequired

    The class the changes show.

    One of non-financial, financial, replacement.
  • classstring or nullRequired

    The confirmed class, which the export books by. Null until confirmed.

    One of non-financial, financial, replacement, null.
  • confirmedAtstring (date-time) or nullRequired
  • originalobjectRequired
    Show 1 child field
    • postingsarray of objectRequired
      Show 4 child fields
      • exportIdstring (uuid)Required
      • formatstringRequired
        One of datev-ledger, datev-extf.
      • statestringRequired
        One of written, running.
      • createdAtstring (date-time)Required
  • postingsarray of objectRequired
    Show 4 child fields
    • exportIdstring (uuid)Required
    • formatstringRequired
      One of datev-ledger, datev-extf.
    • statestringRequired
      One of written, running.
    • createdAtstring (date-time)Required

Status codes

Status Meaning
200 The correction, with its confirmed class.
400 The body names no class (invalid_correction).
401 No usable credential was sent (invalid_credentials).
404 No such invoice (unknown_invoice), or it corrects nothing (not_a_correction).
409 The class is below the derived one (class_below_derived), another class is confirmed already (correction_already_confirmed), or no invoice model could be read (invoice_has_no_model, invoice_changed_since_check).
PUT/v1/invoices/{id}/correction
Example
curl -X PUT https://api.certinvo.com/v1/invoices/$INVOICE_ID/correction \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const invoiceId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'

const response = await fetch(`https://api.certinvo.com/v1/invoices/${invoiceId}/correction`, {
  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

invoice_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"

response = requests.put(
    f"https://api.certinvo.com/v1/invoices/{invoice_id}/correction",
    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
{
  "corrects": {
    "id": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
    "invoiceNumber": "string"
  },
  "derivedClass": "non-financial",
  "class": "non-financial",
  "confirmedAt": "2026-09-17T09:30:00Z",
  "original": {
    "postings": [
      {
        "exportId": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
        "format": "datev-ledger",
        "state": "written",
        "createdAt": "2026-09-17T09:30:00Z"
      }
    ]
  },
  "postings": [
    {
      "exportId": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
      "format": "datev-ledger",
      "state": "written",
      "createdAt": "2026-09-17T09:30:00Z"
    }
  ]
}
Success response
PUT
/v1/invoices/{id}/correction
Confirm a correction's class for DATEV
All
›AuthenticationRequiredBearerAuth

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

›Variables1
›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/invoices/{id}/correction" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "class": "non-financial"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close