POST/api/v4/locations/listings/mark-as-duplicate

Mark listing as duplicate

Flags one or more detected listing items as confirmed duplicates so listingsAPI can suppress them.

Requires an API key. See Authentication for header format and key rotation.

Parameters

Body

NameTypeRequiredDescription
listingItemIdsarrayrequiredArray of base64-encoded listing item IDs to mark as duplicates. Use the `listingItemId` values from the duplicate-listings endpoints.
locationIdstringoptionalLocation that owns the listing items (base64-encoded Relay ID or raw numeric ID). Scopes the operation to a single location.

Sample request

Ready-to-paste body. Replace placeholder IDs and values with yours.

{
  "locationId": "TG9jYXRpb246MTgwMDI4OQ==",
  "listingItemIds": ["TGlzdGluZ0l0ZW06MjM1OTg0NTA="]
}

Responses

200Listing items marked as duplicates. On failure, `success` is `false` and `errors` describes why.
{
  "data": {
    "markAsDuplicate": {
      "success": true,
      "errors": null
    }
  }
}
400Validation error — e.g. an unknown or malformed listing item ID. See the `errors` array (`code`, `message`, `path`).
401Unauthenticated — missing or invalid API key.

Confirms that specific listing items are duplicates, signaling listingsAPI to suppress or clean them up. Populate listingItemIds with the listingItemId values returned by Get duplicate listings for a location (or the id values from the account-wide rollup).

Use case: act on a reviewed duplicate

After a reviewer confirms a duplicate group, submit the offending item IDs in a single call:

{
  "locationId": "TG9jYXRpb246MTgwMDI4OQ==",
  "listingItemIds": ["TGlzdGluZ0l0ZW06MjM1OTg0NTA="]
}

listingItemIds is required and accepts multiple IDs, so batch every confirmed duplicate for a location into one request rather than one call per listing. A 200 with success: true means the items were accepted for suppression; a 200 with success: false (or a 400) returns a populated errors array — inspect each entry's code and message before retrying.

Use case: reverse a mistake

If an item was flagged in error, undo it with Mark listing as not a duplicate, which takes the same body shape. This is a write operation and counts against the account rate limit, so prefer batching over per-item requests.

curl -X POST 'https://listingsapi.com/api/v4/locations/listings/mark-as-duplicate' \
  -H "Authorization: API $LISTINGSAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "listingItemIds": "<listingItemIds>",
    "locationId": "<locationId>"
  }'