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

# Retrieve Revenue Contract



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json get /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}:
    get:
      tags:
        - Revenue
      summary: Retrieve Revenue Contract
      operationId: rev_api_v1_contracts_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueContract'
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    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
        bill_to_snapshot: {}
        shipping_snapshot: {}
        dimensions: {}
        revenue_hold_from:
          type: string
          format: date
          nullable: true
        revenue_hold_reason:
          type: string
          maxLength: 500
        carry_in: {}
        carry_out: {}
        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
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - 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: 1000000000
          minimum: -1000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        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/BillingCadenceEnum'
        billing_timing:
          $ref: '#/components/schemas/BillingTimingEnum'
        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
        product:
          type: integer
          nullable: true
        obligation_template:
          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
    BillingCadenceEnum:
      enum:
        - MONTHLY
        - QUARTERLY
        - SEMI_ANNUAL
        - ANNUAL
        - CUSTOM
      type: string
      description: |-
        * `MONTHLY` - Monthly
        * `QUARTERLY` - Quarterly
        * `SEMI_ANNUAL` - Semi-annual
        * `ANNUAL` - Annual
        * `CUSTOM` - Custom
    BillingTimingEnum:
      enum:
        - ADVANCE
        - ARREARS
      type: string
      description: |-
        * `ADVANCE` - In advance (start of period)
        * `ARREARS` - In arrears (end of period)
    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
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````