GETapi.synup.com/api/v4/connected-accounts/{connectedAccountId}/folders
List folders under a Google account
List all the folders in Google My Business for a given connected account.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
connectedAccountId | string | required |
Query
| Name | Type | Required | Description |
|---|---|---|---|
folderName | string | optional | Optional. Filter folders by name. If provided, returns only folders that match this name. Folders are also known as groups in GMB. eg: Downtown |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type | string | optional |
Request
Request
curl -X GET 'https://api.synup.com/api/v4/connected-accounts/:connectedAccountId/folders?folderName=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/connected-accounts/:connectedAccountId/folders?folderName=', {
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/connected-accounts/:connectedAccountId/folders?folderName=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/connected-accounts/:connectedAccountId/folders?folderName=", 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 |
Example response
{
"data": {
"getFoldersUnderGoogleAccount": [
{
"name": "Main Branch",
"locationCount": 5,
"folderId": "accounts/103301192460668915768"
},
{
"name": "Downtown",
"locationCount": 3,
"folderId": "accounts/1154433325552997863009"
}
]
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | |
data.getFoldersUnderGoogleAccount | array of object | required | |
data.getFoldersUnderGoogleAccount[].name | string | required | Name of the folder |
data.getFoldersUnderGoogleAccount[].locationCount | integer | required | Number of locations in the folder |
data.getFoldersUnderGoogleAccount[].folderId | string | required | Unique identifier for the folder in Google My Business (e.g. "accounts/103301192460668915768") |