curl --location --request POST 'https://api.travtus.com/persons/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>'
--data-raw '{
"phone_number": "01234567890",
"groups_external_refs": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"persons": [
{
"identifier": "internal-id-1",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"identifier": "internal-id-2",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 2",
"external_ref": "id-2",
"phone_number": "01234567890"
}
]
}
This endpoint allows users to find a list of persons based on multiple person attributes.
curl --location --request POST 'https://api.travtus.com/persons/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>'
--data-raw '{
"phone_number": "01234567890",
"groups_external_refs": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"persons": [
{
"identifier": "internal-id-1",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"identifier": "internal-id-2",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 2",
"external_ref": "id-2",
"phone_number": "01234567890"
}
]
}
group_ids parameter or a list of group external references through the groups_external_refs attribute to filter the list of retrieved persons down.
Do not provide both, as this will result in the request failing.
If no group_ids or group_external_refs are specified in the request body, the authenticated user will retrieve person records for all groups they have access to.
last_id.Show properties
after-id parameter to load the next set of results.If there are no more results to load, this value will be -1.Please note that this is unrelated to the external reference or the internal identifier.{
"error": {
"type": "missing_authorization",
"message": "Your request does not include an 'Authorization' header with a bearer token for your account."
}
}
{
"error": {
"type": "expired_token",
"message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one."
}
}
{
"error": {
"type": "invalid_authorization",
"message": "The bearer token you have provided in the 'Authorization' header is invalid."
}
}
{
"error": {
"type": "both_group_identifiers_provided",
"message": "You have provided both group ids and group external references for the find persons operation. Please only provide one of the two."
}
}
{
"error": {
"type": "not_found",
"message": "There are no person records matching the information provided."
}
}
curl --location --request POST 'https://api.travtus.com/persons/find/' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <token>'
--data-raw '{
"phone_number": "01234567890",
"groups_external_refs": ["group-1"],
"after-id": 1
}'
{
"last_id": 5,
"persons": [
{
"identifier": "internal-id-1",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 1",
"external_ref": "id-1",
"phone_number": "01234567890"
},
{
"identifier": "internal-id-2",
"email_address": "[email protected]",
"first_name": "Test",
"last_name": "Person 2",
"external_ref": "id-2",
"phone_number": "01234567890"
}
]
}