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

# Fetch AR aging report

> Returns an accounts receivable aging report showing outstanding invoices grouped by customer and aging buckets. This report helps track overdue payments and manage cash flow.



## OpenAPI

````yaml get /v1/businesses/{businessId}/invoices/ar-aging
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/invoices/ar-aging:
    get:
      tags: []
      summary: Fetch AR aging report
      description: >-
        Returns an accounts receivable aging report showing outstanding invoices
        grouped by customer and aging buckets. This report helps track overdue
        payments and manage cash flow.
      operationId: business.invoices.ar-aging.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the AR aging report for
          required: true
          schema:
            type: string
            format: uuid
        - name: effective_date
          in: query
          description: >-
            The date to calculate aging from. Invoices are aged based on their
            due date relative to this date. Defaults to today if not specified.
            ISO 8601 date format.
          schema:
            type: string
            format: date-time
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json
          schema:
            type: string
      responses:
        '200':
          description: AR aging report retrieved successfully
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ARAgingReport'
        '404':
          description: Business not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ARAgingReport:
      type: object
      description: >-
        AR Aging report showing outstanding invoices grouped by customer and
        aging buckets
      properties:
        type:
          type: string
          enum:
            - AR_Aging_Report
          description: Type identifier for this response
        start_date:
          type: string
          format: date-time
          nullable: true
          description: Start date of the report period
        end_date:
          type: string
          format: date-time
          nullable: true
          description: End date of the report period
        basis:
          $ref: '#/components/schemas/ReportingBasis'
          description: Accounting basis used for the report
        as_of_date:
          type: string
          format: date-time
          nullable: true
          description: The effective date used to calculate aging buckets
        customers:
          type: array
          items:
            $ref: '#/components/schemas/CustomerARSummary'
          description: List of customers with their AR aging details
        totals:
          $ref: '#/components/schemas/ARAgingTotals'
          description: Total amounts across all customers and aging buckets
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
    ReportingBasis:
      type: string
      enum:
        - ACCRUAL
        - CASH
    CustomerARSummary:
      type: object
      description: AR aging summary for a specific customer
      properties:
        customer_id:
          type: string
          format: uuid
          description: Unique identifier for the customer
        customer_name:
          type: string
          description: Name of the customer
        current:
          type: array
          items:
            $ref: '#/components/schemas/ARAgingInvoice'
          description: Invoices that are not yet past due
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/ARAgingBucket'
          description: Aging buckets containing past due invoices
        total_outstanding_balance:
          type: integer
          format: int64
          description: Total outstanding balance for this customer in cents
    ARAgingTotals:
      type: object
      description: Total amounts across all aging buckets
      properties:
        current_total:
          type: integer
          format: int64
          description: Total amount of invoices that are not yet past due in cents
        bucket_totals:
          type: array
          items:
            $ref: '#/components/schemas/ARAgingBucketTotal'
          description: Totals for each aging bucket
        grand_total:
          type: integer
          format: int64
          description: Total outstanding balance across all invoices in cents
    ARAgingInvoice:
      type: object
      description: Invoice details within an AR aging context
      properties:
        invoice_id:
          type: string
          format: uuid
          description: Unique identifier for the invoice
        customer_name:
          type: string
          description: Name of the customer associated with this invoice
        due_at:
          type: string
          format: date-time
          nullable: true
          description: Due date of the invoice
        invoice_total:
          type: integer
          format: int64
          description: Total amount of the invoice in cents
        outstanding_balance:
          type: integer
          format: int64
          description: Remaining unpaid balance on the invoice in cents
    ARAgingBucket:
      type: object
      description: >-
        An aging bucket containing invoices within a specific days-past-due
        range
      properties:
        bucket_start_day:
          type: integer
          nullable: true
          description: >-
            Start day of the aging bucket (e.g., 1 for 1-30 days). Null for
            current/not-yet-due invoices.
        bucket_end_day:
          type: integer
          nullable: true
          description: >-
            End day of the aging bucket (e.g., 30 for 1-30 days). Null for
            open-ended buckets (e.g., 90+ days).
        invoices:
          type: array
          items:
            $ref: '#/components/schemas/ARAgingInvoice'
          description: Invoices within this aging bucket
    ARAgingBucketTotal:
      type: object
      description: Total for a specific aging bucket
      properties:
        bucket_start_day:
          type: integer
          nullable: true
          description: Start day of the aging bucket
        bucket_end_day:
          type: integer
          nullable: true
          description: End day of the aging bucket
        total:
          type: integer
          format: int64
          description: Total outstanding balance for this bucket in cents
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````