Location growth

Overview

Get new versus closed locations per month for the last four months, including the current month.

Use this to show growth.

You'll need a partner token.

Returns a monthly series.

Prerequisites

Base URL

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

Endpoint

GET /api/v1/partner/stats/new-vs-closed-location-count

Authentication

Partner token

  • Results cover the locations of accounts directly under your partner or under its sub-partners.
  • New counts use the date the location was added and only count active or pending locations. When the user behind the token is limited to some accounts, only those accounts are counted.
  • Closed counts use the date the location was deleted. When the user behind the token is limited to some locations, only those are counted.

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

data is an array with one entry per month.

FieldTypeDescription
dataarray of objectsFour entries, one per month, oldest first. The last entry is the current month.
data[].monthstringThe month, as a short month and 2-digit year, e.g. Oct 26.
data[].closed_countintegerLocations deleted that month. 0 when none.
data[].new_countintegerLocations added that month that are still active or pending. 0 when none.

Response payload

{
  "data": [
    {
      "month": "Jul 26",
      "closed_count": 2,
      "new_count": 8
    },
    {
      "month": "Aug 26",
      "closed_count": 1,
      "new_count": 5
    },
    {
      "month": "Sep 26",
      "closed_count": 3,
      "new_count": 10
    },
    {
      "month": "Oct 26",
      "closed_count": 0,
      "new_count": 7
    }
  ]
}

Examples

Success payload

See Response payload.

No locations added or closed in the four months:

{
  "data": [
    {
      "month": "Jul 26",
      "closed_count": 0,
      "new_count": 0
    },
    {
      "month": "Aug 26",
      "closed_count": 0,
      "new_count": 0
    },
    {
      "month": "Sep 26",
      "closed_count": 0,
      "new_count": 0
    },
    {
      "month": "Oct 26",
      "closed_count": 0,
      "new_count": 0
    }
  ]
}

Error payload

401 Unauthenticated

{
  "message": "Unauthenticated."
}

429 Too many requests

{
  "message": "Too Many Attempts."
}
StatusMeaning
200Four months, oldest first.
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/new-vs-closed-location-count" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json'

Did this page help you?