Geolocation user search
Overview
This endpoint allows you to search for users within a geographical area defined by a circle. You can also apply additional filters such as pagination, recency, territory, and skills.
Users are sorted by the time of their last location update.
$ curl -H "Authorization: Bearer api-key" \
--data "{\"geometry\": {\"type\": \"circle\", \"center\": {\"latitude\": 1.0, \"longitude\": 2.0}, \"radius_m\": 100}}" \
https://api.planadoapp.com/v2/users/geo/search | jq
{
"users": [
{
"user_uuid": "some-uuid",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"actual_at": "2023-10-12T10:05:00Z",
"latitude": 1.0,
"longitude": 2.0
},
{
"user_uuid": "another-uuid",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com",
"actual_at": "2023-10-12T09:55:00Z",
"latitude": 1.5,
"longitude": 2.5
}
]
}
Request schema
Field | Type | JSON type | Required | Can be null |
Description |
---|---|---|---|---|---|
|
Object |
Yes |
No |
Geometry object |
|
|
Integer |
Integer |
No |
No |
Maximum number of users to return. Default is 100. |
|
Integer |
Integer |
No |
No |
Number of users to skip for pagination. Default is 0. |
|
Integer |
Integer |
No |
No |
Only include users whose last location update occurred within the specified number of minutes. Default is 10080 minutes (1 week). |
|
Object |
No |
No |
Territory reference |
|
|
[Skill] |
Array |
No |
No |
Skill references array |
Response schema
Field | Type | JSON type | Can be null |
Description |
---|---|---|---|---|
|
UUID |
String |
No |
Unique identifier |
|
String |
String |
No |
First name |
|
String |
String |
No |
Last name |
|
String |
String |
No |
|
|
{timestamp} |
String |
No |
Timestamp of the user’s last location update |
|
Number |
Number |
No |
Latitude |
|
Number |
Number |
No |
Longitude |