Skip to content
API reference / Metrics & Leaderboards
GET /api/v1/data/leaderboard

Token needs the read ability. About tokens

Retrieves a ranked leaderboard of locations for a single metric over a period. Franchisor-scoped tokens only (franchisee tokens receive 403). Requires the read ability.

Query parameters

  • period Period required
    current yesterday last_week last_month last_90_days last_tenant_period ytd
  • metric string required
    Metric key, e.g. net_sales_amount, custom:loyalty_signups, or competition:spring_challenge. Competition metrics rank locations by their current cumulative standing in the latest competition for that metric; the requested period does not change the competition window.
  • source Source
    google yelp store_audit ecosure smg meazureup decision_logic
  • district_id string (uuid)
  • district_id_2 string (uuid)
  • location_category_id string (uuid)
  • state string

Responses

    • data Leaderboard
      • period string required nullable
      • metric string required nullable
      • source string required nullable
      • starts_on string (date) required nullable
      • ends_on string (date) required nullable
      • num_locations integer required
      • closed_location_count integer required
        How many closed (deactivated) locations total counts beyond the ranked rows. A location that closed during the window still traded in it, so total includes its sales for the days it was open; it never appears in locations, and mean / median describe open locations only. Summing the rows reproduces total only when this is 0.
      • total number required nullable
      • median number required nullable
      • mean number required nullable
      • benchmark_stats object required
        Board-level aggregates of each benchmark window, keyed prior / yoy. The response always carries every comparison the tenant is ready for — there is no parameter to request one — so yoy is absent until the tenant has a year of history, and the map is an empty object when the metric supports no comparison at all.
        • prior LeaderboardBenchmarkStats
          • total number required nullable
          • median number required nullable
          • mean number required nullable
          • location_count integer required
            How many locations these aggregates cover: every location that reported in the benchmark window. This can exceed the number of locations rows carrying a previous_value, since a location that reported only in the benchmark window has no row in the current one, so summing the rows' previous values need not reproduce total. Includes closed_location_count.
          • closed_location_count integer required
            How many of location_count are locations that have since closed. total counts their sales in the benchmark window; mean and median do not.
        • yoy LeaderboardBenchmarkStats
          • total number required nullable
          • median number required nullable
          • mean number required nullable
          • location_count integer required
            How many locations these aggregates cover: every location that reported in the benchmark window. This can exceed the number of locations rows carrying a previous_value, since a location that reported only in the benchmark window has no row in the current one, so summing the rows' previous values need not reproduce total. Includes closed_location_count.
          • closed_location_count integer required
            How many of location_count are locations that have since closed. total counts their sales in the benchmark window; mean and median do not.
      • locations array of LeaderboardLocation required
        • location_id string required
        • name string required
        • value number required nullable
        • rank integer required
        • benchmarks object required
          This location's comparison against each benchmark window, keyed prior / yoy like benchmark_stats. A key is absent when this location has no data in that window; the map is an empty object when no comparison was made.
          • prior LeaderboardBenchmark
          • yoy LeaderboardBenchmark
    • message string
    • message string
curl "https://app.franchisesee.com/api/v1/data/leaderboard?period=current&metric=string" \
  -H "Authorization: Bearer $FRANCHISESEE_TOKEN" \
  -H "Accept: application/json"
Response
{
    "data": {
        "period": "last_week",
        "metric": "net_sales_amount",
        "source": null,
        "starts_on": "2026-11-02",
        "ends_on": "2026-11-08",
        "num_locations": 48,
        "closed_location_count": 0,
        "total": 1268430.55,
        "median": 25890.12,
        "mean": 26425.64,
        "benchmark_stats": {
            "prior": {
                "total": 1221875.1,
                "median": 25102.44,
                "mean": 25455.73,
                "location_count": 48,
                "closed_location_count": 0
            },
            "yoy": {
                "total": 1221875.1,
                "median": 25102.44,
                "mean": 25455.73,
                "location_count": 48,
                "closed_location_count": 0
            }
        },
        "locations": [
            {
                "location_id": "9b1c8f3e-7a2d-4c5b-8e1a-2f3d4c5b6a7e",
                "name": "Downtown Austin",
                "value": 41285.9,
                "rank": 1,
                "benchmarks": {
                    "prior": {
                        "previous_value": 39870.25,
                        "previous_rank": 2,
                        "previous_on": "Oct 26 – Nov 1, 2026",
                        "rank_change": -1,
                        "value_change": 1415.65,
                        "value_change_rate": 0.0355
                    },
                    "yoy": {
                        "previous_value": 39870.25,
                        "previous_rank": 2,
                        "previous_on": "Oct 26 – Nov 1, 2026",
                        "rank_change": -1,
                        "value_change": 1415.65,
                        "value_change_rate": 0.0355
                    }
                }
            }
        ]
    }
}