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

# Get all ledgers

> Retrieve all ledgers accessible to the user



## OpenAPI

````yaml get /v1/ledgers
openapi: 3.0.0
info:
  title: Ledgers API
  version: 1.0.0
  description: API for managing accounting ledgers and entries
servers: []
security:
  - bearerAuth: []
tags:
  - name: Ledgers
    description: Ledger management operations
paths:
  /v1/ledgers:
    get:
      tags:
        - Ledgers
      summary: Get all ledgers
      description: Retrieve all ledgers accessible to the user
      operationId: getAllLedgers
      parameters:
        - name: type
          in: query
          schema:
            type: string
            enum:
              - asset
              - liability
              - equity
              - income
              - expense
          description: Filter by ledger type
        - name: currency_code
          in: query
          schema:
            type: string
            minLength: 3
            maxLength: 3
          description: Filter by currency code
        - name: active
          in: query
          schema:
            type: boolean
          description: Filter by active status
      responses:
        '200':
          description: Successfully retrieved ledgers
          content:
            application/json:
              schema:
                type: object
                properties:
                  ledgers:
                    type: array
                    items:
                      $ref: '#/components/schemas/LedgerResponse'
                  total_count:
                    type: integer
                    description: Total number of ledgers
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal server error
components:
  schemas:
    LedgerResponse:
      type: object
      properties:
        ledger:
          type: object
          properties:
            id:
              type: string
              format: uuid
            code:
              type: string
            description:
              type: string
            type:
              type: string
              enum:
                - asset
                - liability
                - equity
                - income
                - expense
            currency_id:
              type: string
              format: uuid
            currency_code:
              type: string
            balance_current:
              type: integer
              description: Amount in cents
            balance_available:
              type: integer
              description: Amount in cents
            overdraft_enabled:
              type: boolean
            overdraft_limit:
              type: integer
              description: Amount in cents
            last_activity_date:
              type: string
              format: date-time
            opening_date:
              type: string
              format: date-time
            closing_date:
              type: string
              format: date-time
              nullable: true
            parent_ledger_id:
              type: string
              format: uuid
              nullable: true
            child_ledger_ids:
              type: array
              items:
                type: string
                format: uuid
            created_at:
              type: string
              format: date-time
            created_by:
              type: string
              format: uuid
            modified_at:
              type: string
              format: date-time
            modified_by:
              type: string
              format: uuid
            active:
              type: boolean
            metadata:
              type: object
              nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````