> ## 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 AP aging report

> Returns an accounts payable aging report showing outstanding bills grouped by vendor and aging buckets.



## OpenAPI

````yaml get /v1/businesses/{businessId}/reports/unified/ap-aging
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/reports/unified/ap-aging:
    get:
      tags: []
      summary: Fetch AP aging report
      description: >-
        Returns an accounts payable aging report showing outstanding bills
        grouped by vendor and aging buckets.
      operationId: business.reports.unified.ap-aging.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the AP 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
        - name: tag_filter
          in: query
          description: Filter results by tags.
          schema:
            type: string
      responses:
        '200':
          description: AP aging report retrieved successfully.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiUnifiedReport'
        '404':
          description: Business not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiUnifiedReport:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be 'Unified_Report'.
          example: Unified_Report
        business_id:
          type: string
          format: uuid
          description: The UUID of the business this report belongs to.
        columns:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedReportColumn'
          description: >-
            The column headers for the report. Columns can be nested to
            represent hierarchical dimensions (e.g., Location > Month).
        rows:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedReportRow'
          description: >-
            The data rows for the report. Rows can be nested to represent
            hierarchical account structures.
      description: >-
        A unified report structure that supports hierarchical columns and rows.
        Used for balance sheets, cashflow statements, profit & loss reports, and
        aging reports with flexible dimensional breakdowns.
    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
    UnifiedReportColumn:
      type: object
      properties:
        column_key:
          type: string
          description: >-
            Unique identifier for this column. Used as the key in row cell
            mappings.
          example: amount
        display_name:
          type: string
          description: Human-readable name for the column header.
          example: Amount
        columns:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedReportColumn'
          description: >-
            Nested child columns. When present, this column acts as a group
            header.
      description: >-
        A column header in a unified report. Supports nesting for
        multi-dimensional reports.
    UnifiedReportRow:
      type: object
      properties:
        row_key:
          type: string
          description: Unique identifier for this row.
          example: revenue
        display_name:
          type: string
          description: Human-readable name for the row (e.g., account name, category name).
          example: Revenue
        cells:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/UnifiedReportCell'
          description: >-
            Cell values keyed by column_key. Each entry maps a column to its
            cell value for this row.
        rows:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedReportRow'
          description: >-
            Nested child rows. Used for hierarchical account structures (e.g.,
            parent accounts with sub-accounts).
      description: >-
        A data row in a unified report. Supports nesting for hierarchical data
        structures.
    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
    UnifiedReportCell:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/UnifiedCellValue'
          description: The cell's value, which can be an amount or empty.
      description: A single cell value in a unified report row.
    UnifiedCellValue:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - Amount
              description: Indicates this is an amount value.
            value:
              type: integer
              format: int64
              description: The amount in cents (e.g., 10000 = $100.00).
          required:
            - type
            - value
          example:
            type: Amount
            value: 10000
        - type: object
          properties:
            type:
              type: string
              enum:
                - Empty
              description: Indicates this cell has no value.
          required:
            - type
          example:
            type: Empty
      description: >-
        The value of a cell in a unified report. Can be either an Amount (with
        value in cents) or Empty.
      example:
        type: Amount
        value: 10000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````