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

# Get ledger

> Retrieve an accounting ledger by its identifier.



## OpenAPI

````yaml get /v1/accounting/ledgers/{id}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/accounting/ledgers/{id}:
    get:
      tags:
        - Accounting > Ledgers
      summary: Get ledger
      description: Retrieve an accounting ledger by its identifier.
      operationId: getLedger
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: Require the ledger to belong to this invoicing entity.
          required: false
          description: Require the ledger to belong to this invoicing entity.
          name: invoicing_entity_id
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingLedger'
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    AccountingLedger:
      type: object
      properties:
        id:
          type: string
          description: Unique ledger identifier.
        name:
          type: string
          description: Display name of the ledger.
        code:
          type:
            - string
            - 'null'
          description: Accounting code of the ledger.
        description:
          type:
            - string
            - 'null'
          description: Optional ledger description.
        type:
          type: string
          enum:
            - IFRS
            - US_GAAP
            - FR_GAAP
            - UK_GAAP
            - LOCAL_GAAP
            - MANAGEMENT
            - CONSOLIDATION
            - AUDIT_ADJUSTMENT
          description: Type of ledger.
        invoicing_entity_id:
          type: string
          description: Owning invoicing entity identifier.
        currency:
          type: string
          description: ISO 4217 ledger currency.
        entry_number_pattern:
          type: string
          description: Pattern used to number journal entries.
        next_entry_number:
          type: number
          description: Next journal-entry sequence number.
        is_primary:
          type:
            - boolean
            - 'null'
          description: Whether this is the entity's primary ledger.
        is_inactive:
          type:
            - boolean
            - 'null'
          description: Whether the ledger is inactive.
        created_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the ledger was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date
          description: Timestamp when the ledger was last updated.
      required:
        - id
        - name
        - code
        - description
        - type
        - invoicing_entity_id
        - currency
        - entry_number_pattern
        - next_entry_number
        - is_primary
        - is_inactive
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````