GuideGuías/Recetas/Suppress a duplicate listing

Esta guía está disponible en inglés.

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.

De un vistazo

Qué logra esta guía
Flag reviewed duplicates for removal, or dismiss false matches, in a single call.
APIs utilizadas
Referencia
Duplicate Listings
Requisitos previos
  • An API key with write access
  • Duplicate row ids, or a client and filter
Casos de uso habituales
  • 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.