#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
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date | Date (ISO) | Yes | Start date of the analysis period (e.g., 2024-01-01). |
end_date | Date (ISO) | Yes | End date of the analysis period. |
frequency | String | No | Granularity of data points. Options: daily, weekly, monthly. |
2. Filters
| Parameter | Type | Description |
|---|---|---|
partner_ids | String (CSV) | Filter by specific Partner IDs. |
rep_ids | String (CSV) | Filter by specific Sales Rep (User) IDs. |
merchant_ids | String (CSV) | Filter by specific Merchant IDs. |
statuses | String (CSV) | Filter by internal merchant statuses (e.g., lead, active, churned). |
external_statuses | String (CSV) | Filter by external/processor statuses (e.g., Underwriting, Approved). |
sectors | String (CSV) | Filter by business sectors (e.g., Retail, Restaurant). |
3. Group By (Optional)
| Parameter | Type | Description | |----------
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets