Documentation Index Fetch the complete documentation index at: https://help.daylit.com/llms.txt
Use this file to discover all available pages before exploring further.
The analytics API gives you structured access to your company’s accounts receivable aging data and cash flow projections. Use the aging endpoints to understand the current state of your receivables book and track how it changes over time. Use the cash flow forecast endpoint to visualize expected inflows by week, comparing due-date expectations against AI-predicted payment dates.
AR aging summary
GET /api/companies/{company_id}/ar-aging/summary
Returns an aggregated summary of open receivables bucketed by aging period (current, 1–30, 31–60, 61–90, 90+ days past due).
curl --request GET \
--url "https://your-instance.com/api/companies/{company_id}/ar-aging/summary" \
--header "Authorization: Token {token}"
AR aging details
GET /api/companies/{company_id}/ar-aging/details
Returns invoice-level AR aging data, giving you visibility into individual open balances and their aging buckets.
curl --request GET \
--url "https://your-instance.com/api/companies/{company_id}/ar-aging/details" \
--header "Authorization: Token {token}"
AR aging history
GET /api/companies/{company_id}/ar-aging/history
Returns a time series of AR aging snapshots for the company, allowing you to track how your receivables book has changed over time.
curl --request GET \
--url "https://your-instance.com/api/companies/{company_id}/ar-aging/history" \
--header "Authorization: Token {token}"
Available aging dates
GET /api/companies/{company_id}/ar-aging/available-dates
Returns the list of snapshot dates for which aging data is available. Use these dates to request a specific historical snapshot from the report endpoints.
AR aging report summary
GET /api/companies/{company_id}/ar-aging/report-summary
Returns a formatted aging report summary for the company, suitable for rendering a point-in-time AR aging report view.
Export aging report
POST /api/companies/{company_id}/ar-aging/report-export
Generates and exports an AR aging report. The response includes a downloadable report file or a link to one.
curl --request POST \
--url "https://your-instance.com/api/companies/{company_id}/ar-aging/report-export" \
--header "Authorization: Token {token}"
Cash flow forecast
GET /api/companies/{company_id}/analytics/cashflow-forecast
Returns a multi-week cash flow forecast that compares invoice inflows by due date against AI-predicted payment dates, alongside a trailing 6-month weekly average. The forecast window always starts from the next Monday relative to the request date.
Number of weeks to forecast. Clamped between 1 and 26.
ISO date (YYYY-MM-DD) to use as the reference date. Defaults to today. You can also pass this as request_date.
Response
The reference date used to anchor the forecast.
Label for the sidebar table ("Customer Cash Inflows").
Chart metadata for rendering. Metadata for each data series. Series key used to reference data in time_series.
Human-readable series name.
Hex color for the series.
Background fill hex color (bar charts only).
Week definitions for the forecast window. Number of forecast weeks.
Display label (e.g. W1 06/02–06/08).
ISO date for the week start (Monday).
ISO date for the week end (Sunday).
Arrays of values aligned to the weeks in calendar.weeks. X-axis labels (one per week).
Invoice balances bucketed by due date (one float per week).
model_predicted_cash_inflows
Invoice balances bucketed by AI-predicted payment date, falling back to due date when no prediction exists (one float per week).
trailing_6m_avg_weekly_inflows
Trailing 6-month average weekly inflow repeated for each week (one float per week).
Per-customer cash flow breakdown, sorted by total predicted inflow descending. Only customers with activity in the forecast window are included. weekly_due_date_cash_inflows
Due-date inflows per week (one float per week).
weekly_model_predicted_cash_inflows
Predicted inflows per week (one float per week).
total_due_date_cash_inflows_13w
Sum of due-date inflows across the forecast window.
total_model_predicted_cash_inflows_13w
Sum of predicted inflows across the forecast window.
table_inflows_by_customer
Table-formatted view of predicted inflows by customer. Column headers: customer_name followed by weekly labels.
One row per customer with customer_id, customer_name, weekly_model_predicted_cash_inflows, and total_model_predicted_cash_inflows_13w.
curl --request GET \
--url "https://your-instance.com/api/companies/{company_id}/analytics/cashflow-forecast?weeks=13&start_date=2026-05-12" \
--header "Authorization: Token {token}"
Example response (truncated)
{
"request_date" : "2026-05-12" ,
"sidebar_label" : "Customer Cash Inflows" ,
"chart" : {
"title" : "13-Week Customer Cash Inflows Forecast" ,
"x_axis_label" : "Week" ,
"y_axis_label" : "Cash inflows (base currency)" ,
"series_meta" : [
{
"key" : "due_date_cash_inflows" ,
"label" : "Invoice inflows by due date" ,
"type" : "bar" ,
"color" : "#1BAC64" ,
"color_background" : "#DDF5EC"
},
{
"key" : "model_predicted_cash_inflows" ,
"label" : "Invoice inflows by predicted date" ,
"type" : "bar" ,
"color" : "#DC583A" ,
"color_background" : "#FBEAE4"
},
{
"key" : "trailing_6m_avg_weekly_inflows" ,
"label" : "Trailing 6-month avg weekly inflow" ,
"type" : "line" ,
"color" : "#1B172B"
}
]
},
"calendar" : {
"week_start_day" : "MONDAY" ,
"num_weeks" : 13 ,
"weeks" : [
{
"week_index" : 1 ,
"code" : "W1" ,
"label" : "W1 05/18–05/24" ,
"start_date" : "2026-05-18" ,
"end_date" : "2026-05-24"
}
]
},
"time_series" : {
"x" : [ "W1 05/18–05/24" ],
"due_date_cash_inflows" : [ 48200.00 ],
"model_predicted_cash_inflows" : [ 41500.00 ],
"trailing_6m_avg_weekly_inflows" : [ 35000.00 ]
}
}