GETapi.synup.com/api/v4/locations/package-count
Location package count
Returns the number of locations in the filtered set by package tier — freemium vs premium. Scope the set with filterInput/selectionType/locationIds, identical to Filter locations.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Query
| Name | Type | Required | Description |
|---|---|---|---|
filterInput | string | optional | JSON-encoded filter object. Defaults to an empty filter (all locations). |
selectionType | string | optional | Whether to include all matching locations or an explicit selection. |
locationIds | array | optional | Location IDs to include when selectionType is SELECTED_ITEMS. |
archived | boolean | optional | Filter by archived state (true/false). |
approved | boolean | optional | Filter by approved state (true/false). |
archivalScheduledAt | boolean | optional | Return only locations scheduled for archival. |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Synup-Version | string | required | API version date (YYYY-MM-DD). |
Request
Request
curl -X GET 'https://api.synup.com/api/v4/locations/package-count?filterInput=&selectionType=&locationIds=&archived=&approved=&archivalScheduledAt=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/locations/package-count?filterInput=&selectionType=&locationIds=&archived=&approved=&archivalScheduledAt=', {
method: 'GET',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await res.json();import requests
res = requests.get(
"https://api.synup.com/api/v4/locations/package-count?filterInput=&selectionType=&locationIds=&archived=&approved=&archivalScheduledAt=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/locations/package-count?filterInput=&selectionType=&locationIds=&archived=&approved=&archivalScheduledAt=", nil)
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"locationPackageCount": {
"freemiumCount": 0,
"premiumCount": 0
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.locationPackageCount | object | optional | |
data.locationPackageCount.freemiumCount | integer | optional | Number of freemium-tier locations. |
data.locationPackageCount.premiumCount | integer | optional | Number of premium-tier locations. |