Archive a commit
Credits and commits
Archive a commit
Archive a contract-level or customer-level commit. Use this endpoint to deactivate a commit while preserving historical records. You will not be able to archive a commit until all of the finalized usage invoices the commit has been applied to are voided, and all of the finalized invoices for commit payment have been voided.
Example workflow: The customer was provisioned a prepaid commit erroneously. It was applied to their most recent finalized usage invoice.
- First, void the finalized invoice that the commit was applied to. Also, void the finalized invoice associated with the commit payment.
- Then, use the archiveCommit endpoint to deactivate the commit.
- Finally, regenerate the voided invoice. The invoice will be regenerated without the application of the commit, which has now been archived.
Usage guidelines:
- Once a commit has been archived, it will no longer appear by default on the endpoints
listCustomerCommitsorlistCustomerBalances. Use theinclude_archivedparameter to choose to fetch the details. - Once a commit has been archived, it has a null ledger and 0 remaining balance.
- Archiving a commit fully deactivates the entire access schedule. If you want to reduce the amount granted in a commit, consider editing the access schedule using the
editCommitendpoint, or adding a manual ledger entry using theaddManualBalanceLedgerEntryendpoint.
POST
Archive a commit
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Customer ID and Commit ID to archive
Response
Success