GET
/api/v4/locations/listings/duplicates取得帳戶的所有重複商家資訊
傳回分頁的帳戶層級彙整結果,涵蓋帳戶內所有地點的潛在重複商家資訊。
參數
查詢
| 名稱 | 類型 | 必填 | 說明 | 預設值 |
|---|---|---|---|---|
| status | string | 選填 | Duplicate status to return: `POTENTIAL`, `PROCESSING`, `FIXED`, or `FAILED`. Case-insensitive. | POTENTIAL |
| siteId | integer | 選填 | Narrow to a single publisher by site ID. See the plan-sites endpoint for valid IDs. | — |
| tag | string | 選填 | Tag to scope the rollup to. Defaults to every location the key can see. | all |
| page | integer | 選填 | 1-based page number. | 1 |
| perPage | integer | 選填 | Records per page. | — |
回應
200Paginated rollup of duplicate listing records across the account.
{ "data": { "duplicateListingsRollup": { "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, "totalPages": 34, "totalRecords": 1673 }, "records": [ { "id": "3329229", "name": "Woodbury Train Station", "nameValid": false, "duplicateProcessingState": "POTENTIAL", "liveLink": "http://citysquares.com/b/woodbury-train-station-23598450", "locationId": "73451", "siteName": "City Squares", "siteUrl": "citysquares.com" } ] } }}400An invalid `status` value, e.g. one outside `POTENTIAL` / `PROCESSING` / `FIXED` / `FAILED`.
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
傳回帳戶層級的潛在重複商家資訊檢視,涵蓋所有發布平台目錄,並加以彙整,讓您能批次分流處理重複商家資訊,無須逐一查詢各個地點。上方顯示的 pageInfo/records 結構已透過帳戶 12345 的實際回應驗證;該帳戶目前沒有待處理的重複商家資訊,因此這筆記錄僅用於示範有重複商家資訊的地點所傳回的結構。
使用案例:每晚執行重複商家資訊移除掃描
逐頁取得整個帳戶的 POTENTIAL 重複商家資訊,並將每個 id 交由審核人員處理:
GET /api/v4/locations/listings/duplicates?status=POTENTIAL&page=1篩選條件是扁平查詢參數,不是 JSON。status 和 siteId 都是選填項目。兩者皆未提供時,status 預設為 POTENTIAL,tag 預設為 all,因此僅呼叫 GET /api/v4/locations/listings/duplicates 會傳回帳戶中待處理的重複商家資訊,而不是 400。使用 pageInfo.hasNextPage 並遞增 page 來逐頁取得結果,直到其值為 false;totalRecords 和 totalPages 可讓您顯示進度。
使用案例:將範圍限縮至您目錄中的一部分
彙整結果一律涵蓋該金鑰可存取的所有地點。若要審查其中一部分,請逐頁取得結果,並依每筆記錄的 locationId 分組,或針對您關注的地點呼叫個別地點端點。
取得要處理的 id 後,請使用 將商家資訊標記為重複 來解決重複問題,或使用 將商家資訊標記為非重複 來排除誤判。若要取得依網站分組的單一地點重複商家資訊,請使用 取得地點的重複商家資訊。這是受帳戶速率限制的分頁清單端點;收到 429 時,請依據 Retry-After 標頭延後重試。
Request
curl -X GET 'https://listingsapi.com/api/v4/locations/listings/duplicates' \ -H "Authorization: API $LISTINGSAPI_KEY"