GETapi.synup.com/api/v4/locations/add-on-count
Location add-on count
Returns how many locations in the filtered set have the specified add-on enabled vs disabled, along with counts for other add-ons in the same product umbrella. 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 |
|---|---|---|---|
addOnId | string | required | ID of the add-on to count enablement for. |
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. |
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/add-on-count?addOnId=&filterInput=&selectionType=&locationIds=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/locations/add-on-count?addOnId=&filterInput=&selectionType=&locationIds=', {
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/add-on-count?addOnId=&filterInput=&selectionType=&locationIds=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/locations/add-on-count?addOnId=&filterInput=&selectionType=&locationIds=", 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": {
"locationAddOnCount": {
"enabled": 0,
"disabled": 0,
"othersEnabled": [
{
"id": "string",
"name": "string",
"count": 0
}
]
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.locationAddOnCount | object | optional | |
data.locationAddOnCount.enabled | integer | optional | Locations with the add-on enabled. |
data.locationAddOnCount.disabled | integer | optional | Locations with the add-on disabled. |
data.locationAddOnCount.othersEnabled | array of object | optional | Counts for other add-ons in the same product umbrella. |
data.locationAddOnCount.othersEnabled[].id | string | optional | |
data.locationAddOnCount.othersEnabled[].name | string | optional | |
data.locationAddOnCount.othersEnabled[].count | integer | optional |