> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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: 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
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - 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.
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementParserError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
    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

````