Collapse a cluster of duplicate entities into one winner
POST
/api/v1/projects/{projectId}/review/entity-cluster-merge
const url = 'https://api.yggy.tech/api/v1/projects/example/review/entity-cluster-merge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"winnerId":"example","loserIds":["example"],"note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.yggy.tech/api/v1/projects/example/review/entity-cluster-merge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "winnerId": "example", "loserIds": [ "example" ], "note": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Header Parameters
Section titled “Header Parameters ” host
string | null
x-yggy-organization-id
string | null
Request Body
Section titled “Request Body ” Media type application/json
object
winnerId
required
string
loserIds
required
Array<string>
note
string
Example generated
{ "winnerId": "example", "loserIds": [ "example" ], "note": "example"}Responses
Section titled “ Responses ”Cluster merged
Media type application/json
object
mergedCount
required
number
closedSuggestions
required
number
Example generated
{ "mergedCount": 1, "closedSuggestions": 1}Invalid winner/loser combination
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Entity not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Entity merge precondition changed
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}