Nearby Vehicles
Overview
Nearby available vehicles to a location can be retrieved by providing a latitude and longitude.
Resource
GET /v1/vehicles/near
GET Parameters
Parameter | In | Description |
---|---|---|
latitude | Query | Latitude of requested location |
longitude | Query | Longitude of requested location |
Example Request
Place your encoded credentials in the Authorization header, and your location coordinates in the query string parameters.
curl -H Authorization: Basic <ENCODED_CREDENTIALS> \
https://api.mevo.co.nz/v1/vehicles/near?latitude=-41.2865&longitude=174.7762
Responses
Success
Status: 200 OK
The response body will contain a JSON list representing the available vehicles near the supplied latitude/longitude:
-
id
is the unique identifier of the vehicle. This can be used in a further details request or in a universal link. -
name
is the display name of the vehicle. Typically the make and model. -
latitude
represents the vehicle’s current latitude. -
longitude
represents the vehicle’s current longitude.
[
{
"id": "3cc60942-63bf-4521-a10c-9350e9ebe292",
"name": "Volkswagen Polo",
"latitude": -41.311107,
"longitude": 174.786007
},
{
"id": "14194604-a082-4762-93a3-bd4c0841a92b",
"name": "Volkswagen Polo",
"latitude": -41.299911,
"longitude": 174.770197
},
{
"id": "e86cb60e-b666-4291-86f9-bde44bd61f74",
"name": "Audi A3 e-tron",
"latitude": -41.303143,
"longitude": 174.779126
}
]
Status: 204 No Content
Returned if there are no available vehicles near the supplied latitude/longitude.
Failure
Status: 400 Bad Request
Returned if latitude/longitude is missing or if they are not numeric.
Status: 401 Unauthorized
Returned if the encoded credentials are incorrect. Ensure that your application client ID and client secret match those provided by Mevo. Check that you have base64 encoded your credentials. You might need to remove newline characters from the encoded string.