Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
invoices
/
ar-aging
Fetch AR aging report
curl --request GET \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/invoices/ar-aging \
  --header 'Authorization: Bearer <token>'
{
  "type": "AR_Aging_Report",
  "start_date": "2023-11-07T05:31:56Z",
  "end_date": "2023-11-07T05:31:56Z",
  "basis": "ACCRUAL",
  "as_of_date": "2023-11-07T05:31:56Z",
  "customers": [
    {
      "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customer_name": "<string>",
      "current": [
        {
          "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "customer_name": "<string>",
          "due_at": "2023-11-07T05:31:56Z",
          "invoice_total": 123,
          "outstanding_balance": 123
        }
      ],
      "buckets": [
        {
          "bucket_start_day": 123,
          "bucket_end_day": 123,
          "invoices": [
            {
              "invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "customer_name": "<string>",
              "due_at": "2023-11-07T05:31:56Z",
              "invoice_total": 123,
              "outstanding_balance": 123
            }
          ]
        }
      ],
      "total_outstanding_balance": 123
    }
  ],
  "totals": {
    "current_total": 123,
    "bucket_totals": [
      {
        "bucket_start_day": 123,
        "bucket_end_day": 123,
        "total": 123
      }
    ],
    "grand_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 report 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 report retrieved successfully

AR Aging report showing outstanding invoices grouped by customer and aging buckets

type
enum<string>

Type identifier for this response

Available options:
AR_Aging_Report
start_date
string<date-time> | null

Start date of the report period

end_date
string<date-time> | null

End date of the report period

basis
enum<string>

Accounting basis used for the report

Available options:
ACCRUAL,
CASH
as_of_date
string<date-time> | null

The effective date used to calculate aging buckets

customers
object[]

List of customers with their AR aging details

totals
object

Total amounts across all customers and aging buckets