LedgerLou Docs is optimized for desktop.

Please open this page on a device with a wider screen.

Payables

Extract invoice via OCR

Reads an uploaded document via OCR and extracts structured invoice fields (supplier, amounts, line items, due dates). The result is stored on the document as `ocr_result`.

POST /v1/ocr/extract
Authorization
Authorization string header required API key in the format ll_.... Pass as a Bearer token.
Responses
200
Success
400
INVALID_INPUT Required fields are missing or values do not match the expected format.
404
NOT_FOUND The requested resource was not found.
404
FILE_NOT_FOUND
500
OCR_FAILED
POST /v1/ocr/extract
cURL
-cmd">curl --request -method">POST -punct">\
  --url 'https://api.ledgerlou.de/v1/ocr/extract' -punct">\
  --header 'Authorization: Bearer ll_your_key'
200 Response
JSON
{
  "vendor_name": "<string>",
  "vendor_vat_id": "<string>",
  "vendor_iban": "<string>",
  "vendor_address": "<string>",
  "invoice_number": "<string>",
  "invoice_date": "<string>",
  "due_date": "<string>",
  "total_net": 1,
  "total_tax": 1,
  "total_gross": 1,
  "currency": "<string>",
  "line_items": [
    {
      "description": "<string>",
      "quantity": 1,
      "unit_price": 1,
      "tax_rate": 1,
      "line_total": 1
    }
  ],
  "payment_terms": "<string>",
  "reference_text": "<string>",
  "raw_markdown": "<string>"
}