Sometimes usage arrives late, or was never sent. Two operations fix the data without a manual adjustment:
- Backfill loads historical events that were missed.
- Rerate recalculates an issued invoice from the usage that is now in Orvlin.
Both respect closed accounting periods: changes to a closed period are refused.
Backfill events
Use backfill for events older than the late-event window. Live traffic should keep using POST /v1/events.
Rules:
- Up to 10,000 events per request.
- Every event needs an
idempotencyKey. Re-sending the same key never counts an event twice, so a failed import can be retried safely.
- Events dated in a closed accounting period are rejected with a reason. Reopen the period only if the correction is approved.
Rerate an invoice
Preview what would change before you apply it:
The preview returns each changed line and the total difference. To apply it:
Rerate a customer’s invoices in a window
After a backfill, rerate every invoice for the customer whose period overlaps the window. Set apply to false to preview first:
Each result lists the invoice, its status, and the changes. An invoice in a closed period is reported with "code": "period_closed" and is left unchanged. The rest of the batch still runs.
Run backfill, then preview the rerate, then apply it. Check the totals against your usage report before you send any corrected invoice to a customer.