GET/api/v4/connected-accounts/{connectedAccountId}/folders

列出已连接账户的 GMB 文件夹

返回已连接的 Google 账号可访问的 Google Business Profile 文件夹(群组)。

需要 API 密钥。请求头格式和密钥轮换请参阅身份验证。

参数

路径

名称类型必填描述
connectedAccountIdstring必填UUID of the connected Google account (from the list connected accounts endpoint).

响应

200Array of GMB folder objects.
Response
{  "data": {    "getFoldersUnderGoogleAccount": [      {        "folderId": "accounts/104890024806530350198",        "folderName": "Aniruddha Basu",        "locationCount": null      }    ]  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

返回已连接的 Google 账号可访问的 Google Business Profile 文件夹(也称为群组或账号群组)。GBP 通过文件夹组织账号下的商家信息;每个文件夹都包含一个 folderId、一个 folderName,以及 locationCount(如果 Google 提供)。

使用场景:将新商家信息放入正确的文件夹。调用 create-GMB-listing 端点之前,先列出账号的文件夹,让客户选择一个。传入选定的 folderId(即 accounts/{id} 字符串,原样传入),以便在该文件夹内创建新商家信息,而不是在账号根目录下创建。

使用场景:与客户的 GBP 结构核对。拥有多个地点的品牌经常将商家信息分散在不同文件夹中。获取文件夹列表,以便在您的 UI 中呈现客户实际的 GBP 层级结构,并确认您正在将数据同步到他们预期的文件夹中。请注意,当 Google 未返回该文件夹的数量时,locationCount 可能为 null,因此应将其视为可选信息,而非权威依据。此端点要求使用 Google 类型的已连接账户;该路径仅适用于 GoogleAccount 连接。

Request
curl -X GET 'https://listingsapi.com/api/v4/connected-accounts/<connectedAccountId>/folders' \  -H "Authorization: API $LISTINGSAPI_KEY"