Counts
Overview
Get how many sub-partners, accounts, and locations sit under your partner.
Use this for a summary panel.
You'll need a partner token.
Returns the counts.
Prerequisites
- A Partner bearer token. See Authentication.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/partner/stats/counts
Authentication
Partner token
- Counts cover your own partner: sub-partners directly under it, accounts directly under it or under its sub-partners, and the locations under those accounts. Deleted ones aren't counted.
- When the user behind the token is limited to some accounts, only those accounts are counted. Locations are counted for those accounts only.
Rate limit
120 requests per minute, counted per user (the token’s user). See Rate limits.
Request parameters
None.
Request body
None.
Request payload
None.
Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
sub-partners | object | Sub-partners directly under your partner. |
sub-partners.count | integer | Total sub-partners. |
sub-partners.last_30_days | integer | Sub-partners created in the last 30 days. |
sub-partners.before_30_days | integer | Sub-partners created more than 30 days ago. |
accounts | object | Accounts directly under your partner or under its sub-partners. |
accounts.count | integer | Total accounts. |
accounts.last_30_days | integer | Accounts created in the last 30 days. |
accounts.before_30_days | integer | Accounts created more than 30 days ago. |
locations | object | Locations under those accounts. |
locations.count | integer | Total locations. |
locations.last_30_days | integer | Locations created in the last 30 days. |
locations.before_30_days | integer | Locations created more than 30 days ago. |
locations.last_90_days | integer | Locations created in the last 90 days. |
Response payload
{
"data": {
"sub-partners": {
"count": 8,
"last_30_days": 2,
"before_30_days": 6
},
"accounts": {
"count": 24,
"last_30_days": 5,
"before_30_days": 19
},
"locations": {
"count": 142,
"last_30_days": 12,
"before_30_days": 130,
"last_90_days": 30
}
}
}Examples
Success payload
See Response payload.
Nothing under your partner yet:
{
"data": {
"sub-partners": {
"count": 0,
"last_30_days": 0,
"before_30_days": 0
},
"accounts": {
"count": 0,
"last_30_days": 0,
"before_30_days": 0
},
"locations": {
"count": 0,
"last_30_days": 0,
"before_30_days": 0,
"last_90_days": 0
}
}
}Error payload
401 Unauthenticated
{
"message": "Unauthenticated."
}429 Too many requests
{
"message": "Too Many Attempts."
}| Status | Meaning |
|---|---|
200 | The counts. |
401 | The token is missing, expired or invalid. |
429 | More than 120 requests in a minute from this user. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/partner/stats/counts" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
