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,以及 Google 有提供時的 locationCount。

使用案例:將新的商家資訊放入正確的資料夾。 呼叫 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"