Ranking report
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. (Same route/controller/request validation as Ranking report (full payload); this is the minimal-payload example without store_id.)
Prerequisites
- A bearer token. Callable with Partner and Account tokens.
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: Partner and Account tokens.
-
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.
-
With no
store_id, the ranked set is every store in the caller's scope. -
Per-role difference: a location-level user (
bundle_id=2 /assign_location) gets only its assigned store(s); an account-level user gets all stores under the account's location-account children.
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. Omitted here. When present must Must be an existing location AND pass an ownership check. |
{
"range_start": "2024-01-01 00:00:00",
"range_end": "2024-12-31 23:59:59"
}Response
data.account_name(string) — the parent account company name (null if no account resolved).data.interval(object) —startandend, echoed from the request.data.locationRank(object):byReview(array) — ranked byreview_count; row:id,name,review_count,response_count,response_percent,avgRating,rank.byRate(array) — same shape, ranked byavgRating.byResponse(array) — same shape, ranked byresponse_percent.overAll(array) — addsreviewRank,rateRank,responseRank,totalRank,final_grade(A+/A/B/C/D),final_grade_point; with 10+ distinct total ranks each row also carries apercentage_rankband.- All four arrays are empty when no location has data in the window.
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"}'Updated 8 days ago
