Parse one incoming invoice
parse_invoiceReads ONE incoming supplier invoice and returns a job id for polling.
Use when: the user has a single invoice (PDF, photo, scan, XML e-invoice or QR bill) and wants supplier, invoice number, dates, amounts, VAT or line items extracted. Do not use when: the user asks to ISSUE an invoice, to send a payment, or to post entries into DATEV/1C — this tool only reads documents. For several documents call it once per document; the returned job ids can be polled independently.
Side effects and cost: the document is downloaded and queued. XML and QR invoices are parsed by code and cost nothing; scans and photos cost 0.07 EUR per page, charged to the prepaid balance. Not idempotent: each call creates a new job and a new charge for scans.
Parameter interactions and edge cases: the same file parsed twice returns the existing job with charged=false instead of billing twice, so retrying after a client timeout is safe — and the second call's country is ignored, the first profile wins. Per API key there is a request rate limit and a cap of 3 parses in flight; exceeding either returns 429 with Retry-After, which is a throttle, not a billing error. country changes field names and tax checks, never the price.
Returns: {ok, job_id, status}. Next step: call get_result with that job_id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_url": "<file_url>"
},
"name": "parse_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | DueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set; the call returns api_key_required when no key is available anywhere. | |
| country | No | Two-letter parsing profile that selects field names and tax rules: de, fr, it, pl, ru, kz, by, us, ae, sa, ua, ge. Defaults to de. Does not change the price; a wrong profile returns plausible but mislabelled fields. | de |
| file_url | Yes | Public https URL of exactly ONE invoice file hosted on duebuddy.work, for example https://duebuddy.work/files/invoice-218.pdf. Allowed endings: .pdf, .jpg, .jpeg, .png, .xml, .xlsx, .xls, .csv. http links and other hosts are rejected with an error; upload the file in the DueBuddy cabinet first to get a link. |