/api/v4/connected-accounts/disconnect-listing中斷商家資訊與地點的連結
解除已連結的發布平台商家資訊與單一 Listings API 地點之間的連結。
參數
請求主體
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| input | object | 必填 | Wrapper object. The entire request body must be nested under `input`. |
| input.locationId | string | 必填 | Base64-encoded Relay ID of the one location to disconnect. |
| input.site | string | 選填 | Publisher to disconnect from: `GOOGLE`, `FACEBOOK`, or `APPLE`. Required unless you send `providerId`. |
| input.providerId | string | 選填 | The publisher's own account identifier, as an alternative to `site`. Required unless you send `site`. |
請求範例
可直接貼上的請求主體。請將預留位置 ID 與值換成您自己的。
{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "site": "GOOGLE" }}回應
200Listing disconnected.
{ "data": { "disconnectConnectedAccountsLocations": { "clientMutationId": null, "success": true, "errors": null } }}401Unauthenticated, missing or invalid API key.
移除 Listings API 地點與其目前連結的發布平台商家資訊(Google Business Profile、Facebook Page 或 Apple Business Connect)之間的連結。中斷連結後,Listings API 會停止將更新推送至該商家資訊。地點本身仍會保留在您的帳戶中,僅會中斷商家資訊的連結。
請求格式。 請求主體必須包在 input 物件中,內含單一 locationId,並提供 site(GOOGLE、FACEBOOK 或 APPLE)或 providerId 其中一項,以指定要中斷的連結。這不是批次端點:每次呼叫只能處理 1 個地點,因此若需處理多個地點,請使用迴圈逐一呼叫。
若既未傳送 site,也未傳送 providerId,則會傳回 SY10056(「Site is not valid for the location disconnection」)。若地點與該網站之間沒有有效連結,則會傳回 SY10057(「Location is not connected for the site」),而非直接回報成功,因此 success: true 確實表示已移除連結。
使用案例:將地點改為連結至另一個帳戶。 當客戶將店面從一個 Google 帳戶移至另一個帳戶時,請先在此使用 site: "GOOGLE" 中斷地點目前的商家資訊連結,再針對新連結的帳戶使用 trigger-matches 和 connect-listing,將地點連結至正確的商家資訊。
使用案例:停止代管但不刪除資料。 當客戶降級方案,不再希望由 Listings API 管理其 Google/Facebook 商家資訊,但仍想保留地點記錄及其由 Listings API 託管的資料時,請中斷商家資訊連結,而非封存地點。這會停止向外同步,同時保留地點供其他發布平台使用。
此端點會變更現有的連結,並將變更推送至發布平台。上方的請求與回應範例僅供示範。
curl -X POST 'https://listingsapi.com/api/v4/connected-accounts/disconnect-listing' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "site": "GOOGLE" } }'