Skip to Content
HomeLink Hub
Admin

Resolve a duplicate-listing flag

POST
/api/v1/admin/duplicate-flags/{id}/resolve

Access: Bearer token required. Roles: ADMIN.

Records the admin's decision on an open flag; a flag can only be resolved once. not_duplicate moves the flag open -> dismissed and lifts the hold: if the listing is pending_verification and its legalStatus is already legally_verified it becomes listed immediately, otherwise it goes live when the lawyer verifies it. duplicate moves the flag open -> confirmed and takes the listing down: any non-draft, non-deleted listing is set to unlisted, verification.isVerified becomes false and verification.verificationNotes is set to Removed as a duplicate of listing <id of the best match>. resolvedBy, resolvedAt and resolutionNotes are stored on the flag. data.flag is the updated flag with unpopulated ids; data.listingStatus is the listing's status after the change (null if the listing no longer exists). The lister is not emailed or notified.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Path Parameters

id*string

ObjectId of the duplicate flag.

Request Body

application/json
  1. body
decision*string

not_duplicate to dismiss the flag and release the listing, or duplicate to confirm it and unlist the listing.

notes?string

Free-text reason, at most 1000 characters. Trimmed; stored as null when empty.

Response Body

  • decision was duplicate
  • decision was not_duplicate
application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X POST 'http://localhost:4000/api/v1/admin/duplicate-flags/string/resolve' \  -H 'Content-Type: application/json' \  -d '{  "decision": "duplicate",  "notes": "Same flat as the Admiralty Way listing; photos are identical."}'
Example Response
{  "status": 200,  "success": true,  "message": "Listing removed as a duplicate",  "data": {    "flag": {      "_id": "6660a7d49b1d4a0012ab3520",      "propertyId": "665f1c2e9b1d4a0012ab34cd",      "matches": [        {          "propertyId": "665f1c2e9b1d4a0012ab34ce",          "score": 85,          "distanceMeters": 12,          "addressSimilarity": 0.92,          "reasons": [            "Pinned 12 m away",            "Street address matches",            "Same property type",            "Both 3 bedrooms"          ]        }      ],      "topScore": 85,      "status": "confirmed",      "resolvedBy": "665f1c2e9b1d4a0012ab34c0",      "resolvedAt": "2026-06-06T10:30:00.000Z",      "resolutionNotes": "Same flat as the Admiralty Way listing; photos are identical.",      "createdAt": "2026-06-04T09:15:22.481Z",      "updatedAt": "2026-06-06T10:30:00.000Z",      "__v": 0    },    "listingStatus": "unlisted"  }}