konto

HTTP API

Every kontod route with the roles that may call it, the problem format of errors, status codes and the OpenAPI document.

On this page

kontod speaks JSON over HTTP. Every /v1 route acts for the creditor of the bearer token, or of the signed-in customer's session, and admits only the roles listed. The machine-readable contract is openapi.json, also served by kontod at GET /openapi.json; a test keeps it, and this page, equal to the router.

Routes

RouteRolesDoes
GET /healthnoneliveness
GET /openapi.jsonnonethe OpenAPI document
POST /v1/chargesproducer, clerkdeliver rated-charge@1 documents for an account
POST /v1/sectionsproducer, clerkdeliver bill sections
POST /v1/bills/previewproducer, clerkpreview an explicit bill request
GET /v1/bills/{number}clerk, portal, customera sealed bill with konto's verdict
GET /v1/bills/{number}/documentclerk, portal, customerthe sealed bill as the stack's bill@1 document
POST /v1/accounts/{account}/erasureclerkerase the account's personal data that no law requires konto to keep; answers the erasure@1 to emit
GET /v1/erasures/{id}clerkan erasure and the engines' confirmations
POST /v1/erasures/{id}/confirmationsproducer, clerkan engine confirms it erased its copies
GET /v1/bills/{number}/xrechnungclerk, courier, portal, customerthe XRechnung, ?syntax=cii (default) or ubl
GET /v1/bills/{number}/htmlclerk, portal, customerthe German HTML bill
GET /v1/bills/{number}/pdfclerk, courier, portal, customerthe PDF with the e-invoice embedded
GET /v1/deliveriesclerk, courierdeliveries by ?status=pending (default), sent or failed
POST /v1/deliveries/{number}/sentclerk, courierreport a delivery sent, with the courier's reference
POST /v1/deliveries/{number}/failedclerk, courierreport a delivery failed, with a reason
POST /v1/deliveries/{number}/requeueclerksend a failed delivery again, by post if asked
POST /v1/paymentsclerkbook a received payment
GET /v1/accounts/{account}/chargesclerkthe account's open charges (the inbox)
PUT /v1/accounts/{account}/holderclerkthe buyer bills are addressed to; e-mail address, channel and mandate stay
GET /v1/accounts/{account}/overviewclerk, portal, customerthe account screen: open, last bill with change, Verlauf
GET /v1/accounts/{account}/statementclerk, portal, customerthe Kontoauszug
GET /v1/accounts/{account}/itemsclerk, portal, customerthe open items
POST /v1/accounts/{account}/bills/previewclerkpreview the next bill from the inbox
POST /v1/accounts/{account}/bills/reviewclerkreview the next bill: its number and the review
POST /v1/accounts/{account}/bills/confirmclerkseal, book, take the charges and queue the delivery
POST /v1/accounts/{account}/allocations/reviewclerkreview a payment's allocation
POST /v1/accounts/{account}/allocations/confirmclerkconfirm it
POST /v1/accounts/{account}/collections/assessclerkassess the account's claims against the contracts' terms
POST /v1/accounts/{account}/invitationsclerkinvite the account's holder; the code is shown once
GET /v1/accounts/{account}/accessclerkwho may read the account, with their passkeys, provider logins and pending invitations
DELETE /v1/accounts/{account}/access/{id}clerkrevoke a grant or end a pending invitation
DELETE /v1/passkeys/{id}clerkremove a passkey (a lost device) and end its sessions
DELETE /v1/identities/{id}clerkremove a provider login's link and end its sessions
GET /v1/accounts/{account}/settingsclerk, customer (holder)how the holder pays and receives bills; the mandate text; the changes (clerk)
PUT /v1/accounts/{account}/paymentclerk, customer (holder)grant a SEPA direct debit mandate, or switch to transfer
PUT /v1/accounts/{account}/deliveryclerk, customer (holder)bills by e-mail with consent, or by post
GET /v1/signinnonewhich ways of signing in are on, and the provider's name
POST /v1/signinnonestart a passkey sign-in
POST /v1/signin/finishnonefinish it; sets the session cookie
POST /v1/signin/registernonestart setting up a passkey with an invitation
POST /v1/signin/register/finishnonefinish it; starts the grant and a session
POST /v1/signin/oidcnonestart a sign-in at the operator's provider; answers its address
GET /v1/signin/oidc/callbackthe provider's redirectfinish it and go back to the portal
POST /v1/signoutcustomerend the session; answers the provider's logout address for a provider session
GET /v1/mecustomerthe signed-in person and their accounts at every creditor, with what is open and how it is paid
POST /v1/me/invitationscustomeradd another invitation's account, of any creditor of the sign-in, to the signed-in person
GET /v1/me/delegationscustomer (holder)who else may read the accounts the person holds, at every creditor
POST /v1/me/delegationscustomer (holder)share an account read-only until a date
DELETE /v1/me/delegations/{id}customer (holder)revoke a delegation

A customer is a session from customer sign-in: it reaches only the accounts of its current grants, and its calls that change something must come from the sign-in origin. A session with accounts at several companies names one with ?creditor= on account and bill routes.

Requests

  • Bodies are JSON; an unknown field is refused and named.
  • Money is a decimal string ("27.71"); a JSON number for money is refused.
  • Dates are YYYY-MM-DD; periods are half-open (end is the first day after).
  • The request body is at most 16 MiB.

Errors

Errors are application/problem+json documents [RFC 9457]:

{
  "type": "urn:konto:refusal:stale_evidence",
  "title": "Neu prüfen und erneut bestätigen: Seit der Prüfung hat sich eine Eingabe geändert.",
  "status": 409,
  "detail": "Seit der Prüfung haben sich Positionen oder Abschnitte geändert; bitte neu prüfen."
}

type carries a stable code, title says what to do and detail what is wrong, both in German. Refusal codes lists every code.

StatusWhen
400a body that is not JSON
401no or unknown token, without a body; not_signed_in or signin_failed for a customer
403the body names another creditor, the role may not use the route, or a customer call from another origin
404an unknown bill or delivery, a payment with nothing open, or an account or bill outside a customer's grants
409a stale or used review, a number that is not the next one, a charge reference delivered with other content, a delivery already reported otherwise
413a body or a delivery above its limit
422an invalid field, or any other refusal
503stored commands do not replay to their recorded state, or customer sign-in is not available

Another creditor's account or bill answers exactly like one that does not exist.

This page as Markdown · Improve this page