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

geometry

Geometry

Object

Yes

No

Geometry object

limit

Integer

Integer

No

No

Maximum number of users to return. Default is 100.

offset

Integer

Integer

No

No

Number of users to skip for pagination. Default is 0.

recency_cut_off_min

Integer

Integer

No

No

Only include users whose last location update occurred within the specified number of minutes. Default is 10080 minutes (1 week).

territory

Territory

Object

No

No

Territory reference

skills

[Skill]

Array

No

No

Skill references array

Response schema

Field Type JSON type Can be null Description

user_uuid

UUID

String

No

Unique identifier

first_name

String

String

No

First name

last_name

String

String

No

Last name

email

String

String

No

Email

actual_at

{timestamp}

String

No

Timestamp of the user’s last location update

latitude

Number

Number

No

Latitude

longitude

Number

Number

No

Longitude