Skip to main content
POST
Upload invoice PDF
This endpoint requires multipart/form-data with a PDF file upload. The interactive playground cannot send file uploads; use Insomnia/Postman for testing.

Overview

Upload a PDF invoice and attach it to a claim. When you upload a PDF, it is stored and linked to the claim, and OCR attempts to extract invoice data and populate the invoice record.
PDF files only: Only PDF format is accepted. Other file formats (images, Word, Excel, etc.) will be rejected.

Request Format

  • Content-Type: multipart/form-data
  • Required field: file (PDF only)
  • Optional text fields: invoice_number, total_amount, maturity_date, issue_date, invoice_issuer, invoice_recipient, subject, invoice_amount_net, creditor_reminder_fees_incurred, amount_paid, last_payment_date

Authentication

Requires API Token authentication via Bearer token.

Path Parameters

string
required
UUID of the claim you are attaching an invoice to

Request Body (Multipart Form)

file
required
PDF invoice file to upload. Only PDF format is accepted.
string
Invoice number
string
Gross amount of the invoice (maps to invoice_amount_gross)
string
Due date in ISO 8601 format (maps to invoice_due_date)
string
Issue date in ISO 8601 format (maps to invoice_issue_date)
string
Invoice issuer name
string
Invoice recipient name
string
Optional subject/description
string
Net amount
string
Reminder fees (still unpaid)
string
Amount the debtor already paid you on this invoice before handover. Requires total_amount and must be less than it. We collect only the rest; it is not recorded as a payment. A refused combination answers 400 and stores nothing. See the manual invoice endpoint for details.
string
Date of that payment (YYYY-MM-DD, not in the future). Requires amount_paid.

Testing Instructions

  1. Create a new request: Method POST, URL /openapi/claims//invoices
  2. Auth tab: Type Bearer, Token = your API token
  3. Body tab: Type Multipart Form
    • Add field file with type File, select your .pdf (original filename is automatically preserved)
    • Optional text fields: invoice_number, total_amount, maturity_date, issue_date, invoice_issuer, invoice_recipient, subject, invoice_amount_net, creditor_reminder_fees_incurred, amount_paid, last_payment_date
  4. Send request and verify 201 response
Filename Preservation: When using multipart/form-data, the original PDF filename is automatically preserved.The Mintlify playground cannot send multipart/form-data with files. Use Insomnia/Postman for testing.

Examples

cURL
JavaScript
Python

Responses

Notes

  • This endpoint only accepts PDF file uploads via multipart/form-data
  • OCR runs on uploaded PDFs and may populate invoice fields automatically
  • The invoice amount will automatically update the claim’s total_claim_amount via database triggers

Authorizations

Authorization
string
header
required

An API key (ico_live_…), sent as Authorization: Bearer <key>. Not a JWT.

Path Parameters

claim_id
string<uuid>
required

Body

multipart/form-data
file
file
required

The invoice PDF

invoice_number
string
total_amount
number

Gross amount in EUR

maturity_date
string<date>
issue_date
string<date>
invoice_issuer
string

The creditor's name on the invoice

invoice_recipient
string

The debtor's name on the invoice

subject
string
description
string

Stored as the subject when subject is not sent

invoice_amount_net
number
creditor_reminder_fees_incurred
number

Reminder fees the creditor already charged and that are still unpaid

amount_paid
number

Paid by the debtor to the creditor before handover. Requires total_amount and must be less than it; see the manual invoice endpoint

Required range: x >= 0.01
last_payment_date
string<date>

Date of that payment; requires amount_paid

default_date
string<date>

The date the debtor fell into default

creditor_reminder_dates
string

The dates of your own reminders: comma-separated (2026-10-01,2026-10-15), a JSON array, or the field repeated once per date; see the manual invoice endpoint

default_basis
enum<string>

See the manual invoice endpoint

Available options:
reminder,
bgb_286_3
contract_date
string<date>

The date of the contract the invoice is based on

documentType
string
default:invoice

Response

Invoice created

success
boolean
Example:

true

data
object