A recurring template's history lists what did not happen too
The history now includes failed runs, skipped periods and pauses, each with a type. For those entries invoice_id is null.
The history of a recurring template listed only the invoices it generated. So a month with no invoice left no trace, and "why was March not invoiced?" had no answer in the API. The canonical history now records every entry: what was generated, and what was not and why.
The deprecated flat alias keeps returning only generated invoices, unchanged until it retires.
What breaks
- The trap: an entry is no longer always an invoice. Code that takes each entry's
invoice_idand fetches the invoice now meetsFAILED,SKIPPEDandPAUSEDentries whoseinvoice_idisnull. Filter ontype: GENERATEDfor the previous list. - Pages hold entries, not invoices. The default 20 per page now mixes all four types, so a page can hold fewer invoices than before.
Does this affect you?
- Grep for
/recurring-invoices/followed by/historyunder/v1/companies/. Anything that readsinvoice_idfrom each entry needs to handlenull, or filter ontypefirst.
What else changed
typeisGENERATED,FAILED,SKIPPEDorPAUSED. OnlyGENERATEDuses up the period. After the other three the period is still free, and the next run can fill it.originsays who triggered a generation:MANUAL(a person) orUNATTENDED(the scheduled run). It is absent on entries that are not generations, and on generations recorded before this was stored.reasonexplains aFAILEDorPAUSEDentry, translated to the caller's language. It is text for a person: branch ontype, never onreason.requested_byandrequested_by_namesay who skipped a period, onSKIPPEDentries only. The name is the user's name, or their email when there is none, and never the raw id.- Recorded from 22 September on. Earlier failures, skips and pauses were never stored, so an older gap in the history still has no entry explaining it.
Endpoints
- GET/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/historyEvery entry type, with type, origin, reason and requested_by
Where to go next
Webhook retries now span about 3 days
A failed webhook delivery is now retried 7 times over about 3 days instead of for about a minute, so a short outage of your endpoint no longer loses events.
A simplified invoice can no longer name an identified recipient
Creating or updating a `SIMPLIFIED` invoice whose recipient has a NIF or an alternative identifier now answers `400 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`. Issue it as `STANDARD`.