Skip to content
SynupAPI
Get an API key
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

NameTypeRequiredDescription
inputstringoptionalJSON-encoded filter object. See the description for supported keys. Defaults to an empty filter (all locations).
firstintegeroptionalNumber of records to return from the start of the result set.
afterstringoptionalCursor to fetch records after.
lastintegeroptionalNumber of records to return from the end of the result set.
beforestringoptionalCursor to fetch records before.
archivedbooleanoptionalFilter by archived state (true/false).
approvedbooleanoptionalFilter by approved state (true/false).
hasErrorsbooleanoptionalReturn only locations that currently have errors.
archivalScheduledAtbooleanoptionalReturn only locations scheduled for archival.
blacklistIdsarrayoptionalLocation IDs to exclude from the result set.
sortByNameAscbooleanoptionalSort results by location name ascending.

Headers

NameTypeRequiredDescription
Synup-VersionstringrequiredAPI 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'

Responses

StatusDescription
200Successful response
400Bad request - Invalid filter or parameters
401Unauthorized - 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

NameTypeRequiredDescription
dataobjectoptional
data.filterLocationsobjectoptional
data.filterLocations.edgesarray of objectoptional
data.filterLocations.edges[].cursorstringoptional
data.filterLocations.edges[].nodestringoptional
data.filterLocations.nodesarray of stringoptional
data.filterLocations.pageInfoobjectoptional
data.filterLocations.pageInfo.hasNextPagebooleanoptionalIndicates if there are more pages available
data.filterLocations.pageInfo.hasPreviousPagebooleanoptionalIndicates if there are previous pages available
data.filterLocations.pageInfo.totalPagesintegeroptionalTotal number of pages available
data.filterLocations.pageInfo.totalRecordsintegeroptionalTotal number of records across all pages
data.filterLocations.totalCountintegeroptionalTotal number of records matching the filter.