GuideGuides/Recettes/Suppress a duplicate listing

Ce guide est disponible en anglais.

How do I suppress or remove a duplicate listing through the API?

Suppress a Duplicate Listing via API

Flag a duplicate listing for removal with one Synup API call, by explicit ids or by filter, and what the flagged, deleted and failed states mean.

En bref

Ce que ce guide permet
Flag reviewed duplicates for removal, or dismiss false matches, in a single call.
API utilisées
Référence
Fiches en double
Prérequis
  • An API key with write access
  • Duplicate row ids, or a client and filter
Cas d'usage typiques
  • Acting on a reviewer's decisions
  • Applying a policy across a whole publisher
  • Clearing out false-positive matches

One endpoint does both the removing and the dismissing. POST /api/v1/listings/duplicates/resolve takes an action of flag or dismiss, and either an explicit list of row ids or a filter. Ids fit a reviewer clicking through a queue. A filter fits a policy, like flagging every high-confidence duplicate on one publisher at once.

# Flag two reviewed rows for removal
curl -X POST https://ai.synup.com/api/v1/listings/duplicates/resolve \
  -H "Authorization: Bearer $SYNUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "flag", "duplicateListingIds": ["DUP_ID_1", "DUP_ID_2"] }'

# Or apply a policy: every high-confidence potential duplicate on one publisher
curl -X POST https://ai.synup.com/api/v1/listings/duplicates/resolve \
  -H "Authorization: Bearer $SYNUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "flag",
    "clientId": "CLIENT_ID",
    "filter": { "filter": "potential", "band": "high", "publisherSiteId": 12 }
  }'

Flagging does not delete anything itself. It queues a removal request that a background job carries to the publisher. The row moves from flagged to deleted when the publisher removes it, or to failed when the publisher refuses. A failed row can be flagged again. Dismissing marks a row as not a duplicate and drops it from the queue.

Removal timing is the publisher's, not Synup's, and it varies a lot by directory. Read the state back from GET /api/v1/listings/duplicates/rollup rather than assuming a flag is a deletion.