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

# Balance Intercompany Journal Entry

> 
        Balances an intercompany journal entry by entity and currency.

        This endpoint performs the same balancing logic as the frontend, applying:
        1. Auto-fetching of exchange rates if not provided (requires date field)
        2. Exchange rate roll-forward from native to book to consolidation currencies
        3. Exchange rate plugging to ensure consolidation amounts match across currencies within an entity
        4. Automatic creation of balancing transactions when debits != credits at any currency level

        The endpoint accepts a partial intercompany journal entry with transactions and optionally exchange rates,
        and returns the balanced version with:
        - Auto-fetched exchange rates (if exchange_rates is empty and date is provided)
        - Updated transactions with calculated book and consolidation amounts
        - New balancing transactions added where needed
        - Plugged exchange rates to maintain consolidation consistency

        This is useful for:
        - Validating journal entries before submission
        - Understanding what balancing entries will be created
        - Testing multi-currency and multi-entity scenarios
        - Auto-fetching exchange rates for the journal date
        



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json post /coa/api/intercompany-journal-entry/balance
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:
  /coa/api/intercompany-journal-entry/balance:
    post:
      tags:
        - Core Accounting
      summary: Balance Intercompany Journal Entry
      description: |2-

                Balances an intercompany journal entry by entity and currency.

                This endpoint performs the same balancing logic as the frontend, applying:
                1. Auto-fetching of exchange rates if not provided (requires date field)
                2. Exchange rate roll-forward from native to book to consolidation currencies
                3. Exchange rate plugging to ensure consolidation amounts match across currencies within an entity
                4. Automatic creation of balancing transactions when debits != credits at any currency level

                The endpoint accepts a partial intercompany journal entry with transactions and optionally exchange rates,
                and returns the balanced version with:
                - Auto-fetched exchange rates (if exchange_rates is empty and date is provided)
                - Updated transactions with calculated book and consolidation amounts
                - New balancing transactions added where needed
                - Plugged exchange rates to maintain consolidation consistency

                This is useful for:
                - Validating journal entries before submission
                - Understanding what balancing entries will be created
                - Testing multi-currency and multi-entity scenarios
                - Auto-fetching exchange rates for the journal date
                
      operationId: coa_api_intercompany_journal_entry_balance_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: string
                  format: date
                  description: >-
                    Journal entry date (ISO format: YYYY-MM-DD). Used for
                    auto-fetching exchange rates if exchange_rates is empty.
                transactions:
                  type: array
                  items:
                    type: object
                  description: List of transaction objects
                exchange_rates:
                  type: array
                  items:
                    type: object
                  description: >-
                    List of exchange rate objects (optional - will be
                    auto-fetched if empty and date is provided)
              required:
                - transactions
            examples:
              BalanceRequest:
                value:
                  transactions:
                    - entity: 54
                      entity_name: Top Level
                      entity_currency: USD
                      currency: EUR
                      debit_amount_native: 1000
                      tags: []
                    - entity: 54
                      entity_name: Top Level
                      entity_currency: USD
                      currency: EUR
                      credit_amount_native: 999.5
                      tags: []
                  exchange_rates:
                    - entity: 54
                      entity_name: Top Level
                      originating_currency: EUR
                      target_currency: USD
                      exchange_rate: 1.1
                    - entity: 54
                      entity_name: Top Level
                      originating_currency: USD
                      target_currency: USD
                      exchange_rate: 1
                summary: Example balancing request with multi-currency transactions
                description: >-
                  Request to balance transactions across two entities with
                  different currencies
      responses:
        '200':
          description: No response body
      security:
        - knoxApiToken: []
components:
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````