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

# List accounting rules

> Retrieve existing accounting rules with optional filtering.



## OpenAPI

````yaml get /v1/accounting/rules
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/rules:
    get:
      tags:
        - Accounting
      summary: List accounting rules
      description: Retrieve existing accounting rules with optional filtering.
      operationId: listAccountingRules
      parameters:
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            maximum: 100
            default: 50
          required: false
          name: take
          in: query
        - schema:
            type:
              - number
              - 'null'
            minimum: 0
            default: 0
          required: false
          name: skip
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__not
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__isNull
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__isNotNull
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__equals
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__contains
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: ledger_id__endWith
          in: query
        - schema:
            type: string
          required: false
          name: category
          in: query
        - schema:
            type: string
          required: false
          name: category__not
          in: query
        - schema:
            type: string
          required: false
          name: category__isNull
          in: query
        - schema:
            type: string
          required: false
          name: category__isNotNull
          in: query
        - schema:
            type: string
          required: false
          name: category__equals
          in: query
        - schema:
            type: string
          required: false
          name: category__contains
          in: query
        - schema:
            type: string
          required: false
          name: category__startsWith
          in: query
        - schema:
            type: string
          required: false
          name: category__endWith
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountingRule'
      security:
        - bearer: []
components:
  schemas:
    PaginatedAccountingRule:
      type: object
      properties:
        meta:
          type: object
          properties:
            total:
              type: number
              description: Total of existing items.
              example: 1
            taken:
              type: number
              description: Number of items returned.
              example: 1
            skipped:
              type: number
              description: Number of items skipped.
              example: 0
          required:
            - total
            - taken
            - skipped
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccountingRule'
          description: List of AccountingRule.
      required:
        - meta
        - data
    AccountingRule:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the accounting rule.
          example: arl_abc123def456
        code:
          type: string
          description: Auto-generated rule code (e.g. R-001).
          example: R-001
        name:
          type:
            - string
            - 'null'
          description: Optional user-defined name for the rule.
          example: Recurring subscriptions
        ledger_id:
          type: string
          description: Identifier of the ledger this rule belongs to.
          example: led_abc123def456
        category:
          type:
            - string
            - 'null'
          description: Rule category (e.g. accounting_software, invoice_posted).
          example: accounting_software
        priority:
          type: number
          description: Override order. Higher priority wins when multiple rules match.
          example: 100
        product_ids:
          type: array
          items:
            type: string
          description: Product IDs to match. Empty means match all.
        product_types:
          type: array
          items:
            type: string
          description: >-
            Product types to match. Allowed values: flat_fee, dynamic, seat,
            credit. Empty means match all.
        customer_ids:
          type: array
          items:
            type: string
          description: Customer IDs for customer-specific overrides.
        currencies:
          type: array
          items:
            type: string
          description: Currency codes to match (e.g. EUR, USD).
        countries:
          type: array
          items:
            type: string
          description: Country codes for jurisdiction-based overrides.
        coupon_ids:
          type: array
          items:
            type: string
          description: Coupon IDs to match. Empty means match all.
        client_provider_ids:
          type: array
          items:
            type: string
          description: Client provider IDs to match. Empty means match all.
        payment_method_types:
          type: array
          items:
            type: string
          description: Payment method types to match. Empty means match all.
        interval_period:
          type:
            - string
            - 'null'
          description: Billing interval period filter (month, year, etc.).
        interval_count:
          type:
            - number
            - 'null'
          description: Billing interval count filter.
        revenue_ledger_account_id:
          type:
            - string
            - 'null'
          description: Revenue ledger account ID.
        revenue_ledger_account:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            code:
              type: string
            name:
              type: string
            client_provider_id:
              type:
                - string
                - 'null'
            provider:
              type:
                - object
                - 'null'
              properties:
                name:
                  type: string
              required:
                - name
          required:
            - id
            - code
            - name
            - client_provider_id
            - provider
        deferred_revenue_ledger_account_id:
          type:
            - string
            - 'null'
        deferred_discount_ledger_account_id:
          type:
            - string
            - 'null'
        contra_revenue_ledger_account_id:
          type:
            - string
            - 'null'
        discount_ledger_account_id:
          type:
            - string
            - 'null'
        ar_ledger_account_id:
          type:
            - string
            - 'null'
        cash_ledger_account_id:
          type:
            - string
            - 'null'
        payments_clearing_ledger_account_id:
          type:
            - string
            - 'null'
        output_tax_ledger_account_id:
          type:
            - string
            - 'null'
        bad_debt_expense_ledger_account_id:
          type:
            - string
            - 'null'
        customer_credits_ledger_account_id:
          type:
            - string
            - 'null'
        journal_id:
          type:
            - string
            - 'null'
        entity_type:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date
          description: Timestamp when the rule was created.
        updated_at:
          type: string
          format: date
          description: Timestamp when the rule was last updated.
      required:
        - id
        - code
        - name
        - ledger_id
        - category
        - priority
        - product_ids
        - product_types
        - customer_ids
        - currencies
        - countries
        - coupon_ids
        - client_provider_ids
        - payment_method_types
        - interval_period
        - interval_count
        - revenue_ledger_account_id
        - deferred_revenue_ledger_account_id
        - deferred_discount_ledger_account_id
        - contra_revenue_ledger_account_id
        - discount_ledger_account_id
        - ar_ledger_account_id
        - cash_ledger_account_id
        - payments_clearing_ledger_account_id
        - output_tax_ledger_account_id
        - bad_debt_expense_ledger_account_id
        - customer_credits_ledger_account_id
        - journal_id
        - entity_type
        - created_at
        - updated_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````