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

# Get accounts receivable aging summary

> Returns the organization-wide receivables position as of now: total open balance, the past-due portion, invoice counts, and a breakdown by days past due. Unlike the other insights endpoints this is a point-in-time snapshot rather than a period aggregate, so it takes no date range. Amounts from every currency are converted into the organization's base currency.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json get /insights/ar-aging
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Integrations
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Tax
  - name: Wallet Grants
  - name: Wallets
paths:
  /insights/ar-aging:
    get:
      tags:
        - Insights
      summary: Get accounts receivable aging summary
      description: >-
        Returns the organization-wide receivables position as of now: total open
        balance, the past-due portion, invoice counts, and a breakdown by days
        past due. Unlike the other insights endpoints this is a point-in-time
        snapshot rather than a period aggregate, so it takes no date range.
        Amounts from every currency are converted into the organization's base
        currency.
      operationId: get-ar-aging
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ARAgingSummaryResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    ARAgingSummaryResponse:
      properties:
        avg_balance_per_open_invoice:
          description: Mean unpaid balance per open invoice
          example: '2800.00'
          type: string
        avg_days_overdue:
          description: >-
            Invoice-weighted mean days past due, to one decimal place. Omitted
            when nothing is overdue.
          example: '22.4'
          nullable: true
          type: string
        avg_days_to_pay:
          description: >-
            Invoice-weighted mean days from issue to payment, to one decimal
            place. Omitted when there is no paid history.
          example: '29.1'
          nullable: true
          type: string
        buckets:
          allOf:
            - $ref: '#/components/schemas/ARAgingBuckets'
          description: >-
            Open balance split by days past due. The buckets sum to
            total_open_balance.
        currency:
          description: Organization base currency that all amounts are converted to
          example: USD
          type: string
        open_invoice_count:
          description: Number of issued or overdue invoices
          example: 150
          format: int64
          type: integer
        overdue_balance:
          description: >-
            Past-due portion of total_open_balance. Equals the sum of every
            bucket except current.
          example: '85000.00'
          type: string
        overdue_invoice_count:
          description: Number of invoices past their due date
          example: 31
          format: int64
          type: integer
        total_open_balance:
          description: Total unpaid balance across all open invoices
          example: '420000.00'
          type: string
      required:
        - avg_balance_per_open_invoice
        - buckets
        - currency
        - open_invoice_count
        - overdue_balance
        - overdue_invoice_count
        - total_open_balance
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
    ARAgingBuckets:
      properties:
        current:
          description: Balance not yet due
          example: '14000.00'
          type: string
        days_1_to_30:
          description: Balance 1–30 days past due
          example: '9500.00'
          type: string
        days_31_to_60:
          description: Balance 31–60 days past due
          example: '6000.00'
          type: string
        days_61_to_90:
          description: Balance 61–90 days past due
          example: '2500.00'
          type: string
        days_90_plus:
          description: Balance more than 90 days past due
          example: '1000.00'
          type: string
      required:
        - current
        - days_1_to_30
        - days_31_to_60
        - days_61_to_90
        - days_90_plus
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````