New vs closed location count (last 4 months)

Overview

Get new-vs-closed location counts for each of the last four calendar months for the authenticated partner.

Prerequisites

  • A bearer token. Callable with Partner tokens.

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

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Partner tokens.

  • Mounted under the partner/stats group.

  • Scope joins store, then company(loc, bundle_id=2), then brand, then partner, then main_partner and matches when either partner.id or main_partner.id equals.

  • New counts use the account's created_at over active/pending stores (narrowed by assignBrands when you set assign_brand).

  • Closed counts use the account's soft-deleted deleted_at (withTrashed), narrowed when you set assign_location.

Rate limit

  • No rate limit.

Request

  • No path, query, or body params (reads the authenticated user only).

Response

  • month (string) — short month-year label, e.g. "Jun 26" (CarbonM y format).
  • closed_count (int) — locations deleted that month (0 if none).
  • new_count (int) — locations created that month (0 if none).

200 Success · 200

{
  "data": [
    { "month": "Feb 26", "closed_count": 2, "new_count": 8 },
    { "month": "Mar 26", "closed_count": 1, "new_count": 5 },
    { "month": "Apr 26", "closed_count": 3, "new_count": 10 },
    { "month": "May 26", "closed_count": 0, "new_count": 7 }
  ]
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
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?