> ## 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 Bundle Allocations

> Partially update bundle allocations. Same behavior as PUT.



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json patch /rr/api/v1/contracts/{contract_id}/usage/{usage_id}/allocations
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}/usage/{usage_id}/allocations:
    patch:
      tags:
        - Revenue Recognition
      summary: Partial Update Bundle Allocations
      description: Partially update bundle allocations. Same behavior as PUT.
      operationId: rr_api_v1_contracts_usage_allocations_partial_update
      parameters:
        - in: path
          name: contract_id
          schema:
            type: integer
          required: true
        - in: path
          name: usage_id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedContractProductBundleUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedContractProductBundleUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedContractProductBundleUpdate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractProductBundle'
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    PatchedContractProductBundleUpdate:
      type: object
      description: Serializer for the allocation update request body.
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/ContractProductBundleLineUpdate'
    ContractProductBundle:
      type: object
      description: |-
        Serializer for ContractProductBundle with nested lines.

        Used for retrieving and updating contract-specific bundle allocations.
        When updating, validates that line amounts sum to total_amount.
      properties:
        id:
          type: integer
          readOnly: true
        source_bundle:
          type: integer
          readOnly: true
          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
          readOnly: true
          description: Total amount to be allocated across products
        currency:
          type: string
          readOnly: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/ContractProductBundleLine'
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - currency
        - id
        - last_modified_at
        - lines
        - source_bundle
        - source_bundle_name
        - total_amount
    ContractProductBundleLineUpdate:
      type: object
      description: Serializer for updating individual line amounts.
      properties:
        product:
          type: integer
          description: Product ID
        amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: New dollar amount for this product allocation
      required:
        - amount
        - product
    ContractProductBundleLine:
      type: object
      description: >-
        Serializer for individual product allocation lines within a
        ContractProductBundle.
      properties:
        id:
          type: integer
          readOnly: true
        product:
          type: integer
          readOnly: true
        product_name:
          type: string
          readOnly: true
        product_id_str:
          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
          description: Calculated percentage based on amount / total
        original_percentage:
          type: number
          format: double
          maximum: 1000
          minimum: -1000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
          nullable: true
          description: Original percentage from source ProductBundle for auditing
      required:
        - amount
        - id
        - original_percentage
        - percentage
        - product
        - product_id_str
        - product_name
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````