Compute merge confidence
curl --request POST \
--url https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"guestIds": [
"55468764-64be-4fc1-a43f-e37239e012bf",
"55464550-c3d9-4115-814f-a9b83b6baaa5"
]
}
'const url = 'https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
guestIds: ['55468764-64be-4fc1-a43f-e37239e012bf', '55464550-c3d9-4115-814f-a9b83b6baaa5']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence"
payload = { "guestIds": ["55468764-64be-4fc1-a43f-e37239e012bf", "55464550-c3d9-4115-814f-a9b83b6baaa5"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'guestIds' => [
'55468764-64be-4fc1-a43f-e37239e012bf',
'55464550-c3d9-4115-814f-a9b83b6baaa5'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"guestIds\": [\n \"55468764-64be-4fc1-a43f-e37239e012bf\",\n \"55464550-c3d9-4115-814f-a9b83b6baaa5\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"guestIds\": [\n \"55468764-64be-4fc1-a43f-e37239e012bf\",\n \"55464550-c3d9-4115-814f-a9b83b6baaa5\"\n ]\n}")
.asString();Merge
Compute merge confidence
Score how close two or more guest profiles are before merging them
POST
/
api
/
guestprofile
/
entities
/
{entity_id}
/
guests
/
compute-merge-confidence
Compute merge confidence
curl --request POST \
--url https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"guestIds": [
"55468764-64be-4fc1-a43f-e37239e012bf",
"55464550-c3d9-4115-814f-a9b83b6baaa5"
]
}
'const url = 'https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
guestIds: ['55468764-64be-4fc1-a43f-e37239e012bf', '55464550-c3d9-4115-814f-a9b83b6baaa5']
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence"
payload = { "guestIds": ["55468764-64be-4fc1-a43f-e37239e012bf", "55464550-c3d9-4115-814f-a9b83b6baaa5"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'guestIds' => [
'55468764-64be-4fc1-a43f-e37239e012bf',
'55464550-c3d9-4115-814f-a9b83b6baaa5'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"guestIds\": [\n \"55468764-64be-4fc1-a43f-e37239e012bf\",\n \"55464550-c3d9-4115-814f-a9b83b6baaa5\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/compute-merge-confidence")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"guestIds\": [\n \"55468764-64be-4fc1-a43f-e37239e012bf\",\n \"55464550-c3d9-4115-814f-a9b83b6baaa5\"\n ]\n}")
.asString();The computation runs in the background. The response carries no body: read the
location header, then poll the task it points at with Read a task. The score lands in the task’s result.Was this page helpful?