Upload a receipt

Send a receipt file to the API and track its processing status.

You upload receipts as files to the invoice endpoint. Processing is asynchronous: you immediately get a taskId back and poll the status with it until the document has been processed. Required scope: write:invoices.

Endpoint

POST $BASE/api/partner/v1/businesses/{businessId}/invoices

{businessId} is your business’s ID in KontoBee. Supported formats: PDF, JPEG and PNG as well as e-invoices as XML files, up to 10 MB per file.

Example request

Send the file as multipart/form-data in the file field. docType distinguishes incoming invoices (INCOMING_INVOICE, the default) from outgoing invoices (OUTGOING_INVOICE). An optional Idempotency-Key header prevents duplicate processing when you retry a request:

curl -sS -X POST "$BASE/api/partner/v1/businesses/$BUSINESS_ID/invoices" \
  -H "X-Partner-Api-Key: $API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F "file=@invoice_april.pdf" \
  -F "docType=INCOMING_INVOICE"

Example response

The API responds with 202 Accepted — the receipt has been accepted and processing is running:

{
  "taskId": "6630f1a2b3c4d5e6f7a8b9c0",
  "originalFileName": "invoice_april.pdf",
  "docType": "INCOMING_INVOICE",
  "status": "PROCESSING",
  "documentId": null,
  "createdAt": "2026-05-12T10:01:00Z"
}

Polling the status

Use the taskId to poll the processing status:

curl -sS "$BASE/api/partner/v1/businesses/$BUSINESS_ID/invoices/$TASK_ID/status" \
  -H "X-Partner-Api-Key: $API_KEY"
{
  "taskId": "6630f1a2b3c4d5e6f7a8b9c0",
  "status": "PROCESSED",
  "documentId": "6630f1a2b3c4d5e6f7a8b9c1",
  "retryCount": 0,
  "errorMessage": null,
  "createdAt": "2026-05-12T10:01:00Z",
  "processedAt": "2026-05-12T10:01:24Z"
}
Status Meaning
PROCESSING Accepted, queued or being processed
PROCESSED Done — documentId is set
FAILED Failed permanently — errorMessage states the reason

For many uploads at once there is a batch status endpoint: GET …/invoices/status?taskIds=a,b,c with up to 200 IDs per request.

Quota

Processing counts against your plan’s quota. Once the booking quota is used up, the upload is rejected with 409 and the code NOT_ENOUGH_CREDITS. If only the OCR quota is missing, the upload is accepted and the task ends with the status FAILED.

Once the status is PROCESSED, you retrieve the extracted data via the documentId — see Retrieve a receipt.