Fixing rejected invoices
When a portal, a Peppol access point or a customer rejects an invoice, the message is usually a rule id and a short German or English text. On the free page /fix (no account), in the dashboard (Fix a rejected invoice) or over the API you can:
- Analyse —
POST /v1/invoices/fix/analyzewith{ document, encoding, message }. You get the official validation, each rule id found in the pasted message with an explanation, andfields: the JSON paths of the invoice involved, with their current values. It runs a validation and counts as one document. The analysis also returnsproposals, one per field, in three categories:safe— the value follows from the document itself and changes no money, tax or party data (for example a country code written in lower case). Confidencehigh.confirm— a value the service can compute, for example a total from its parts (BR-CO-10, -13, -15, -16). It changes money, so a person has to confirm it. Confidencemedium.manual— the value has to come from someone who knows the business case, such as the buyer reference. No value is proposed.
- Fix —
POST /v1/invoices/fixwith{ document, encoding, changes: [{ field, value }], accept?: [proposal ids], applySafe?, confirmAmounts?, allowDataLoss? }. The changes are applied to the EN 16931 model, the invoice is written again in its own format and validated. Billed as one document.
{ "document": "<base64>", "encoding": "base64",
"changes": [{ "field": "buyerReference", "value": "04011000-12345-34" }] }
Formats
| Original | Comes back as |
|---|---|
| XRechnung, EN 16931, Peppol BIS (UBL or CII) | the same syntax and specification |
| ZUGFeRD / Factur-X PDF | a new PDF/A-3 with the corrected XML |
| Facturae 3.2, 3.2.1, 3.2.2 | Facturae 3.2.2, unsigned |
| KSeF FA(3) | KSeF FA(3), not submitted |
Facturae and KSeF FA(3) are not EN 16931 syntaxes. The fix reads the invoice into the EN 16931 model, applies the changes and writes it with the same writers as conversion. The data of the format that the model does not hold is taken from the original file and written back unchanged: for Facturae the person type and residence type of seller and buyer, the names of a natural person, the invoice language and FACe administrative centres with an address in Spain; for KSeF the annotations (P_16, P_18A, P_23), the buyer's JST and GV flags, the place of issue (P_1M), the payment date and np I / np II. Everything else the original holds and the model does not (for example a third-party issuer in Facturae, IRPF withholding, a Podmiot3 party or settlement lines in FA(3)) is listed and the call fails with semantic_loss, unless you pass allowDataLoss=true. The written file is read back and compared with the changed invoice; a difference is refused the same way. Facturae corrective invoices and credit notes cannot be written again (the correction data has no EN 16931 term); correct them in the issuing system.
Every response has warnings:
facturae_unsigned— a repaired Facturae file is not signed. The original signature covers the original content and no longer applies. Sign the file again with the issuer's certificate (XAdES) before you send it to FACe or a customer, and do not change it after signing.facturae_version— the original was Facturae 3.2 or 3.2.1; the repaired file is Facturae 3.2.2.ksef_not_submitted— the FA(3) file passes the official schema but is not sent to KSeF; send it through the seller's KSeF access.data_loss_accepted—allowDataLosswas used and values are not in the written file.
The analysis returns the same facturae_unsigned / ksef_not_submitted notice before anything is changed.
Without an account
The page /fix (also /de/fix, /fr/fix, /es/fix, /it/fix, /pl/fix, /nl/fix, /pt/fix) does the same steps in the browser: upload, paste the rejection, see the official result and the proposals, apply the safe ones, enter the manual values, confirm changed amounts with a check box, download the file and see its new validation. It calls POST /public/fix/analyze and POST /public/fix (same bodies as the /v1 calls). Nothing is stored and nothing is billed; each call counts as one check of the free validator's daily allowance (shared with POST /public/validate, same size limit). A call that fails, or that ran no official rule set, is not counted. An invalid result of the free validator has a Fix this invoice button that opens the page with the same file.
Change log
Every response has applied, the change log: for each field the original and new value, the rule, the category, the confidence and the approval (automatic for safe proposals, confirmed for accepted computed values, user_value for values you sent). For a stored invoice (store=true) the log is kept with it: GET /v1/invoices/{id}/repairs.
What is never done automatically
- The service never invents a value. Proposals are either determined by the document (
safe) or computed from other amounts in it (confirm); everything else comes from you. - Changes to amounts, quantities, prices, rates, currencies and VAT categories are refused unless
confirmAmountsistrue— a person has to confirm them. In the dashboard this is a check box. - If the document contains data the EN 16931 model cannot hold (for example XRechnung Extension elements), writing it again would lose it; the call fails with
semantic_lossunless you passallowDataLoss=true. - A Facturae file is never signed by the service; signing needs the issuer's certificate.
A fixed invoice passes the listed technical checks. Whether the recipient accepts and pays it is outside a technical check.
Field paths follow the model: buyerReference, seller.contact.phone, lines[0].item.name, payment.creditTransfers[0].accountId. Use null to remove a value.
E-Invoicing API