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

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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.

FieldTypeDescription
sub-partnersobjectSub-partners directly under your partner.
sub-partners.countintegerTotal sub-partners.
sub-partners.last_30_daysintegerSub-partners created in the last 30 days.
sub-partners.before_30_daysintegerSub-partners created more than 30 days ago.
accountsobjectAccounts directly under your partner or under its sub-partners.
accounts.countintegerTotal accounts.
accounts.last_30_daysintegerAccounts created in the last 30 days.
accounts.before_30_daysintegerAccounts created more than 30 days ago.
locationsobjectLocations under those accounts.
locations.countintegerTotal locations.
locations.last_30_daysintegerLocations created in the last 30 days.
locations.before_30_daysintegerLocations created more than 30 days ago.
locations.last_90_daysintegerLocations 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."
}
StatusMeaning
200The counts.
401The token is missing, expired or invalid.
429More than 120 requests in a minute from this user.
500Unexpected 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'

Did this page help you?