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

# Get ledger accounts for an administration

> Accounting (beta). The accounts Payt books on for an administration that has accounting enabled. An invoice line can name one of them to book its amount on.



## OpenAPI

````yaml /openapi3.json get /v1/ledger_accounts
openapi: 3.0.0
info:
  title: API Endpoints
  description: >-
    This page allows you to explore the available API endpoints. Select a
    resource (e.g. debtors) and an endpoint (e.g. /v1/debtors) to inspect an
    example response and available parameters. An authorization header
    containing a Bearer token is required, see
    [Authentication](/authentication/authorization).
  version: 1.0.0
servers:
  - url: https://api.paytsoftware.com
    description: Production
  - url: https://demo-api.paytsoftware.com
    description: Demo / testing
security:
  - bearerAuth: []
tags:
  - name: administrations
    description: Operations about administrations
  - name: companies
    description: Operations about companies
  - name: contacts
    description: Operations about contacts
  - name: credit_cases
    description: Operations about credit_cases
  - name: debtors
    description: Operations about debtors
  - name: files
    description: Operations about files
  - name: health_care
    description: Operations about health_cares
  - name: orders
    description: Operations about orders
  - name: order_lines
    description: Operations about order_lines
  - name: invoices
    description: Operations about invoices
  - name: labels
    description: Operations about labels
  - name: ledger_accounts
    description: Operations about ledger_accounts
  - name: messages
    description: Operations about messages
  - name: notes
    description: Operations about notes
  - name: notifications
    description: Operations about notifications
  - name: payments
    description: Operations about payments
  - name: payment_conditions
    description: Operations about payment_conditions
  - name: payment_plans
    description: Operations about payment_plans
  - name: psp_mandates
    description: Operations about psp_mandates
  - name: psp_transactions
    description: Operations about psp_transactions
  - name: sign_up
    description: Operations about sign_ups
  - name: tasks
    description: Operations about tasks
  - name: vat_rates
    description: Operations about vat_rates
paths:
  /v1/ledger_accounts:
    get:
      tags:
        - ledger_accounts
      summary: Get ledger accounts for an administration
      description: >-
        Accounting (beta). The accounts Payt books on for an administration that
        has accounting enabled. An invoice line can name one of them to book its
        amount on.
      operationId: getV1LedgerAccounts
      parameters:
        - in: query
          name: administration_id
          description: Administration identifier
          required: true
          schema:
            type: string
        - in: query
          name: fields
          description: >-
            JSON object defining fields to receive (e.g {"only": ["field1",
            {"field2": ["field3"]}]})
          required: false
          schema:
            type: string
        - in: query
          name: cursor
          description: The record identifier after which to start the page
          required: false
          schema:
            type: string
        - in: query
          name: per_page
          description: >-
            How many records will be returned per page, (1..500), defaults to
            100
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 500
            default: 100
      responses:
        '200':
          description: Paginated list of ledger accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_LedgerAccountsPageEntity'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '403':
          description: Access not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
        '422':
          description: Accounting is not enabled for this administration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerApi_ErrorEntity'
components:
  schemas:
    CustomerApi_LedgerAccountsPageEntity:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomerApi_V1_LedgerAccountEntity'
          description: Ledger account
        pagination:
          allOf:
            - $ref: '#/components/schemas/CustomerApi_PaginationEntity'
          description: Pagination details
      required:
        - data
      description: CustomerApi_LedgerAccountsPageEntity model
    CustomerApi_ErrorEntity:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      required:
        - code
        - message
      description: CustomerApi_ErrorEntity model
    CustomerApi_V1_LedgerAccountEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
        code:
          type: string
          description: Account code
        name:
          type: string
          description: Account name
        account_type:
          type: string
          enum:
            - bank
            - outgoing_payments
            - cash
            - pos_payments
            - transfers_in_transit
            - bookkeeping_settlements
            - opening_balances
            - customer_receivables
            - deferred_receivables
            - psp_receivables
            - insurer_receivables
            - accrued_revenue
            - vat_receivables
            - supplier_payables
            - deposit_payables
            - vat_payables
            - deferred_revenue
            - pre_payments
            - unmatched_payments
            - revenue
            - recharges
            - administration_levies
            - interest_levies
            - debt_collection_levies
            - interest_income
            - written_off_credits
            - payment_difference_gains
            - rounding_difference_gains
            - exchange_gains
            - collection_fees
            - psp_costs
            - bank_costs
            - interest_expenses
            - bad_debt
            - payment_difference_losses
            - rounding_difference_losses
            - exchange_losses
          description: >-
            Account type, which determines what Payt books on the account.
            Accounts of type revenue, recharges, deposit_payables can be added.
            An invoice line can book on an account of type revenue, recharges,
            deposit_payables, pre_payments.
        is_default:
          type: boolean
          description: >-
            Whether this is the standard account of its type, which Payt books
            on unless an invoice line names another account
        enabled:
          type: boolean
          description: Whether new invoice lines can choose this account
      required:
        - id
        - code
        - name
        - account_type
        - is_default
        - enabled
      description: CustomerApi_V1_LedgerAccountEntity model
    CustomerApi_PaginationEntity:
      type: object
      properties:
        cursor:
          type: string
          description: Cursor for fetching the next page
      required:
        - cursor
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        OAuth2 access token or static API token. See
        [Authorization](/authentication/authorization) for how to obtain one.

````

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