> ## 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 Usage Event



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json put /rev/api/v1/usage-events/{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/usage-events/{id}:
    put:
      tags:
        - Revenue
      summary: Update Usage Event
      operationId: rev_api_v1_usage_events_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevenueUsageEvent'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RevenueUsageEvent'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RevenueUsageEvent'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueUsageEvent'
          description: ''
components:
  schemas:
    RevenueUsageEvent:
      type: object
      description: >-
        A reported usage fact — the client write path. The server either prices

        its quantity or accepts its raw dollar amount, then expands it into
        ledger

        rows (``records``).
      properties:
        id:
          type: integer
          readOnly: true
        performance_obligation:
          type: integer
        obligation_name:
          type: string
          readOnly: true
        contract:
          type: integer
          readOnly: true
        contract_name:
          type: string
          readOnly: true
        contract_number:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        usage_date:
          type: string
          format: date
        description:
          type: string
          maxLength: 500
        input_type:
          allOf:
            - $ref: '#/components/schemas/InputTypeEnum'
          description: |-
            Whether the event reports units to rate or a raw dollar amount.

            * `QUANTITY` - Quantity
            * `DOLLARS` - Dollar amount
        quantity:
          type: number
          format: double
          maximum: 100000000000
          minimum: -100000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        input_amount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: >-
            Direct billed amount for dollar events; negative values correct
            prior consumption.
        currency:
          type: string
          maxLength: 3
        records:
          type: array
          items:
            $ref: '#/components/schemas/RevenueUsage'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - client_name
        - contract
        - contract_name
        - contract_number
        - created_at
        - id
        - last_modified_at
        - obligation_name
        - performance_obligation
        - records
        - usage_date
    InputTypeEnum:
      enum:
        - QUANTITY
        - DOLLARS
      type: string
      description: |-
        * `QUANTITY` - Quantity
        * `DOLLARS` - Dollar amount
    RevenueUsage:
      type: object
      description: |-
        A priced usage ledger row. Read-only over the API — rows are derived
        from usage events by the pricing expansion, never written directly.
      properties:
        id:
          type: integer
          readOnly: true
        performance_obligation:
          type: integer
        obligation_name:
          type: string
          readOnly: true
        contract:
          type: integer
          readOnly: true
        contract_name:
          type: string
          readOnly: true
        contract_number:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        usage_event:
          type: integer
          nullable: true
          readOnly: true
        input_type:
          type: string
          readOnly: true
          nullable: true
        usage_date:
          type: string
          format: date
        description:
          type: string
          maxLength: 500
        quantity:
          type: number
          format: double
          maximum: 100000000000
          minimum: -100000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        rate:
          type: number
          format: double
          maximum: 1000000000000000
          minimum: -1000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        pricing:
          $ref: '#/components/schemas/PricingEnum'
        currency:
          type: string
          maxLength: 3
        amount:
          type: number
          format: double
          maximum: 10000000000000
          minimum: -10000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        billed_invoice:
          type: integer
          nullable: true
          readOnly: true
        billed_invoice_number:
          type: string
          readOnly: true
          nullable: true
        billed_invoice_status:
          type: string
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - billed_invoice
        - billed_invoice_number
        - billed_invoice_status
        - client_name
        - contract
        - contract_name
        - contract_number
        - created_at
        - id
        - input_type
        - last_modified_at
        - obligation_name
        - performance_obligation
        - usage_date
        - usage_event
    PricingEnum:
      enum:
        - COMMIT
        - OVERAGE
      type: string
      description: |-
        * `COMMIT` - Within commit
        * `OVERAGE` - Overage

````