Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
invoices
/
ar-aging
/
customer
/
{customerId}
Fetch AR aging detail for a customer
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/invoices/ar-aging/customer/{customerId} \
  --header 'Authorization: Bearer <token>'
{
  "type": "AR_Aging_Customer_Detail",
  "as_of_date": "2023-11-07T05:31:56Z",
  "customer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "31415926535",
    "individual_name": "<string>",
    "company_name": "<string>",
    "email": "<string>",
    "mobile_phone": "<string>",
    "office_phone": "<string>",
    "address_string": "<string>",
    "memo": "<string>",
    "status": "ACTIVE",
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "dimension_display_name": "<string>",
        "value": "ExampleTagValue",
        "value_display_name": "<string>",
        "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "archived_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "buckets": [
    {
      "start_day_number": 123,
      "end_day_number": 123,
      "outstanding_value": 123
    }
  ],
  "current": 123,
  "days_1_30": 123,
  "days_31_60": 123,
  "days_61_90": 123,
  "days_91_over": 123,
  "total": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string<uuid>
required

The UUID of the business to fetch the AR aging detail for

customerId
string<uuid>
required

The UUID of the customer to fetch AR aging detail for

Query Parameters

effective_date
string<date-time>

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.

Response

AR aging customer detail retrieved successfully

Detailed AR aging information for a specific customer

type
enum<string>

Type identifier for this response

Available options:
AR_Aging_Customer_Detail
as_of_date
string<date-time> | null

The effective date used to calculate aging buckets

customer
object

The customer details

buckets
object[]

Detailed breakdown of outstanding balances by aging bucket

current
integer

Total outstanding balance for invoices not yet past due in cents

days_1_30
integer

Total outstanding balance for invoices 1-30 days past due in cents

days_31_60
integer

Total outstanding balance for invoices 31-60 days past due in cents

days_61_90
integer

Total outstanding balance for invoices 61-90 days past due in cents

days_91_over
integer

Total outstanding balance for invoices 91+ days past due in cents

total
integer

Total outstanding balance across all aging buckets in cents