iotoms Docs

List vehicles

GET
/api/v1/ops/vehicles

Returns all vehicles, optionally only those with a given status (ACTIVE, INACTIVE, ARCHIVED or DELETED, upper case). An unrecognised or lower-case status value is ignored and every vehicle is returned. Assigned users are not included; use Get a vehicle with expand=assignment.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

status?string

Only vehicles in this status: ACTIVE, INACTIVE, ARCHIVED or DELETED, in upper case. Any other value (including lower case) is ignored and all vehicles are returned.

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?array<>|

The vehicles that matched.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/ops/vehicles'
Example Response
{  "status": "string",  "message": "string",  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "vehicleNumber": "string",      "vehicleLabel": "string",      "vehicleType": "VAN",      "status": "ACTIVE",      "lastOdometerKm": 0,      "notes": "string",      "assignment": {        "property1": {          "assignmentId": "dbf5135c-beb7-4185-80db-2e980c77381b",          "userId": 0,          "username": "string",          "assignmentRole": "string",          "assignedAt": "2019-08-24T14:15:22Z",          "assignedBy": "string",          "isActive": true        },        "property2": {          "assignmentId": "dbf5135c-beb7-4185-80db-2e980c77381b",          "userId": 0,          "username": "string",          "assignmentRole": "string",          "assignedAt": "2019-08-24T14:15:22Z",          "assignedBy": "string",          "isActive": true        }      }    }  ]}