REST API Objects

Below are the serialized definitions of each object type, including the scopes required to retrieve them. Details about Scopes are in Section Scopes.

DeviceUserRelationship Object

Name Type Description Scopes
id string Device Identifier scope:public
url string User Device Relationship URI scope:public
version integer Device Version scope:public
direct_access_token string Authorization token to allow apps to talk to the Adapter directly scope:adapter:basic scope:public
app_encryption_key string Application encryption key scope:adapter:basic scope:public

Tag Object

Name Type Description Scopes
tag slug scope:public

Trip Object

Name Type Description Scopes
url string Trip URI scope:trip
id string scope:trip
driver string Driver URI scope:trip
user string User URI scope:trip
started_at datetime Time at start of trip scope:trip
ended_at datetime Time at end of trip scope:trip
distance_m decimal Distance of trip in meters scope:trip
duration_s string Duration of trip in seconds scope:trip
vehicle string Vehicle URI scope:trip
start_location string Lat/Long at start of trip scope:location scope:trip
start_address Model Address at start of trip scope:location scope:trip
end_location string Lat/Long at end of trip scope:location scope:trip
end_address Model Address at end of trip scope:location scope:trip
path string Encoded path of trip scope:location scope:trip
fuel_cost_usd decimal Fuel cost in dollars scope:behavior scope:trip
fuel_volume_l float Amount of fuel used in litres scope:behavior scope:trip
average_kmpl float Fuel efficiency in km/litre scope:behavior scope:trip
average_from_epa_kmpl float Fuel efficiency in km/l per the EPA scope:behavior scope:trip
score_events decimal Driving score for events scope:behavior scope:trip
score_speeding decimal Driving score for speeding scope:behavior scope:trip
hard_brakes integer Number of hard brakes scope:behavior scope:trip
hard_accels integer Number of hard accels scope:behavior scope:trip
duration_over_70_s integer Duration of trip spent over 70 mph scope:behavior scope:trip
duration_over_75_s integer Duration of trip spent over 75 mph scope:behavior scope:trip
duration_over_80_s integer Duration of trip spent over 80 mph scope:behavior scope:trip
vehicle_events string Vehicle events scope:trip scope:vehicle:events
start_timezone string Timezone at start of trip scope:trip
end_timezone string Timezone at end of trip scope:trip
city_fraction decimal Fraction of time spent in city scope:behavior scope:trip
highway_fraction decimal Fraction of time spent on highway scope:behavior scope:trip
night_driving_fraction decimal Fraction of distance spent driving at night scope:behavior scope:trip
idling_time_s integer Time when engine was idling scope:trip
tags string Trip's tags scope:trip

TripSummaryAddress Object

Name Type Description Scopes
name string Location name scope:trip
display_name string Pretty display of address scope:trip
street_number string Street number scope:trip
street_name string Street name scope:trip
city string City scope:trip
state string State scope:trip
country string Country scope:trip

TripTagCreate Object

Name Type Description Scopes
tag string scope:trip
created_at datetime scope:trip

TripTag Object

Name Type Description Scopes
tag string Tag scope:trip
created_at datetime Date when trip was tagged scope:trip

UserMetadata Object

Name Type Description Scopes
url string User Metadata URI scope:user:profile
user string User URI scope:user:profile
firmware_version string Firmware Version scope:user:profile
app_version string VehicleMind App Version scope:user:profile
os_version string OS Version scope:user:profile
device_type string Type of Device scope:user:profile
phone_platform string Phone platform scope:user:profile
is_latest_app_version boolean Latest app version installed scope:user:profile
authenticated_clients string List of clients that this user has authorized through OAuth scope:user:profile
is_staff boolean True if the user an VehicleMind staff user scope:user:profile

UserProfile Object

Name Type Description Scopes
url string User Profile URI scope:user:profile
user string User URI scope:user:profile
date_joined datetime Date user joined scope:user:profile
tagged_locations array Tagged location (i.e., home/work) scope:user:profile

User Object

Name Type Description Scopes
id string scope:public
url string User URI scope:public
username string Username scope:public scope:user:profile
first_name string First name scope:public scope:user:profile
last_name string Last name scope:public scope:user:profile
email string Email address scope:public scope:user:profile

VehicleMILHistory Object

Name Type Description Scopes
code string Malfunction indicator lamp code scope:vehicle:profile
on boolean Indicates if the light is on scope:vehicle:profile
created_at datetime Event time scope:vehicle:profile
description string Human readable description of the MIL scope:vehicle:profile

Vehicle Object

Name Type Description Scopes
url string Vehicle URI scope:public
id string scope:public
vin string Vehicle Identification Number scope:public scope:vehicle:vin
created_at datetime scope:public scope:vehicle:profile
updated_at datetime scope:public scope:vehicle:profile
make string Make (Honda, Chevy, etc.,) scope:public scope:vehicle:profile
model string Model (Civic, F150, etc.,) scope:public scope:vehicle:profile
year integer Year scope:public scope:vehicle:profile
submodel string Submodel (EX, Deluxe, etc.,) scope:public scope:vehicle:profile
display_name string Display name scope:public scope:vehicle:profile
fuel_grade choice scope:public scope:vehicle:profile
fuel_level_percent decimal Amount of fuel as percentage of total capacity scope:public scope:vehicle:profile
battery_voltage decimal Battery voltage scope:patron scope:public scope:vehicle:profile
active_dtcs string Currently active MILs scope:public scope:vehicle:profile

Webpage Errors

Status Error Message Description
400 err_bad_request Request is malformed.
401 err_unauthorized No token or an invalid token is attached to the request.
403 err_forbidden The token attached to the request doesn't have the scope needed to access this endpoint.
404 err_page_not_found The specified endpoint cannot be found.
409 err_conflict Conflict found.
422 err_unprocessable_data There is an issue processing the body of the request.
500 err_internal_error We have a problem with our server. Please try again later.
Connection refused Most likely cause is not using HTTPS.