---
title: "Terminate Contract"
method: POST
path: "/rr/api/v1/contracts/{id}/terminate"
tags: ["Revenue Recognition"]
---

# Terminate Contract

`POST /rr/api/v1/contracts/{id}/terminate`

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).

## Path parameters

- `id` integer, required

## Request body

- TerminateContract
  - `termination_date` string, date, required
  - `void_invoice_ids` integer[] — List of invoice IDs to void atomically when terminating the contract.
  - `void_date` string, date — Date to use when voiding invoices. Required when void_invoice_ids is provided.

## Response `200`

- TerminateContractResponse — Response serializer for contract termination with hints about drafted operations.
  - `contract_terminated` boolean, required — Whether the contract was terminated directly (True) or drafted (False).
  - `contract_draft_id` integer, nullable — Draft queue ID if contract termination was drafted instead of executed.
  - `voided_invoice_ids` integer[] — List of invoice IDs that were voided directly.
  - `drafted_invoice_ids` integer[] — List of invoice IDs that were drafted for voiding (user lacks void permission).

---

[API](https://skmtc.net/campfire/apis/campfire-developer-apis.md) · [All operations](https://skmtc.net/campfire/apis/campfire-developer-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/campfire/campfire-developer-apis/versions/6945ebc3180e/schema)
