Link Search Menu Expand Document

City Vehicles

Overview

Retrieves details of currently available Mevo Flex vehicles in a chosen city.

Resource

GET /v1/cities/:cityName/vehicles

GET Parameters

Parameter In Description
cityName Path Name of the requested city

Example Request

Place your encoded credentials in the Authorization header, and the name of the desired city in the path.

curl -H Authorization: Basic <ENCODED_CREDENTIALS> \
     https://api.mevo.co.nz/v1/cities/auckland/vehicles

Responses

Success

Status: 200 OK

The response body will contain a JSON payload with an array of available vehicle details.

The returned id is the unique identifier of each vehicle. This can be used in a universal link.

[
  {
    "id": "7572b562-e4d7-4af4-9eb3-a1a6f8615f5b",
    "serviceId": "5c0b31e6-6f84-4a03-be18-d6721fd7835c",
    "plate": "ABC123",
    "latitude": -36.852272,
    "longitude": 174.755661,
    "name": "Kia Stonic",
    "description": "Compact Cross",
    "vehicleType": "CAR",
    "transmission": "AUTOMATIC", // Or MANUAL
    "numberOfSeats": 5,
    "energyCategory": "FUEL", // Or HYBRID, ELECTRIC
    "energyLevel": 89.0, // Percentage 0.0 - 100.0
    "energyRange": 585.0, // Returns 0.0 if vehicle does not support range estimate
    "energyRangeUnit": "km",
    "pricing": {
      "currency": "NZD",
      "perMinute": "0.6",
      "perHour": "17.0",
      "perDay": "85.0",
      "overnight": "34.0"
    },
    "vehicleSrc": {
      "light": "https://assets.mevo.co.nz/vehicles/kia/stonic/perennial-grey/image.png",
      "dark": "https://assets.mevo.co.nz/vehicles/kia/stonic/perennial-grey/dark.png"
    },
    "mapPinSrc": {
      "light": "https://assets.mevo.co.nz/services/flex-auckland/vehicles/kia-stonic/pin-available.png",
      "dark": "https://assets.mevo.co.nz/services/flex-auckland/vehicles/kia-stonic/pin-available-dark.png"
    },
    "mapPinSelectedSrc": {
      "light": "https://assets.mevo.co.nz/services/flex-auckland/vehicles/kia-stonic/pin-selected.png",
      "dark": "https://assets.mevo.co.nz/services/flex-auckland/vehicles/kia-stonic/pin-selected-dark.png"
    }
  },
  {...},
  ...
]
Status: 204 No Content

Returned if the supplied city has no available vehicles.

Failure

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.

Status: 404 Not Found

Returned if no city exists with the supplied name.