> ## Documentation Index
> Fetch the complete documentation index at: https://docs.campfire.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview Contract Termination Settlement



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json get /rr/api/v1/contracts/{id}/termination-settlement-preview
openapi: 3.0.3
info:
  title: Campfire Developer APIs
  version: 1.0.0
  description: >
    ## Introduction

    Campfire's developer APIs offer granular access to Campfire's core
    accounting,

    revenue recognition, and financial data features.


    These APIs are designed to be used by developers to build custom
    integrations,

    automate workflows, and perform any other programmatic operations.


    ## Rate limits

    API users can make up to **5 requests per second**. This limit is shared
    across

    all endpoints for the same API user. Requests that exceed the limit receive
    a

    `429 Too Many Requests` response. Wait for the number of seconds specified
    in

    the `Retry-After` response header before retrying.
servers:
  - url: https://api.meetcampfire.com
    description: Production server
security: []
tags:
  - name: Cash Management
    description: Operations related to accounts, transactions, and other bank-related data.
  - name: Core Accounting
    description: >-
      Operations related to core accounting data, such as the chart of accounts,
      entity management, and the general ledger.
  - name: Revenue Recognition
    description: >-
      Operations related to revenue recognition, contract management, and
      contract data aggregation.
  - name: Accounts Receivable
    description: Operations related to invoicing and the AR subledger
  - name: Accounts Payable
    description: Operations related to billing and the AP subledger.
  - name: Financial Statements
    description: Operations related to financial statement generation and data aggregation.
  - name: Settings
    description: Operations related to system and accounting settings configuration.
paths:
  /rr/api/v1/contracts/{id}/termination-settlement-preview:
    get:
      tags:
        - Revenue Recognition
      summary: Preview Contract Termination Settlement
      operationId: rr_api_v1_contracts_termination_settlement_preview_retrieve
      parameters:
        - in: query
          name: credit_unused_revenue
          schema:
            type: boolean
            default: true
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - in: query
          name: termination_date
          schema:
            type: string
            format: date
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminationSettlementPreviewResponse'
          description: ''
components:
  schemas:
    TerminationSettlementPreviewResponse:
      type: object
      properties:
        termination_date:
          type: string
          format: date
        posting_date:
          type: string
          format: date
        total_reversal_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        total_credit_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        source_credit_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        successor_credit_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        total_tax_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/TerminationSettlementLine'
        warnings:
          type: array
          items:
            type: string
        can_settle:
          type: boolean
        blocking_reason:
          type: string
          nullable: true
        successor_adjustment:
          allOf:
            - $ref: '#/components/schemas/TerminationSuccessorAdjustment'
          nullable: true
        reconciliation:
          allOf:
            - $ref: '#/components/schemas/TerminationSettlementReconciliation'
          nullable: true
      required:
        - blocking_reason
        - can_settle
        - lines
        - posting_date
        - reconciliation
        - source_credit_amount
        - successor_adjustment
        - successor_credit_amount
        - termination_date
        - total_credit_amount
        - total_reversal_amount
        - total_tax_amount
        - warnings
    TerminationSettlementLine:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/TerminationSettlementLineKindEnum'
        source_id:
          type: integer
          nullable: true
        label:
          type: string
        product_id:
          type: integer
          nullable: true
        product_name:
          type: string
          nullable: true
        reversal_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        credit_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        tax_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        billed_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        consumed_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        unused_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        consideration_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        recognized_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        unrecognized_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
      required:
        - billed_amount
        - consideration_amount
        - consumed_amount
        - credit_amount
        - kind
        - label
        - product_id
        - product_name
        - recognized_amount
        - reversal_amount
        - source_id
        - tax_amount
        - unrecognized_amount
        - unused_amount
    TerminationSuccessorAdjustment:
      type: object
      properties:
        subscription_recognized:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        subscription_credit:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        adjustment:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        requires_successor:
          type: boolean
        eligible_targets:
          type: array
          items:
            $ref: '#/components/schemas/TerminationSuccessorTarget'
      required:
        - adjustment
        - eligible_targets
        - requires_successor
        - subscription_credit
        - subscription_recognized
    TerminationSettlementReconciliation:
      type: object
      properties:
        consideration:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        recognized:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        unrecognized:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        refund:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        not_transferred:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        transferred:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
      required:
        - consideration
        - not_transferred
        - recognized
        - refund
        - transferred
        - unrecognized
    TerminationSettlementLineKindEnum:
      enum:
        - subscription
        - prepaid_commit
      type: string
      description: |-
        * `subscription` - subscription
        * `prepaid_commit` - prepaid_commit
    TerminationSuccessorTarget:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/Kind5e2Enum'
        id:
          type: integer
        label:
          type: string
        contract_id:
          type: integer
        contract_name:
          type: string
        already_adjusted:
          type: boolean
        has_posted_usage:
          type: boolean
        product_matches:
          type: boolean
      required:
        - already_adjusted
        - contract_id
        - contract_name
        - has_posted_usage
        - id
        - kind
        - label
        - product_matches
    Kind5e2Enum:
      enum:
        - prepaid_commit
      type: string
      description: '* `prepaid_commit` - prepaid_commit'

````