Ausgangsrechnung anlegen
Legt eine neue Ausgangsrechnung oder Gutschrift mit Positionen in einer Transaktion an. Der Debitor muss existieren. Rechnungsnummern sind pro Debitor eindeutig.
POST
/v1/outgoing-invoices Authorization
Authorization string header erforderlich API-Key im Format
ll_.... Übergabe als Bearer Token. Request Body
customer_id uuid erforderlich Debitor-ID
document_id uuid optional Verknuepftes Dokument (z.B. OCR-Scan)
invoice_number string erforderlich Rechnungsnummer (max 100)
invoice_date string erforderlich Rechnungsdatum (YYYY-MM-DD)
due_date string optional Faelligkeitsdatum (YYYY-MM-DD)
total_net number erforderlich Nettobetrag
total_tax number erforderlich Steuerbetrag
total_gross number erforderlich Bruttobetrag
currency string optional Waehrung (3 Zeichen, Default: EUR)
type string erforderlich
"invoice" oder "credit_note" intent_id uuid optional Verknuepfter Journal-Intent (setzt Status auf open)
notes string optional Freitext-Notizen (max 2000)
lines array erforderlich Rechnungspositionen (min. 1)
Rechnungsposition
position integer erforderlich Positionsnummer (ab 1)
description string erforderlich Beschreibung (max 500)
quantity number erforderlich Menge (positiv)
unit_price number erforderlich Einzelpreis
tax_rate number erforderlich Steuersatz (0–1, z.B. 0.19)
tax_amount number erforderlich Steuerbetrag der Position
line_total number erforderlich Bruttobetrag der Position
account_number string optional Erloeskonto fuer diese Position
Antworten
201
Erfolgreich
400
INVALID_INPUT Pflichtfelder fehlen oder Werte entsprechen nicht dem erwarteten Format.
404
CUSTOMER_NOT_FOUND
409
DUPLICATE_INVOICE_NUMBER
POST
cURL /v1/outgoing-invoices -cmd">curl --request -method">POST -punct">\
--url 'https://api.ledgerlou.de/v1/outgoing-invoices' -punct">\
--header 'Authorization: Bearer ll_your_key' -punct">\
--header 'Content-Type: application/json' -punct">\
--data '{
"customer_id": "b2c3d4e5-...",
"invoice_number": "AR-2024-001",
"invoice_date": "2024-03-15",
"due_date": "2024-04-15",
"total_net": 1000,
"total_tax": 190,
"total_gross": 1190,
"type": "invoice",
"lines": [
{
"position": 1,
"description": "Beratungsleistung",
"quantity": 1,
"unit_price": 1000,
"tax_rate": 0.19,
"tax_amount": 190,
"line_total": 1190
}
]
}' 201 Response
JSON {
"id": "<string>"
}