> ## Documentation Index
> Fetch the complete documentation index at: https://docs-beta.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch opening balance

> Fetches the opening balance for an external account. This is useful when verifying or reconciling the historical balance sheet.



## OpenAPI

````yaml get /v1/businesses/{businessId}/external-accounts/{externalAccountId}/opening-balance
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/external-accounts/{externalAccountId}/opening-balance:
    get:
      tags: []
      summary: Fetch opening balance
      description: >-
        Fetches the opening balance for an external account. This is useful when
        verifying or reconciling the historical balance sheet.
      operationId: business.external-accounts.opening-balance.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch opening balance for.
          required: true
          schema:
            type: string
        - name: externalAccountId
          in: path
          description: The UUID of the external account to fetch opening balance for.
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOpeningBalance'
        '404':
          description: >-
            Business id or external account id is not found. This indicates the
            business id is invalid or the business has been archived, or the
            external account id is invalid or the external account has been
            deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiOpeningBalance:
      type: object
      properties:
        external_account_external_id:
          type: string
          description: >-
            Unique ID of the external account in an external system for linking
            and idempotency.
          example: 0Br385JmgbTryJn8nEBnUb4A5ydv06U9Vbqqq
        external_account_source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the external account
        balance:
          type: integer
          description: Opening balance of the account, in cents
          example: 432100
        effective_at:
          type: string
          format: date-time
          description: Timestamp for when the account had this balance
        created_at:
          type: string
          format: date-time
          description: When the opening balance timestamp was created
        updated_at:
          type: string
          format: date-time
          description: When the opening balance timestamp was updated
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
          description: Tags associated with the opening balance
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the opening
            balance (for example, to display to end users).
        metadata:
          $ref: '#/components/schemas/PlatformDefinedJson'
          nullable: true
          description: Arbitrary custom metadata in JSON format with a size limit of 1KB
        reference_number:
          type: string
          nullable: true
          description: >-
            Any (typically user-visible) identifier you would like to associate
            with the opening balance.
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
    TransactionSource:
      type: string
      enum:
        - UNIT
        - PLAID
        - API
        - STRIPE
        - CUSTOM
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag
        key:
          type: string
          description: Key for the tag
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension
        value:
          type: string
          description: Value for the tag
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
    PlatformDefinedJson:
      type: object
      description: Arbitrary JSON data defined by the caller, with a 1KB size constraint
      additionalProperties: true
      example:
        custom_field: value
        any valid json: below 1kb
        nested:
          meaning of life: 42
          array: []
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````