Query Metric Trendline
/api/v1/data/metrics/trendline
Token needs the read ability.
About tokens
Retrieves a day-by-day series of aggregated values for a metric over a date range. Same access rules as Query Metric Value. Requires the read ability.
For competition metrics (competition:*) the series is a running-total curve, not per-day amounts: each point rolls up the latest known standing, as of that day, of every in-scope location that has one. The series is truncated to the competition's window regardless of the requested range, and carries one point per bucket end — every day by default, the last digested day of each week or month when grouped (grouping is available on the MCP tool, not this endpoint). When the range resolves a standing (the same condition under which Query Metric Value returns a value), the response names the resolved competition and its window in a top-level competition field, alongside data.
Query parameters
-
metricstring requiredMetric key, e.g.net_sales_amount,custom:loyalty_signups, orcompetition:spring_challenge. -
sourceSourcegoogleyelpstore_auditecosuresmgmeazureupdecision_logic -
start_onstring (date) requiredStart of the date range (inclusive), formattedYYYY-MM-DD. -
end_onstring (date) requiredEnd of the date range (inclusive), formattedYYYY-MM-DD. Must be on or after start_on. -
location_idstring (uuid)Location UUID to scope the series to a single location.
Responses
-
-
dataarray of MetricTrendlinePoint-
datestring (date) required -
valuenumber required
-
-
competitionCompetitionAttributionThe competition a served standing was read from. Present only for competition metrics (competition:*) when a value resolved, so the figure stays attributable when more than one competition has run on the metric.-
idstring (uuid) required -
namestring required -
starts_onstring (date) required -
ends_onstring (date) required
-
-
-
-
messagestring
-
-
-
messagestring
-
-
-
messagestring -
errorsobject
-
curl "https://app.franchisesee.com/api/v1/data/metrics/trendline?metric=string&start_on=2026-11-12&end_on=2026-11-12" \
-H "Authorization: Bearer $FRANCHISESEE_TOKEN" \
-H "Accept: application/json"
{
"data": [
{
"date": "2026-06-01",
"value": 6142.18
}
],
"competition": {
"id": "d4f6a8c0-2e5b-4c7d-9f1a-6b3e8d0c2a54",
"name": "Summer Smoothie Challenge",
"starts_on": "2026-06-01",
"ends_on": "2026-08-31"
}
}