v1

latestOpenAPI 3.0.32026-07-26362271803.3 KB
Revenue Recognition

Terminate Contract

Terminate a contract and optionally void associated invoices.

    If the user has permission to terminate contracts and void invoices, both operations
    are performed atomically. If the user lacks permission for either operation, a draft
    is created instead, and the response indicates which operations were drafted.

    Returns 400 if any of the provided void_invoice_ids are invalid (not found, already voided,
    has payments, void date is before the invoice date, or in a closed period).
post/rr/api/v1/contracts/{id}/terminate

Path parameters

idinteger required

Request body

termination_datestring date required
void_invoice_idsinteger[]

List of invoice IDs to void atomically when terminating the contract.

void_datestring date

Date to use when voiding invoices. Required when void_invoice_ids is provided.

Response

contract_terminatedboolean required

Whether the contract was terminated directly (True) or drafted (False).

contract_draft_idinteger nullable

Draft queue ID if contract termination was drafted instead of executed.

voided_invoice_idsinteger[]

List of invoice IDs that were voided directly.

drafted_invoice_idsinteger[]

List of invoice IDs that were drafted for voiding (user lacks void permission).