Skip to content

API reference

Read a sheet into rows for serial invoices

Invoicing API

POST/v1/sheets

Reads an Excel sheet (.xlsx), a CSV file with a header row or a JSON list into columns and rows, for serial invoices. Every line of the file is one row, in the file’s order, and nothing is dropped. Nothing is stored. suggested offers each column the canonical fields its name matches, best first: a header that names one business term (Rechnungsnummer (BT-1)) is that term, otherwise the names Certinvo knows for each field in German and English. An empty list means nothing matched. A CSV is read with the delimiter and encoding given, or with the ones proposed from the file, which the answer states. A JSON list of complete canonical invoices is answered as invoices, each as written.

Request body

application/json, required

  • namestring
  • datastring (byte)Required

    The file as base64, at most 10 MB decoded.

  • delimiterstring

    A CSV's delimiter. Absent

    One of ;, ,, , |.
  • encodingstring

    A CSV's encoding. Absent

    One of utf-8, windows-1252.

Response

A 200 answer carries these fields.

  • formatstringRequired
    One of csv, xlsx, json.
  • delimiterstring or nullRequired
  • encodingstring or nullRequired
  • columnsarray of stringRequired
  • rowsarray of array of stringRequired

    One row per line of the file, its cells in the order of columns.

  • suggestedobjectRequired

    Per column, the JSON pointers of the canonical fields its name matches, best first.

Status codes

Status Meaning
200 The sheet’s columns and rows, or its invoices.
400 The body was refused, or the file is no sheet the readers read (unreadable_file, invalid_json, invalid_operation). Nothing was read.
401
413 The file is larger than one document may be (document_too_large, file_too_large_to_read). Nothing was read.
502 The engine could not run, so nothing was read (engine_unavailable).
POST/v1/sheets
Example
curl -X POST https://api.certinvo.com/v1/sheets \
  -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/sheets`, {
  method: 'POST',
  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.post(
    "https://api.certinvo.com/v1/sheets",
    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
{
  "format": "csv",
  "delimiter": "string",
  "encoding": "string",
  "columns": [
    "string"
  ],
  "rows": [
    [
      "string"
    ]
  ],
  "suggested": {}
}
Success response
POST
/v1/sheets
Read a sheet into rows for serial invoices
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 POST "https://api.certinvo.com/v1/sheets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "data": "string",
  "delimiter": ";",
  "encoding": "utf-8"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close