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

# Update ledger

> Update an existing accounting ledger.



## OpenAPI

````yaml put /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}:
    put:
      tags:
        - Accounting > Ledgers
      summary: Update ledger
      description: Update an existing accounting ledger.
      operationId: updateLedger
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Display name of the ledger.
                code:
                  type:
                    - string
                    - 'null'
                  description: Optional accounting code of the ledger.
                description:
                  type:
                    - string
                    - 'null'
                  description: Optional description of the ledger.
                type:
                  type: string
                  enum:
                    - IFRS
                    - US_GAAP
                    - FR_GAAP
                    - UK_GAAP
                    - LOCAL_GAAP
                    - MANAGEMENT
                    - CONSOLIDATION
                    - AUDIT_ADJUSTMENT
                  description: Type of ledger.
                currency:
                  type: string
                  description: ISO 4217 currency used by the ledger.
                entry_number_pattern:
                  type: string
                  description: Entry numbering pattern containing `{number}`.
                next_entry_number:
                  type: number
                  description: Next sequence number assigned to an entry.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingLedger'
      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

````