Starts closing every billing period awaiting review that ended before a date, optionally limited to those worth no more than a given amount.
Changed onAnswers 202 with a run identifier and closes the periods in the background — each one costs a full invoice recomputation, so a selection of a few hundred takes minutes. Poll GET /billing-periods/close-bulk/{bulkCloseId} for progress, per-period verdicts and the total written off. Each period is closed exactly as the per-period close does, and one period failing is recorded against that period rather than abandoning the rest. A period whose live residual exceeds maxNetInvoiceableAmount is refused rather than written off, so a selection built for small residuals cannot write off a real bill that arrived after the last settlement. Set dryRun to compute what the sweep would write off without minting write-off vouchers or closing anything. Answers 409 Conflict while another sweep is still running; only one runs at a time.
Request
- Base URLhttps://api.rapidata.ai
- URLhttps://api.rapidata.ai/billing-periods/close-bulk
- AuthOpenID Connect (https://auth.rapidata.ai/.well-known/openid-configuration, scopes: openid, profile, email, offline_access, api)
Request body
Response
Accepted
Changes
- info
the security scope
apiwas added to the endpoint's security schemeOpenIdConnect
- info
- info
endpoint added
- info