#853 — Master Trends Endpoint

Repo: Twill-AI/facade State: open | Status: open Assignee: Ahmad1809

Created: 2025-12-23 · Updated: 2026-02-17

Description

We need and API endpoint to support overseeing time-series data for the master dashboard (trends-dashboard.html). It consolidates financial performance (volume, commissions) and growth metrics (merchant counts, user counts) into a single response, supporting flexible filtering, grouping, and granularity.

Endpoint

GET /api/v1/master/trends

Request Parameters

1. Time Range

ParameterTypeRequiredDescription
start_dateDate (ISO)YesStart date of the analysis period (e.g., 2024-01-01).
end_dateDate (ISO)YesEnd date of the analysis period.
frequencyStringNoGranularity of data points. Options: daily, weekly, monthly.

2. Filters

ParameterTypeDescription
partner_idsString (CSV)Filter by specific Partner IDs.
rep_idsString (CSV)Filter by specific Sales Rep (User) IDs.
merchant_idsString (CSV)Filter by specific Merchant IDs.
statusesString (CSV)Filter by internal merchant statuses (e.g., lead, active, churned).
external_statusesString (CSV)Filter by external/processor statuses (e.g., Underwriting, Approved).
sectorsString (CSV)Filter by business sectors (e.g., Retail, Restaurant).

3. Group By (Optional)

| Parameter | Type | Description | |----------

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets