curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{id}/terminate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"termination_date": "2023-12-25",
"void_invoice_ids": [
123
],
"void_date": "2023-12-25"
}
'{
"contract_terminated": true,
"contract_draft_id": 123,
"voided_invoice_ids": [
123
],
"drafted_invoice_ids": [
123
]
}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).
curl --request POST \
--url https://api.meetcampfire.com/rr/api/v1/contracts/{id}/terminate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"termination_date": "2023-12-25",
"void_invoice_ids": [
123
],
"void_date": "2023-12-25"
}
'{
"contract_terminated": true,
"contract_draft_id": 123,
"voided_invoice_ids": [
123
],
"drafted_invoice_ids": [
123
]
}Token-based authentication with required prefix "Token"
Response serializer for contract termination with hints about drafted operations.
Whether the contract was terminated directly (True) or drafted (False).
Draft queue ID if contract termination was drafted instead of executed.
List of invoice IDs that were voided directly.
List of invoice IDs that were drafted for voiding (user lacks void permission).