Ranking report (full payload)

Overview

Ranks the authenticated account's locations against each other over a date range — by review volume, average rating, and response rate. It then computes a blended overall rank with a letter grade.

Prerequisites

  • A bearer token. Callable with Account (bundle_id=3) or location (bundle_id=2) tokens; partner tokens are rejected with 403.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/reports/ranking

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Account or location tokens (bundle_id 3 or 2). Partner tokens get 403.

  • Uses a Passport bearer.

  • Inside rankingReport the caller's company bundle_id must be 3 (account) or 2 (location-account); any other role gets a 403.

  • Walking UP resolves the account name.

  • Store scope comes from unless you supply store_id.

  • Reachable stores differ per role. A location-level user (bundle_id=2 / assign_location) sees only its assigned store(s), while an account-level user sees every store under the account's location-account children.

  • The optional store_id must sit inside your own account tree, so it must resolve to a store inside the caller's own hierarchy.

Rate limit

  • No rate limit.

Request body

  • Body (all in JSON body):
FieldTypeRequiredDescription
range_startstringyesDate-time, format Y-m-d H:i:s (e.g. 2024-01-01 00:00:00).
range_endstringyesDate-time, format Y-m-d H:i:s.
store_idintegernoNullable. Must Must be an existing location AND pass an ownership check (must belong to the caller's company tree). When omitted, all of the caller's reachable stores are ranked.
{
  "range_start": "2024-01-01 00:00:00",
  "range_end": "2024-12-31 23:59:59",
  "store_id": 1
}

Response

  • data.account_name (string) — the parent account company name (null if no account resolved).
  • data.interval (object) — start and end, echoed verbatim from the request.
  • data.locationRank (object) — four arrays of per-location rows:
  • byReview (array) — locations ranked by review_count; each row: id, name, review_count, response_count, response_percent, avgRating, rank.
  • byRate (array) — same row shape, ranked by avgRating.
  • byResponse (array) — same row shape, ranked by response_percent.
  • overAll (array) — each row adds reviewRank, rateRank, responseRank, totalRank (sum of the three), final_grade (A+/A/B/C/D), final_grade_point. When there are 10+ distinct total ranks, a percentage_rank band (e.g. Top 10%) is also added.
  • When no locations have data, all four arrays are empty.

200 Success · 200

{
  "data": {
    "account_name": "Burger King",
    "interval": {
      "start": "2024-01-01 00:00:00",
      "end": "2024-12-31 23:59:59"
    },
    "locationRank": {
      "byReview": [
        {
          "id": 12314,
          "name": "Burger King 1 - LOC-001",
          "review_count": 10,
          "response_count": 8,
          "response_percent": 80.0,
          "avgRating": 4.5,
          "rank": 1
        }
      ],
      "byRate": [
        {
          "id": 12314,
          "name": "Burger King 1 - LOC-001",
          "review_count": 10,
          "response_count": 8,
          "response_percent": 80.0,
          "avgRating": 4.5,
          "rank": 1
        }
      ],
      "byResponse": [
        {
          "id": 12314,
          "name": "Burger King 1 - LOC-001",
          "review_count": 10,
          "response_count": 8,
          "response_percent": 80.0,
          "avgRating": 4.5,
          "rank": 1
        }
      ],
      "overAll": [
        {
          "id": 12314,
          "name": "Burger King 1 - LOC-001",
          "review_count": 10,
          "response_count": 8,
          "response_percent": 80.0,
          "avgRating": 4.5,
          "reviewRank": 1,
          "rateRank": 2,
          "responseRank": 1,
          "totalRank": 4,
          "final_grade": "A+",
          "final_grade_point": 5
        }
      ]
    }
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403The token is valid but the record sits outside your account
422The request failed validation — the response names the fields
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/reports/ranking" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"range_start": "2024-01-01 00:00:00", "range_end": "2024-12-31 23:59:59", "store_id": 1}'

Did this page help you?