Query Metric Value
/api/v1/data/metrics/query
Token needs the read ability.
About tokens
Retrieves a single aggregated value (summed or averaged) for a metric over a date range. With location_id, the caller must have access to that location; without it, the value aggregates across all tenant locations and the token must be franchisor-scoped. Requires the read ability.
Competition metrics (competition:*) are point-in-time standings rather than range aggregates: the value is the cumulative standing as of end_on (clamped to the competition's end date), and aggregation_method is point_in_time. A network query rolls standings up per the metric's configured summability — summed for common-unit values (e.g. dollars raised), averaged for per-location rates. The competition resolved is the latest started, rankable competition for the metric whose window overlaps the requested range; value is null when no such competition overlaps the range or it has no data yet, and the response names the resolved competition and its window in a competition block so the figure stays attributable. Note this differs from Get Leaderboard, which always ranks the latest competition for the metric regardless of the requested period — for a historical range the two endpoints can resolve different competitions.
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 value to a single location.
Responses
-
-
dataMetricQueryResultA single aggregated metric value; value and aggregation_method are null when there is no data.-
valuenumber required nullable -
aggregation_methodstring required nullablesumaveragepoint_in_time -
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/query?metric=string&start_on=2026-11-12&end_on=2026-11-12" \
-H "Authorization: Bearer $FRANCHISESEE_TOKEN" \
-H "Accept: application/json"
{
"data": {
"value": 184250.37,
"aggregation_method": "sum",
"competition": {
"id": "d4f6a8c0-2e5b-4c7d-9f1a-6b3e8d0c2a54",
"name": "Summer Smoothie Challenge",
"starts_on": "2026-06-01",
"ends_on": "2026-08-31"
}
}
}