Nearest vehicles (V2)
Companies & fleet
Nearest vehicles
Returns vehicles nearest to a geographic coordinate within the company.
GET
Nearest vehicles (V2)
Overview
Returns vehicles within the specified company sorted by distance from a given coordinate, optionally capped at a radius (metres) or a maximum result count.The V1 version of this endpoint is Nearest vehicles. V2 is paginated.
Rate limit: 20 requests per 60 seconds per token.
Endpoint
GET /api/v2/companies/{id}/vehicles/nearest
Path parameters
Company ID.
Query parameters
Latitude of the reference point.
Longitude of the reference point.
Maximum number of vehicles to return (applied after radius filter). Defaults to 5000 if omitted.
Maximum distance in metres. Vehicles beyond this radius are excluded.
Page number (1-based).
Records per page.
Response
200 OK —PagedListResult<NearestPointResultItemDto>
Each item in the paginated items array:
| Field | Type | Description |
|---|---|---|
| vehicle | object | Full PositionDto for the vehicle (same shape as Last position) |
| distance | number | Straight-line distance in metres from the reference point |
| realDistance | number | Road distance in metres (may equal distance if routing is unavailable) |
Error responses
| Status | Meaning |
|---|---|
| 401 | Token not scoped to this company |
| 403 | Company not in caller’s accessible hierarchy |
| 404 | Company not found |
Authorizations
JWT Bearer token obtained from POST /api/v2/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping: API key tokens are scoped to the company the key belongs to and may restrict access to a vehicle allowlist and/or action set (see token claims).
No refresh endpoint — re-authenticate with your API key when the token expires.
Path Parameters
Query Parameters
Maximum distance in metres.
Response
Successful response