GETapi.synup.com/api/v4/locations/filter
Filter locations
Returns a paginated list of locations that match the supplied filters.
The filter criteria are passed as a single JSON-encoded object in the input query parameter. Supported filter keys include name/store/phone search (query, storeId, phone), location identifiers (ids), package tier (package), tags, folders, categories, address filters (postalCode, city, stateIso), custom attributes (customAttributes), GBP categories (primaryGbpSiteCategories, additionalGbpSiteCategories), add-ons (addOnIds), Google verification status (googleVerificationStatus), and client account scoping (clientIds).
Results are returned as a Relay-style connection (edges + pageInfo). Use the first/after (or last/before) parameters to page through results.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Query
| Name | Type | Required | Description |
|---|---|---|---|
input | string | optional | JSON-encoded filter object. See the description for supported keys. Defaults to an empty filter (all locations). |
first | integer | optional | Number of records to return from the start of the result set. |
after | string | optional | Cursor to fetch records after. |
last | integer | optional | Number of records to return from the end of the result set. |
before | string | optional | Cursor to fetch records before. |
archived | boolean | optional | Filter by archived state (true/false). |
approved | boolean | optional | Filter by approved state (true/false). |
hasErrors | boolean | optional | Return only locations that currently have errors. |
archivalScheduledAt | boolean | optional | Return only locations scheduled for archival. |
blacklistIds | array | optional | Location IDs to exclude from the result set. |
sortByNameAsc | boolean | optional | Sort results by location name ascending. |
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/filter?input=&first=&after=&last=&before=&archived=&approved=&hasErrors=&archivalScheduledAt=&blacklistIds=&sortByNameAsc=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/locations/filter?input=&first=&after=&last=&before=&archived=&approved=&hasErrors=&archivalScheduledAt=&blacklistIds=&sortByNameAsc=', {
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/filter?input=&first=&after=&last=&before=&archived=&approved=&hasErrors=&archivalScheduledAt=&blacklistIds=&sortByNameAsc=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/locations/filter?input=&first=&after=&last=&before=&archived=&approved=&hasErrors=&archivalScheduledAt=&blacklistIds=&sortByNameAsc=", 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 |
400 | Bad request - Invalid filter or parameters |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"filterLocations": {
"edges": [
{
"cursor": "string",
"node": "string"
}
],
"nodes": [
"string"
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": true,
"totalPages": 0,
"totalRecords": 0
},
"totalCount": 0
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.filterLocations | object | optional | |
data.filterLocations.edges | array of object | optional | |
data.filterLocations.edges[].cursor | string | optional | |
data.filterLocations.edges[].node | string | optional | |
data.filterLocations.nodes | array of string | optional | |
data.filterLocations.pageInfo | object | optional | |
data.filterLocations.pageInfo.hasNextPage | boolean | optional | Indicates if there are more pages available |
data.filterLocations.pageInfo.hasPreviousPage | boolean | optional | Indicates if there are previous pages available |
data.filterLocations.pageInfo.totalPages | integer | optional | Total number of pages available |
data.filterLocations.pageInfo.totalRecords | integer | optional | Total number of records across all pages |
data.filterLocations.totalCount | integer | optional | Total number of records matching the filter. |