GET
/api/v4/plan-sites列出方案包含的網站
傳回帳戶方案包含的所有發布平台目錄網站,以及每個網站的 ID、URL 和支援的國家。
參數
此端點不接受任何參數。
回應
200Array of plan site objects. Country arrays are truncated below for brevity; the live response lists every supported country.
{ "data": { "planSites": [ { "hideAddressSupportedCountries": ["US", "CA", "AU", "IN", "GB"], "id": 1, "name": "Google Maps", "supportedCountries": ["US", "CA", "IN", "GB", "DE"], "url": "maps.google.com" }, { "hideAddressSupportedCountries": ["US", "CA", "AU", "IN", "GB"], "id": 184, "name": "Facebook", "supportedCountries": ["US", "CA", "IN", "GB", "DE"], "url": "facebook.com" }, { "hideAddressSupportedCountries": ["US", "CA", "AU", "GB"], "id": 2, "name": "Yelp", "supportedCountries": ["US", "CA", "GB", "DE", "FR"], "url": "yelp.com" } ] }}401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
傳回目前帳戶所用方案包含的所有發布平台目錄網站。每個項目都有整數 id、用於顯示的 name、網站的 url、網站接受的 ISO 國家代碼清單(supportedCountries),以及隱藏地址/服務區域旗標生效的國家(hideAddressSupportedCountries)。
使用案例:建立有效的網站 ID 選擇器。 在為地點啟用或停用發布平台之前,請呼叫此端點,瞭解方案有哪些數字網站 ID。只有此處傳回的 ID 才能有效地用於 API 的其他部分。將 id 對應至 name/url,以呈現易於閱讀的提交設定畫面。
使用案例:預先檢查地點的國家。 篩選回應,只保留 supportedCountries 包含該地點 countryIso 的網站,讓您只提供確實會接受該商家資訊的發布平台選項。對於服務區域商家,請交叉核對 hideAddressSupportedCountries,確認在哪些國家可以隱藏地址。
注意事項。
- 這份清單以方案為範圍,且不分頁:單次回應就會傳回方案的完整網站目錄,因此沒有游標。預期會有數十個項目,請快取結果,避免每次請求都呼叫此端點。
supportedCountries和hideAddressSupportedCountries各自可能包含 50 個以上的 ISO 代碼;上方範例已截短。- 此端點共用帳戶的速率限制;收到
429時,請遵循Retry-After標頭。
Request
curl -X GET 'https://listingsapi.com/api/v4/plan-sites' \ -H "Authorization: API $LISTINGSAPI_KEY"