Get Nearby Vehicles
Companies & fleet
Nearest vehicles
Find vehicles nearest to a coordinate, with optional count and radius.
POST
Get Nearby Vehicles
Overview
Finds vehicles with recent snapshots nearest to a coordinate, optionally limited by count and radius (meters; implementation rounds distance to 100 m buckets for sorting/filtering).A V2 version of this endpoint is available: Nearest vehicles. New integrations should prefer V2.
Endpoint
POST /api/GetNearest
Query parameters
Latitude in degrees.
Longitude in degrees.
Company id to scope vehicles.
Max results (default: unlimited in practice via
int.MaxValue when omitted).Max distance filter (default: unlimited when omitted).
Response
200 OK —NearestVehiclesDto
| Field | Type | Description |
|---|---|---|
| Status | string | e.g. Ok |
| result | array | Each item: vehicle (PositionDto), distance (rounded), realDistance (meters) |
Error responses
| Status | Meaning |
|---|---|
| 401 | Company not in tree or error object { "error": "Company {compId} not found" } |
Authorizations
JWT Bearer token obtained from POST /api/authentication/token/user or POST /api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping:
- User tokens are scoped to a single company.
- API key tokens may restrict access to a vehicle allowlist and/or action set (see token claims).
No refresh endpoint — re-authenticate with your credentials when the token expires.
Headers
Standard and must keep as it is.
Bearer your_token
Query Parameters
Latitude
Longitude
Company ID.
Number of vehicles to get.
Search radius in metres (not kilometres). Example: 5000 = 5 km radius. Omit to search without a radius constraint.