The base URL is
https://api.radar.io. Send your API key in the Authorization header. For key types, the error format, and rate limits, see Authentication, errors, and rate limits.
On iOS and Android, use the SDK to track users in the foreground or in the background. The SDK calls this endpoint for you and handles permissions, batching, and offline replay. Call the endpoint directly only when you can’t use an SDK, for example from a device or backend that already has a location.
Track
Tracks a location update. Returns the user and the events generated, depending on your project settings.- Endpoint:
POST /v1/track - Authentication: Publishable key
- Rate limit: 1 request per second per device
- Used by: Detect geofence events and place visits, Track pickups, deliveries, and workers
deviceId identifies logged out users. userId and deviceId together identify logged in users. If a matching user exists, Radar updates it. If not, Radar creates a new user.
Don’t send personally identifiable information, such as a name, an email address, or a publicly available ID, as userId.
Body parameters
Response
A200 response contains:
Which context fields and event types you receive depends on your project settings. Region fields require Regions,
place requires Places, and fraud requires Fraud. When user insights are enabled and Radar has inferred a home or work location, user.locationInsights is included. See User object.
To receive the same events on your backend without polling, use webhooks.
Example
This request sends a location update foruser-123 on device-456.
Errors
A
400 response looks like this:
See also
- To read or delete the users that tracking creates, see the Users API.
- To log a conversion for a tracked user, see Log a conversion.
- To start and update trips, see the Trips API.
- For what each context field on the user represents and the events it generates, see context types.