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

# Create ledger

> Create an accounting ledger for an invoicing entity.



## OpenAPI

````yaml post /v1/accounting/ledgers
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:
    post:
      tags:
        - Accounting > Ledgers
      summary: Create ledger
      description: Create an accounting ledger for an invoicing entity.
      operationId: createLedger
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                invoicing_entity_id:
                  type: string
                  description: Identifier of the invoicing entity that owns the ledger.
                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
                  enum:
                    - EUR
                    - AED
                    - AFN
                    - XCD
                    - ALL
                    - AMD
                    - AOA
                    - ARS
                    - USD
                    - AUD
                    - AWG
                    - AZN
                    - BAM
                    - BBD
                    - BDT
                    - BGN
                    - BHD
                    - BIF
                    - XOF
                    - BMD
                    - BND
                    - BOB
                    - BRL
                    - BSD
                    - BTN
                    - NOK
                    - BWP
                    - BYR
                    - BZD
                    - CAD
                    - CDF
                    - XAF
                    - CHF
                    - NZD
                    - CLP
                    - CNY
                    - COP
                    - CRC
                    - CUP
                    - CVE
                    - ANG
                    - CZK
                    - DJF
                    - DKK
                    - DOP
                    - DZD
                    - EGP
                    - MAD
                    - ERN
                    - ETB
                    - FJD
                    - FKP
                    - GBP
                    - GEL
                    - GHS
                    - GIP
                    - GMD
                    - GNF
                    - GTQ
                    - GYD
                    - HKD
                    - HNL
                    - HRK
                    - HTG
                    - HUF
                    - IDR
                    - ILS
                    - INR
                    - IQD
                    - IRR
                    - ISK
                    - JMD
                    - JOD
                    - JPY
                    - KES
                    - KGS
                    - KHR
                    - KMF
                    - KPW
                    - KRW
                    - KWD
                    - KYD
                    - KZT
                    - LAK
                    - LBP
                    - LKR
                    - LRD
                    - LSL
                    - LYD
                    - MDL
                    - MGA
                    - MKD
                    - MMK
                    - MNT
                    - MOP
                    - MRO
                    - MUR
                    - MVR
                    - MWK
                    - MXN
                    - MYR
                    - MZN
                    - NAD
                    - XPF
                    - NGN
                    - NIO
                    - NPR
                    - OMR
                    - PAB
                    - PEN
                    - PGK
                    - PHP
                    - PKR
                    - PLN
                    - PYG
                    - QAR
                    - RON
                    - RSD
                    - RUB
                    - RWF
                    - SAR
                    - SBD
                    - SCR
                    - SDG
                    - SEK
                    - SGD
                    - SHP
                    - SLL
                    - SOS
                    - SRD
                    - SSP
                    - STD
                    - SYP
                    - SZL
                    - THB
                    - TJS
                    - TMT
                    - TND
                    - TOP
                    - TRY
                    - TTD
                    - TWD
                    - TZS
                    - UAH
                    - UGX
                    - UYU
                    - UZS
                    - VEF
                    - VND
                    - VUV
                    - WST
                    - YER
                    - ZAR
                    - ZMW
                    - ZWL
                  description: ISO 4217 currency used by the ledger.
                  example: EUR
                fiscal_year_end_month:
                  type: integer
                  minimum: 1
                  maximum: 12
                  description: >-
                    Last month of the ledger's fiscal year, from 1 (January) to
                    12 (December). Reports split profit between past fiscal
                    years and the current one from it. Defaults to 12. It cannot
                    be changed after creation.
                  example: 12
                entry_number_pattern:
                  type: string
                  description: Entry numbering pattern containing `{number}`.
                is_primary:
                  type:
                    - boolean
                    - 'null'
                  description: Whether this is the primary ledger for the invoicing entity.
                is_inactive:
                  type:
                    - boolean
                    - 'null'
                  description: Whether the ledger is inactive.
              required:
                - invoicing_entity_id
                - name
                - code
                - description
                - type
                - currency
                - entry_number_pattern
                - is_primary
                - is_inactive
      responses:
        '201':
          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
          enum:
            - EUR
            - AED
            - AFN
            - XCD
            - ALL
            - AMD
            - AOA
            - ARS
            - USD
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - XOF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - NOK
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - XAF
            - CHF
            - NZD
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CVE
            - ANG
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - MAD
            - ERN
            - ETB
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - XPF
            - NGN
            - NIO
            - NPR
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VEF
            - VND
            - VUV
            - WST
            - YER
            - ZAR
            - ZMW
            - ZWL
          description: ISO 4217 ledger currency.
          example: EUR
        fiscal_year_end_month:
          type: integer
          minimum: 1
          maximum: 12
          description: >-
            Last month of the ledger's fiscal year, from 1 (January) to 12
            (December). Reports split profit between past fiscal years and the
            current one from it.
          example: 12
        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.
        closed_through_date:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Last day of the last closed month, formatted YYYY-MM-DD. No entry
            can be dated on or before the end of that day in the invoicing
            entity timezone. Null when no month is closed.
          example: '2026-09-30'
        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
        - fiscal_year_end_month
        - entry_number_pattern
        - next_entry_number
        - is_primary
        - is_inactive
        - closed_through_date
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.