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

# Partial Update Contract



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json patch /rr/api/v1/contracts/{id}
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.
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}:
    patch:
      tags:
        - Revenue Recognition
      summary: Partial Update Contract
      operationId: rr_api_v1_contracts_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedContract'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedContract'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedContract'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contract'
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    PatchedContract:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        entity_name:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        client_terms:
          type: string
          readOnly: true
        department_name:
          type: string
          readOnly: true
        parent_department_name:
          type: string
          readOnly: true
        parent_department:
          type: integer
          readOnly: true
        tags:
          type: string
        total_revenue:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        total_mrr:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        total_deferred_revenue:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        currency:
          type: string
          default: USD
        entity_currency:
          type: string
          default: USD
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        prepaid_commits:
          type: array
          items:
            $ref: '#/components/schemas/NestedContractPrepaidCommit'
          writeOnly: true
        contract_end_date:
          type: string
          format: date
          nullable: true
          description: >-
            Fixed end date for standard contracts. Leave null for evergreen
            contracts (is_evergreen=true).
        is_evergreen:
          type: boolean
          default: false
          description: >-
            Set true for evergreen contracts (no fixed end date). Evergreen
            contracts cannot also be auto-renew. Auto-renew is a legacy method
            to extend contracts.
        auto_send_invoices:
          type: boolean
          default: false
          description: >-
            When true, generated invoices are automatically sent on their
            invoice date.
        auto_apply_customer_stripe_config_to_invoices:
          type: boolean
          default: false
          description: >-
            Evergreen contracts only. When true, evergreen-generated invoices
            inherit stripe_connection and use_stripe_auto_bill from the contract
            customer.
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        is_deleted:
          type: string
          readOnly: true
        deleted_at:
          type: string
          readOnly: true
        usage_tiers:
          type: string
        has_invoices:
          type: boolean
          readOnly: true
          default: false
        has_journal_entries:
          type: boolean
          readOnly: true
          default: false
        has_credit_memos:
          type: boolean
          readOnly: true
          default: false
        effective_end_date:
          type: string
          format: date
          readOnly: true
          description: >-
            Rolling horizon end date for active evergreen contracts. It will be
            auto-generated by Campfire backend. Null for standard contracts.
        working_end_date:
          type: string
          format: date
          readOnly: true
          description: >-
            Canonical end date used by the system. Equals contract_end_date for
            standard or terminated contracts, and effective_end_date for active
            evergreen contracts.
        evergreen_locked_date:
          type: string
          format: date
          nullable: true
          readOnly: true
          description: >-
            Inclusive lock date for evergreen contracts based on paid invoices
            and close books date. Dates on or before this value are immutable.
            Null for non-evergreen contracts, or when no financial locking
            events exist.
        search_vector:
          type: string
          readOnly: true
          nullable: true
        search_text:
          type: string
          readOnly: true
          nullable: true
        billing_frequency:
          $ref: '#/components/schemas/BillingFrequencyEnum'
        deal_name:
          type: string
          nullable: true
          maxLength: 250
        deal_id:
          type: string
          nullable: true
          maxLength: 250
        consultant:
          type: string
          nullable: true
          maxLength: 250
        closed_date:
          type: string
          format: date
          nullable: true
        total_contract_value:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        contract_start_date:
          type: string
          format: date
          nullable: true
        exchange_rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        exchange_rate_book:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        crm_link:
          type: string
          nullable: true
          maxLength: 500
        contract_link:
          type: string
          nullable: true
          maxLength: 500
        status:
          $ref: '#/components/schemas/ContractStatusEnum'
        source:
          $ref: '#/components/schemas/SourceFc1Enum'
        source_deal_data:
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        auto_renew:
          type: boolean
        auto_renew_duration:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
        auto_renew_invoice:
          type: boolean
        tag_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        tag_group_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        minimum_monthly_commitment_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: Minimum monthly commitment amount (allowance threshold)
        minimum_monthly_commitment_quantity:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: Minimum monthly commitment quantity (allowance threshold in units)
        purchase_order_number:
          type: string
          nullable: true
          maxLength: 120
        customer:
          type: integer
          readOnly: true
        entity:
          type: integer
          nullable: true
        client:
          type: integer
          nullable: true
        department:
          type: integer
          nullable: true
        journal_entries:
          type: array
          items:
            type: integer
    Contract:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        entity_name:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        client_terms:
          type: string
          readOnly: true
        department_name:
          type: string
          readOnly: true
        parent_department_name:
          type: string
          readOnly: true
        parent_department:
          type: integer
          readOnly: true
        tags:
          type: string
        total_revenue:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        total_mrr:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        total_deferred_revenue:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        currency:
          type: string
          default: USD
        entity_currency:
          type: string
          default: USD
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        prepaid_commits:
          type: array
          items:
            $ref: '#/components/schemas/NestedContractPrepaidCommit'
          writeOnly: true
        contract_end_date:
          type: string
          format: date
          nullable: true
          description: >-
            Fixed end date for standard contracts. Leave null for evergreen
            contracts (is_evergreen=true).
        is_evergreen:
          type: boolean
          default: false
          description: >-
            Set true for evergreen contracts (no fixed end date). Evergreen
            contracts cannot also be auto-renew. Auto-renew is a legacy method
            to extend contracts.
        auto_send_invoices:
          type: boolean
          default: false
          description: >-
            When true, generated invoices are automatically sent on their
            invoice date.
        auto_apply_customer_stripe_config_to_invoices:
          type: boolean
          default: false
          description: >-
            Evergreen contracts only. When true, evergreen-generated invoices
            inherit stripe_connection and use_stripe_auto_bill from the contract
            customer.
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        is_deleted:
          type: string
          readOnly: true
        deleted_at:
          type: string
          readOnly: true
        usage_tiers:
          type: string
        has_invoices:
          type: boolean
          readOnly: true
          default: false
        has_journal_entries:
          type: boolean
          readOnly: true
          default: false
        has_credit_memos:
          type: boolean
          readOnly: true
          default: false
        effective_end_date:
          type: string
          format: date
          readOnly: true
          description: >-
            Rolling horizon end date for active evergreen contracts. It will be
            auto-generated by Campfire backend. Null for standard contracts.
        working_end_date:
          type: string
          format: date
          readOnly: true
          description: >-
            Canonical end date used by the system. Equals contract_end_date for
            standard or terminated contracts, and effective_end_date for active
            evergreen contracts.
        evergreen_locked_date:
          type: string
          format: date
          nullable: true
          readOnly: true
          description: >-
            Inclusive lock date for evergreen contracts based on paid invoices
            and close books date. Dates on or before this value are immutable.
            Null for non-evergreen contracts, or when no financial locking
            events exist.
        search_vector:
          type: string
          readOnly: true
          nullable: true
        search_text:
          type: string
          readOnly: true
          nullable: true
        billing_frequency:
          $ref: '#/components/schemas/BillingFrequencyEnum'
        deal_name:
          type: string
          nullable: true
          maxLength: 250
        deal_id:
          type: string
          nullable: true
          maxLength: 250
        consultant:
          type: string
          nullable: true
          maxLength: 250
        closed_date:
          type: string
          format: date
          nullable: true
        total_contract_value:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        contract_start_date:
          type: string
          format: date
          nullable: true
        exchange_rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        exchange_rate_book:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        crm_link:
          type: string
          nullable: true
          maxLength: 500
        contract_link:
          type: string
          nullable: true
          maxLength: 500
        status:
          $ref: '#/components/schemas/ContractStatusEnum'
        source:
          $ref: '#/components/schemas/SourceFc1Enum'
        source_deal_data:
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        auto_renew:
          type: boolean
        auto_renew_duration:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
        auto_renew_invoice:
          type: boolean
        tag_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        tag_group_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        minimum_monthly_commitment_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: Minimum monthly commitment amount (allowance threshold)
        minimum_monthly_commitment_quantity:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: Minimum monthly commitment quantity (allowance threshold in units)
        purchase_order_number:
          type: string
          nullable: true
          maxLength: 120
        customer:
          type: integer
          readOnly: true
        entity:
          type: integer
          nullable: true
        client:
          type: integer
          nullable: true
        department:
          type: integer
          nullable: true
        journal_entries:
          type: array
          items:
            type: integer
      required:
        - attachments
        - client_name
        - client_terms
        - created_at
        - customer
        - deleted_at
        - department_name
        - effective_end_date
        - entity_name
        - evergreen_locked_date
        - has_credit_memos
        - has_invoices
        - has_journal_entries
        - id
        - is_deleted
        - last_modified_at
        - parent_department
        - parent_department_name
        - search_text
        - search_vector
        - total_deferred_revenue
        - total_mrr
        - total_revenue
        - working_end_date
    File:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        customer:
          type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          type: integer
          nullable: true
          readOnly: true
        created_by_name:
          type: string
          readOnly: true
        created_by_email:
          type: string
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        name:
          type: string
        url:
          type: string
          readOnly: true
        s3_content_type:
          type: string
          nullable: true
        s3_content_length:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        s3_path:
          type: string
        object_id:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        app:
          type: string
          readOnly: true
        model:
          type: string
          readOnly: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - app
        - created_at
        - created_by
        - created_by_email
        - created_by_name
        - customer
        - deleted_at
        - id
        - is_deleted
        - last_modified_at
        - model
        - name
        - s3_path
        - url
    NestedContractPrepaidCommit:
      type: object
      properties:
        entity:
          type: integer
          nullable: true
        product:
          type: integer
          nullable: true
        name:
          type: string
          maxLength: 250
        description:
          type: string
          default: ''
        currency:
          type: string
          nullable: true
        exchange_rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        exchange_rate_book:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        total_value:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        discount_percentage:
          type: number
          format: double
          maximum: 1000
          minimum: -1000
          exclusiveMaximum: true
          exclusiveMinimum: true
          default: 0
        rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        start_date:
          type: string
          format: date
        expiration_date:
          type: string
          format: date
          nullable: true
        priority:
          type: integer
          default: 1
        subledger:
          type: integer
          nullable: true
        overage_invoice_cadence:
          $ref: '#/components/schemas/OverageInvoiceCadenceEnum'
        auto_send_overage_invoices:
          type: boolean
          default: false
        overage_invoice_start_month:
          type: string
          format: date
          nullable: true
        department:
          type: integer
          nullable: true
        tags:
          type: array
          items:
            type: integer
      required:
        - name
        - start_date
        - total_value
    BillingFrequencyEnum:
      enum:
        - monthly
        - quarterly
        - biannual
        - annual
        - one_time
        - custom
      type: string
      description: |-
        * `monthly` - Monthly
        * `quarterly` - Quarterly
        * `biannual` - Bi Annualy
        * `annual` - Annual
        * `one_time` - One Time
        * `custom` - Custom
    ContractStatusEnum:
      enum:
        - ACTIVE
        - PENDING
        - COMPLETED
        - DELETED
      type: string
      description: |-
        * `ACTIVE` - Active
        * `PENDING` - Pending
        * `COMPLETED` - Completed
        * `DELETED` - Deleted
    SourceFc1Enum:
      enum:
        - SALESFORCE
        - HUBSPOT
        - STRIPE
        - MANUAL
      type: string
      description: |-
        * `SALESFORCE` - Salesforce
        * `HUBSPOT` - Hubspot
        * `STRIPE` - Stripe
        * `MANUAL` - Manual
    OverageInvoiceCadenceEnum:
      enum:
        - monthly
        - quarterly
        - biannual
        - annual
        - one_time
        - custom
      type: string
      description: |-
        * `monthly` - Monthly
        * `quarterly` - Quarterly
        * `biannual` - Bi Annualy
        * `annual` - Annual
        * `one_time` - One Time
        * `custom` - Custom
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````