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

# Partially Update Revenue Contract



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json patch /rev/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.


    ## 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:
  /rev/api/v1/contracts/{id}:
    patch:
      tags:
        - Revenue
      summary: Partially Update Revenue Contract
      operationId: rev_api_v1_contracts_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedRevenueContract'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedRevenueContract'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedRevenueContract'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueContract'
          description: ''
components:
  schemas:
    PatchedRevenueContract:
      type: object
      description: |-
        Base serializer that injects the request user's customer on create and
        restricts related-object querysets to the same customer.
      properties:
        id:
          type: integer
          readOnly: true
        contract_number:
          type: string
          readOnly: true
          description: >-
            Sequential per-customer contract number (e.g. CTR-0000001), assigned
            at creation.
        name:
          type: string
          maxLength: 255
        status:
          $ref: '#/components/schemas/RevenueContractStatusEnum'
        entity:
          type: integer
          nullable: true
        entity_name:
          type: string
          readOnly: true
        client:
          type: integer
          nullable: true
        client_name:
          type: string
          readOnly: true
        source:
          $ref: '#/components/schemas/SourceFc1Enum'
        consultant:
          type: string
          maxLength: 250
        crm_opportunity_id:
          type: string
          maxLength: 255
        crm_link:
          type: string
          maxLength: 500
        contract_link:
          type: string
          maxLength: 500
        purchase_order_number:
          type: string
          maxLength: 120
        department:
          type: integer
          nullable: true
        department_name:
          type: string
          readOnly: true
        tags:
          type: array
          items:
            type: integer
        execution_date:
          type: string
          format: date
          nullable: true
        service_start:
          type: string
          format: date
          nullable: true
        service_end:
          type: string
          format: date
          nullable: true
        terminated_date:
          type: string
          format: date
          nullable: true
        currency:
          type: string
          maxLength: 3
        termination_notice_days:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        payment_term:
          type: integer
          nullable: true
          description: >-
            Payment terms for generated invoices; lines snapshot its days. None
            means due on receipt.
        payment_term_name:
          type: string
          readOnly: true
          default: ''
        renewal_behavior:
          $ref: '#/components/schemas/RevenueContractRenewalBehaviorEnum'
        header_discount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        renewed_into:
          type: integer
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/RevenueContractNestedLine'
          writeOnly: true
        obligations:
          type: array
          items:
            $ref: '#/components/schemas/RevenueContractNestedObligation'
          writeOnly: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
    RevenueContract:
      type: object
      description: |-
        Base serializer that injects the request user's customer on create and
        restricts related-object querysets to the same customer.
      properties:
        id:
          type: integer
          readOnly: true
        contract_number:
          type: string
          readOnly: true
          description: >-
            Sequential per-customer contract number (e.g. CTR-0000001), assigned
            at creation.
        name:
          type: string
          maxLength: 255
        status:
          $ref: '#/components/schemas/RevenueContractStatusEnum'
        entity:
          type: integer
          nullable: true
        entity_name:
          type: string
          readOnly: true
        client:
          type: integer
          nullable: true
        client_name:
          type: string
          readOnly: true
        source:
          $ref: '#/components/schemas/SourceFc1Enum'
        consultant:
          type: string
          maxLength: 250
        crm_opportunity_id:
          type: string
          maxLength: 255
        crm_link:
          type: string
          maxLength: 500
        contract_link:
          type: string
          maxLength: 500
        purchase_order_number:
          type: string
          maxLength: 120
        department:
          type: integer
          nullable: true
        department_name:
          type: string
          readOnly: true
        tags:
          type: array
          items:
            type: integer
        execution_date:
          type: string
          format: date
          nullable: true
        service_start:
          type: string
          format: date
          nullable: true
        service_end:
          type: string
          format: date
          nullable: true
        terminated_date:
          type: string
          format: date
          nullable: true
        currency:
          type: string
          maxLength: 3
        termination_notice_days:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        payment_term:
          type: integer
          nullable: true
          description: >-
            Payment terms for generated invoices; lines snapshot its days. None
            means due on receipt.
        payment_term_name:
          type: string
          readOnly: true
          default: ''
        renewal_behavior:
          $ref: '#/components/schemas/RevenueContractRenewalBehaviorEnum'
        header_discount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        renewed_into:
          type: integer
          nullable: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/RevenueContractNestedLine'
          writeOnly: true
        obligations:
          type: array
          items:
            $ref: '#/components/schemas/RevenueContractNestedObligation'
          writeOnly: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - attachments
        - client_name
        - contract_number
        - created_at
        - department_name
        - entity_name
        - id
        - last_modified_at
        - name
        - payment_term_name
    RevenueContractStatusEnum:
      enum:
        - PENDING_REVIEW
        - ACTIVE
        - COMPLETED
        - EARLY_RENEWED
        - TERMINATED
      type: string
      description: |-
        * `PENDING_REVIEW` - Pending review
        * `ACTIVE` - Active
        * `COMPLETED` - Fully recognized
        * `EARLY_RENEWED` - Early-renewed
        * `TERMINATED` - Terminated
    SourceFc1Enum:
      enum:
        - SALESFORCE
        - HUBSPOT
        - STRIPE
        - MANUAL
      type: string
      description: |-
        * `SALESFORCE` - Salesforce
        * `HUBSPOT` - Hubspot
        * `STRIPE` - Stripe
        * `MANUAL` - Manual
    RevenueContractRenewalBehaviorEnum:
      enum:
        - NONE
        - AUTO_RENEW
        - MANUAL
      type: string
      description: |-
        * `NONE` - None
        * `AUTO_RENEW` - Auto-renew
        * `MANUAL` - Manual renewal
    RevenueContractNestedLine:
      type: object
      description: >-
        A contract line embedded in a contract create or update payload.

        On update, ``id`` matches an existing line to modify; lines without an

        ``id`` are created and existing lines missing from the payload are
        deleted.
      properties:
        id:
          type: integer
        key:
          type: string
          writeOnly: true
        ordinal:
          type: integer
          maximum: 2147483647
          minimum: 0
        product:
          type: integer
          nullable: true
        product_bundle:
          type: integer
          nullable: true
        product_name:
          type: string
          maxLength: 255
        product_sku:
          type: string
          maxLength: 255
        description:
          type: string
        quantity:
          type: number
          format: double
          maximum: 100000000000
          minimum: -100000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        unit_price:
          type: number
          format: double
          maximum: 1000000000000000
          minimum: -1000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        overage_rate:
          type: number
          format: double
          maximum: 1000000000000000
          minimum: -1000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        overage_cadence:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/OverageCadenceEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        discount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        transaction_price:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        service_start:
          type: string
          format: date
          nullable: true
        service_end:
          type: string
          format: date
          nullable: true
        exclude_from_allocation:
          type: boolean
        is_mrr:
          type: boolean
        billing_cadence:
          $ref: '#/components/schemas/BillingCadence3f4Enum'
        billing_timing:
          $ref: '#/components/schemas/BillingTiming8d1Enum'
        invoice_calculation:
          $ref: '#/components/schemas/InvoiceCalculationEnum'
        net_terms:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
      required:
        - product_name
    RevenueContractNestedObligation:
      type: object
      description: >-
        A performance obligation embedded in a contract create or update
        payload.

        ``line_key`` links it to an embedded line's client-side ``key``. On

        update, ``id`` matches an existing obligation to modify; obligations

        without an ``id`` are created and existing ones missing from the payload

        are deleted.
      properties:
        id:
          type: integer
        line_key:
          type: string
          writeOnly: true
        ordinal:
          type: integer
          maximum: 2147483647
          minimum: 0
        product:
          type: integer
          nullable: true
        status:
          $ref: '#/components/schemas/StatusBe4Enum'
        recognition_method:
          $ref: '#/components/schemas/RecognitionMethodEnum'
        recognition_proration:
          $ref: '#/components/schemas/RecognitionProrationEnum'
        period_source:
          $ref: '#/components/schemas/PeriodSourceEnum'
        invoiced_amount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        allocated_amount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        start_date:
          type: string
          format: date
          nullable: true
        end_date:
          type: string
          format: date
          nullable: true
        revenue_account:
          type: integer
          nullable: true
        deferred_revenue_account:
          type: integer
          nullable: true
    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
    OverageCadenceEnum:
      enum:
        - MONTHLY
        - QUARTERLY
        - SEMI_ANNUAL
        - ANNUAL
        - CUSTOM
      type: string
      description: |-
        * `MONTHLY` - Monthly
        * `QUARTERLY` - Quarterly
        * `SEMI_ANNUAL` - Semi-annual
        * `ANNUAL` - Annual
        * `CUSTOM` - Custom
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    BillingCadence3f4Enum:
      enum:
        - MONTHLY
        - QUARTERLY
        - SEMI_ANNUAL
        - ANNUAL
        - CUSTOM
      type: string
      description: |-
        * `MONTHLY` - Monthly
        * `QUARTERLY` - Quarterly
        * `SEMI_ANNUAL` - Semi-annual
        * `ANNUAL` - Annual
        * `CUSTOM` - Custom
    BillingTiming8d1Enum:
      enum:
        - ADVANCE
        - ARREARS
      type: string
      description: |-
        * `ADVANCE` - In advance (start of period)
        * `ARREARS` - In arrears (end of period)
    InvoiceCalculationEnum:
      enum:
        - FIXED_RATE
        - FIXED_QUANTITY
      type: string
      description: |-
        * `FIXED_RATE` - Fixed Rate
        * `FIXED_QUANTITY` - Fixed Quantity
    StatusBe4Enum:
      enum:
        - ACTIVE
        - COMPLETED
        - TERMINATED
      type: string
      description: |-
        * `ACTIVE` - Active
        * `COMPLETED` - Completed
        * `TERMINATED` - Terminated
    RecognitionMethodEnum:
      enum:
        - STRAIGHT_LINE
        - POINT_IN_TIME
        - USAGE_COMMIT
        - USAGE_PAYGO
        - USAGE_MIRROR
      type: string
      description: |-
        * `STRAIGHT_LINE` - Ratable (straight-line)
        * `POINT_IN_TIME` - Point-in-time
        * `USAGE_COMMIT` - As-consumed — commit drawdown
        * `USAGE_PAYGO` - As-consumed — pay-as-you-go
        * `USAGE_MIRROR` - As-consumed — mirrors linked commit
    RecognitionProrationEnum:
      enum:
        - MONTHLY
        - THIRTY_DAY
        - DAILY
      type: string
      description: |-
        * `MONTHLY` - Monthly
        * `THIRTY_DAY` - 30-day month
        * `DAILY` - Daily
    PeriodSourceEnum:
      enum:
        - LINE
        - LINKED_OBLIGATION
        - CONTRACT_TERM
      type: string
      description: |-
        * `LINE` - Contract line dates
        * `LINKED_OBLIGATION` - Follows another obligation
        * `CONTRACT_TERM` - Full contract term

````