Search among guests
curl --request POST \
--url https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": {
"criteria": [
{
"criteria": [
{
"value": "<string>"
}
]
}
]
}
}
'const url = 'https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/search';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: {criteria: [{criteria: [{value: '<string>'}]}]}})
};
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/search"
payload = { "query": { "criteria": [{ "criteria": [{ "value": "<string>" }] }] } }
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/search",
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([
'query' => [
'criteria' => [
[
'criteria' => [
[
'value' => '<string>'
]
]
]
]
]
]),
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/search");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"query\": {\n \"criteria\": [\n {\n \"criteria\": [\n {\n \"value\": \"<string>\"\n }\n ]\n }\n ]\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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": {\n \"criteria\": [\n {\n \"criteria\": [\n {\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
.asString();{
"documents": [
{
"guest": {
"country": "<string>",
"firstname": "<string>",
"birthdate": "<string>",
"gender": "<string>",
"languages": "<string>",
"city": "<string>",
"timezone": "<string>",
"emailDomains": "<string>",
"phones": "<string>",
"entityId": "<string>",
"nationalities": "<string>",
"tags": "<string>",
"lastname": "<string>",
"emails": "<string>",
"createdAt": "<string>",
"street": "<string>",
"anonymous": true,
"id": "<string>",
"updatedAt": "<string>"
},
"booking": {
"fare": 123,
"touristTax": 123,
"arrival": "<string>",
"arrivalDay": "<string>",
"bookingDateArrival": "<string>",
"weekend": true,
"channel": "<string>",
"stayLength": 123,
"paxAdults": 123,
"balance": 123,
"farePerNight": 123,
"instayDows": [
"<string>"
],
"departureDow": "<string>",
"guestId": "<string>",
"roomType": "<string>",
"updatedAt": "<string>",
"filledCustomFields": [
"<string>"
],
"instayDates": [
"<string>"
],
"paxBabies": 123,
"entityId": "<string>",
"departureDay": "<string>",
"room": "<string>",
"tags": [
"<string>"
],
"arrivalDow": "<string>",
"closed": true,
"bookingDate": "<string>",
"departure": "<string>",
"paxChildren": 123,
"status": "<string>"
},
"aggregations": {
"counterFutureBookings": 123,
"sumFares": 123,
"lastDeparture": "<string>",
"counterBookings": 123,
"lastAccountId": "<string>",
"entityId": "<string>",
"id": "<string>",
"nextAccountId": "<string>",
"counterPastBookings": 123,
"avgFares": 123,
"updatedAt": "<string>"
}
}
]
}Search
Search guests
Search guests with quick or advanced filters
POST
/
api
/
guestprofile
/
entities
/
{entity_id}
/
guests
/
search
Search among guests
curl --request POST \
--url https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": {
"criteria": [
{
"criteria": [
{
"value": "<string>"
}
]
}
]
}
}
'const url = 'https://{apiBaseUrl}/api/guestprofile/entities/{entity_id}/guests/search';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: {criteria: [{criteria: [{value: '<string>'}]}]}})
};
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/search"
payload = { "query": { "criteria": [{ "criteria": [{ "value": "<string>" }] }] } }
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/search",
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([
'query' => [
'criteria' => [
[
'criteria' => [
[
'value' => '<string>'
]
]
]
]
]
]),
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/search");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"query\": {\n \"criteria\": [\n {\n \"criteria\": [\n {\n \"value\": \"<string>\"\n }\n ]\n }\n ]\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/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": {\n \"criteria\": [\n {\n \"criteria\": [\n {\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
.asString();{
"documents": [
{
"guest": {
"country": "<string>",
"firstname": "<string>",
"birthdate": "<string>",
"gender": "<string>",
"languages": "<string>",
"city": "<string>",
"timezone": "<string>",
"emailDomains": "<string>",
"phones": "<string>",
"entityId": "<string>",
"nationalities": "<string>",
"tags": "<string>",
"lastname": "<string>",
"emails": "<string>",
"createdAt": "<string>",
"street": "<string>",
"anonymous": true,
"id": "<string>",
"updatedAt": "<string>"
},
"booking": {
"fare": 123,
"touristTax": 123,
"arrival": "<string>",
"arrivalDay": "<string>",
"bookingDateArrival": "<string>",
"weekend": true,
"channel": "<string>",
"stayLength": 123,
"paxAdults": 123,
"balance": 123,
"farePerNight": 123,
"instayDows": [
"<string>"
],
"departureDow": "<string>",
"guestId": "<string>",
"roomType": "<string>",
"updatedAt": "<string>",
"filledCustomFields": [
"<string>"
],
"instayDates": [
"<string>"
],
"paxBabies": 123,
"entityId": "<string>",
"departureDay": "<string>",
"room": "<string>",
"tags": [
"<string>"
],
"arrivalDow": "<string>",
"closed": true,
"bookingDate": "<string>",
"departure": "<string>",
"paxChildren": 123,
"status": "<string>"
},
"aggregations": {
"counterFutureBookings": 123,
"sumFares": 123,
"lastDeparture": "<string>",
"counterBookings": 123,
"lastAccountId": "<string>",
"entityId": "<string>",
"id": "<string>",
"nextAccountId": "<string>",
"counterPastBookings": 123,
"avgFares": 123,
"updatedAt": "<string>"
}
}
]
}The fields a criterion can target, and the operators each one accepts, are listed on the Search criteria page.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Paginate results with offset/limit
Paginate results with offset/limit
Body
application/json
Show child attributes
Show child attributes
Response
List of documents
Show child attributes
Show child attributes
Was this page helpful?