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
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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_id3 or 2). Partner tokens get 403. -
Uses a Passport bearer.
-
Inside
rankingReportthe caller's companybundle_idmust be3(account) or2(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_idmust 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):
| Field | Type | Required | Description |
|---|---|---|---|
range_start | string | yes | Date-time, format Y-m-d H:i:s (e.g. 2024-01-01 00:00:00). |
range_end | string | yes | Date-time, format Y-m-d H:i:s. |
store_id | integer | no | Nullable. 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) —startandend, echoed verbatim from the request.data.locationRank(object) — four arrays of per-location rows:byReview(array) — locations ranked byreview_count; each row:id,name,review_count,response_count,response_percent,avgRating,rank.byRate(array) — same row shape, ranked byavgRating.byResponse(array) — same row shape, ranked byresponse_percent.overAll(array) — each row addsreviewRank,rateRank,responseRank,totalRank(sum of the three),final_grade(A+/A/B/C/D),final_grade_point. When there are 10+ distinct total ranks, apercentage_rankband (e.g.Top 10%) is also added.- When no locations have data, all four arrays are empty.
200 Success · 200
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
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | The token is valid but the record sits outside your account |
422 | The request failed validation — the response names the fields |
500 | Unexpected 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}'Updated 8 days ago
