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

# Update Contract Subscription



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json put /rr/api/v1/contracts/{contract_id}/subscriptions/{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/{contract_id}/subscriptions/{id}:
    put:
      tags:
        - Revenue Recognition
      summary: Update Contract Subscription
      operationId: rr_api_v1_contracts_subscriptions_update
      parameters:
        - in: path
          name: contract_id
          schema:
            type: integer
          required: true
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ContractSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ContractSubscription'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSubscription'
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    ContractSubscription:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        lines:
          type: string
          readOnly: true
        product_name:
          type: string
          readOnly: true
        product_is_renewable:
          type: boolean
          readOnly: true
          nullable: true
        product_bundle:
          type: string
          readOnly: true
        product_bundle_name:
          type: string
          readOnly: true
        contract_product_bundle:
          allOf:
            - $ref: '#/components/schemas/ContractProductBundleRead'
          readOnly: true
        total_value:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        rate:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        quantity:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        renewal_behavior:
          allOf:
            - $ref: '#/components/schemas/RenewalBehaviorEnum'
          description: >-
            Controls how this subscription ends. FOLLOW_CONTRACT extends with
            the evergreen contract's rolling end boundary (working_end_date /
            effective_end_date). FIXED_END keeps an explicit subscription
            end_date. Default is FIXED_END.


            * `FOLLOW_CONTRACT` - Follow Contract

            * `FIXED_END` - Fixed End Date
        period_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: >-
            Evergreen-only input amount per billing period (for example 10000.00
            for a quarterly period). Provide this to auto-generate lines for
            evergreen subscriptions. Ignored for non-evergreen writes.
        invoiced_amount_migration:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          writeOnly: true
          nullable: true
          description: >-
            Migration-only: total amount already invoiced in a prior system.
            When provided, marks revenue transactions as migration-invoiced up
            to this amount.
        is_contract_amendment:
          type: boolean
        start_date:
          type: string
          format: date
          nullable: true
        end_date:
          type: string
          format: date
          nullable: true
        mrr:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        notes:
          type: string
          nullable: true
        use_daily_accounting:
          type: boolean
        proration_method:
          allOf:
            - $ref: '#/components/schemas/ProrationMethodEnum'
          readOnly: true
        use_catchup:
          type: boolean
        catchup_date:
          type: string
          format: date
          nullable: true
        invoice_calculation:
          allOf:
            - $ref: '#/components/schemas/InvoiceCalculationEnum'
          description: >-
            Fixed Rate: rate stays constant, quantity calculated. Fixed
            Quantity: quantity stays constant (e.g., seats), rate calculated.


            * `FIXED_RATE` - Fixed Rate

            * `FIXED_QUANTITY` - Fixed Quantity
        created_at:
          type: string
          format: date-time
          readOnly: true
        source:
          $ref: '#/components/schemas/SourceFc1Enum'
        external_id:
          type: string
          nullable: true
          maxLength: 250
        rates_are_net:
          type: boolean
          description: >-
            When True, this subscription's rate and waterfall amounts already
            reflect post-discount (net) pricing. Prevents invoice creation from
            double-counting discounts via a separate Discount
            RevenueTransaction.
        customer:
          type: integer
          readOnly: true
        contract:
          type: integer
        product:
          type: integer
          nullable: true
        modified_subscription:
          type: integer
          nullable: true
      required:
        - contract
        - contract_product_bundle
        - created_at
        - customer
        - deleted_at
        - id
        - is_deleted
        - last_modified_at
        - lines
        - product_bundle
        - product_bundle_name
        - product_is_renewable
        - product_name
        - proration_method
        - total_value
    ContractProductBundleRead:
      type: object
      description: Read-only serializer for ContractProductBundle in milestone responses.
      properties:
        id:
          type: integer
          readOnly: true
        source_bundle:
          type: integer
          nullable: true
          description: Original ProductBundle template this was created from
        source_bundle_name:
          type: string
          readOnly: true
          nullable: true
        total_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Total amount to be allocated across products
        currency:
          type: string
          maxLength: 3
        lines:
          type: array
          items:
            $ref: '#/components/schemas/ContractProductBundleLineRead'
          readOnly: true
      required:
        - id
        - lines
        - source_bundle_name
        - total_amount
    RenewalBehaviorEnum:
      enum:
        - FOLLOW_CONTRACT
        - FIXED_END
      type: string
      description: |-
        * `FOLLOW_CONTRACT` - Follow Contract
        * `FIXED_END` - Fixed End Date
    ProrationMethodEnum:
      enum:
        - standard
        - daily
      type: string
      description: |-
        * `standard` - Standard (actual month length)
        * `daily` - Daily
    InvoiceCalculationEnum:
      enum:
        - FIXED_RATE
        - FIXED_QUANTITY
      type: string
      description: |-
        * `FIXED_RATE` - Fixed Rate
        * `FIXED_QUANTITY` - Fixed Quantity
    SourceFc1Enum:
      enum:
        - SALESFORCE
        - HUBSPOT
        - STRIPE
        - MANUAL
      type: string
      description: |-
        * `SALESFORCE` - Salesforce
        * `HUBSPOT` - Hubspot
        * `STRIPE` - Stripe
        * `MANUAL` - Manual
    ContractProductBundleLineRead:
      type: object
      description: >-
        Read-only serializer for ContractProductBundleLine in milestone
        responses.
      properties:
        id:
          type: integer
          readOnly: true
        product:
          type: integer
        product_name:
          type: string
          readOnly: true
        amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Dollar amount allocated to this product
        percentage:
          type: string
          readOnly: true
        original_percentage:
          type: number
          format: double
          maximum: 1000
          minimum: -1000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          description: Original percentage from source ProductBundle for auditing
      required:
        - amount
        - id
        - percentage
        - product
        - product_name
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````