Skip to main content

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).
company_id
string
required
UUID of the company.
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.
company_id
string
required
UUID of the company.
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.
company_id
string
required
UUID of the company.
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.
company_id
string
required
UUID of the company.

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.
company_id
string
required
UUID of the company.

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.
company_id
string
required
UUID of the company.
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.
company_id
string
required
UUID of the company.
weeks
integer
default:"13"
Number of weeks to forecast. Clamped between 1 and 26.
start_date
string
ISO date (YYYY-MM-DD) to use as the reference date. Defaults to today. You can also pass this as request_date.

Response

request_date
string
The reference date used to anchor the forecast.
sidebar_label
string
Label for the sidebar table ("Customer Cash Inflows").
chart
object
Chart metadata for rendering.
calendar
object
Week definitions for the forecast window.
time_series
object
Arrays of values aligned to the weeks in calendar.weeks.
customers
array
Per-customer cash flow breakdown, sorted by total predicted inflow descending. Only customers with activity in the forecast window are included.
table_inflows_by_customer
object
Table-formatted view of predicted inflows by customer.
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]
  }
}