> ## 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 detail for a customer

> Returns detailed accounts receivable aging information for a specific customer, including outstanding balances broken down by aging buckets (current, 1-30 days, 31-60 days, 61-90 days, 91+ days).



## OpenAPI

````yaml get /v1/businesses/{businessId}/invoices/ar-aging/customer/{customerId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/invoices/ar-aging/customer/{customerId}:
    get:
      tags: []
      summary: Fetch AR aging detail for a customer
      description: >-
        Returns detailed accounts receivable aging information for a specific
        customer, including outstanding balances broken down by aging buckets
        (current, 1-30 days, 31-60 days, 61-90 days, 91+ days).
      operationId: business.invoices.ar-aging.customer.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the AR aging detail for
          required: true
          schema:
            type: string
            format: uuid
        - name: customerId
          in: path
          description: The UUID of the customer to fetch AR aging detail 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 customer detail retrieved successfully
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ARAgingCustomerDetailResponse'
        '404':
          description: Business or customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ARAgingCustomerDetailResponse:
      type: object
      description: Detailed AR aging information for a specific customer
      properties:
        type:
          type: string
          enum:
            - AR_Aging_Customer_Detail
          description: Type identifier for this response
        as_of_date:
          type: string
          format: date-time
          nullable: true
          description: The effective date used to calculate aging buckets
        customer:
          $ref: '#/components/schemas/ApiCustomerData'
          description: The customer details
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/ARAgingCustomerDetailBucket'
          description: Detailed breakdown of outstanding balances by aging bucket
        current:
          type: integer
          format: int64
          description: Total outstanding balance for invoices not yet past due in cents
        days_1_30:
          type: integer
          format: int64
          description: Total outstanding balance for invoices 1-30 days past due in cents
        days_31_60:
          type: integer
          format: int64
          description: Total outstanding balance for invoices 31-60 days past due in cents
        days_61_90:
          type: integer
          format: int64
          description: Total outstanding balance for invoices 61-90 days past due in cents
        days_91_over:
          type: integer
          format: int64
          description: Total outstanding balance for invoices 91+ days past due in cents
        total:
          type: integer
          format: int64
          description: Total outstanding balance across all aging buckets in cents
    ApiError:
      type: object
      properties: {}
      example: ''
      description: ''
    ApiCustomerData:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the customer.
        external_id:
          type: string
          description: >-
            Unique ID of the customer in your system for linking purposes.
            **Idempotency key**.
          example: '31415926535'
        individual_name:
          type: string
          nullable: true
          description: >-
            Full name of the individual customer or contact at a corporate
            customer.
        company_name:
          type: string
          nullable: true
          description: Name of the company customer.
        email:
          type: string
          nullable: true
          description: Email address of the customer.
        mobile_phone:
          type: string
          nullable: true
          description: Mobile phone number of the customer.
        office_phone:
          type: string
          nullable: true
          description: Office phone number of the customer.
        address_string:
          type: string
          nullable: true
          description: Address of the customer.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the customer (for
            example, to display to end users).
        status:
          type: string
          description: 'Status of the customer. Possible values: `ACTIVE`, `ARCHIVED`.'
          example: ACTIVE
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
    ARAgingCustomerDetailBucket:
      type: object
      description: A bucket containing outstanding balance for a specific aging period
      properties:
        start_day_number:
          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.
        end_day_number:
          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., 91+ days).
        outstanding_value:
          type: integer
          format: int64
          description: Outstanding balance for this aging bucket in cents
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag
        key:
          type: string
          description: Key for the tag
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension
        value:
          type: string
          description: Value for the tag
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````