Export lines take regime 02 on their own
A VAT line exempt under art. 21 or 22 that arrives with regime_key: "01" is stored with "02", instead of being refused by AEAT after issue.
An export — Canarias, Ceuta, Melilla or outside the EU — is a line with exemption_reason EXENTA_ART_21 or EXENTA_ART_22. AEAT only accepts it under regime 02, but 01 is the default, so an export sent the obvious way was issued, numbered, and then refused by AEAT.
The line is now stored with regime 02 whenever it arrives with 01. This applies to invoices, recurring templates and every write path, including issuing.
What else changed
- Expect
regime_key: "02"back on those lines, even if you sent"01"or left it to the default. EXENTA_ART_22is now accepted with regime02, alongsideEXENTA_ART_21.- From 17 to 21 September these lines were rejected with
EXEMPTION_INCOMPATIBLE_WITH_REGIMEinstead of corrected. If you got that code in those days, send the invoice again unchanged. The code stays in the catalogue, but a VAT export line no longer reaches it.
Where to go next
Where the contract and the API disagreed, they now agree
A check of the published contract against the live API found a dozen differences. A few were fixed in the API, and the rest in the contract.
Member grants carry the company's name
Each grant in a member's response and in the grants list now carries `company_name` next to `company_id`, so you can name the company without resolving every id against the account's companies. It is optional and may be `null` for a company that has no name yet. It never falls back to the id.