Vehicles
On this page, we'll dive into the different vehicle endpoints you can use to manage them programmatically.
The Vehicle object
Vehicle objects represent a single vehicle in a commercial or personal risk profile. They contain the following properties and relationships:
Global Properties
These properties are available for all risk profile types.- Name
number
- Type
- int
- Filterable
- Sortable
- Description
The vehicle number
- Name
make
- Type
- nullable string
- Filterable
- Sortable
- Description
The vehicle's manufacturer
- Name
model
- Type
- nullable string
- Filterable
- Sortable
- Description
The vehicle's model
- Name
year
- Type
- nullable int
- Filterable
- Sortable
- Description
The vehicle's manufacture year
- Name
vin
- Type
- nullable string
- Sortable
- Description
The vehicle's Vehicle Identification Number
- Name
registration
- Type
- nullable string
- Filterable
- Sortable
- Description
The vehicle's registration number
- Name
registration_state
- Type
- nullable string
- Filterable
- Sortable
- Description
The state in which the vehicle is registered
- Name
cost_new
- Type
- nullable float
- Filterable
- Sortable
- Description
The cost of the vehicle when new
- Name
comprehensive_deductible
- Type
- nullable float
- Filterable
- Sortable
- Description
The comprehensive deductible for the vehicle
- Name
collision_deductible
- Type
- nullable float
- Filterable
- Sortable
- Description
The collision deductible for the vehicle
- Name
vehicle_use
- Type
- nullable enum
- Filterable
- Sortable
- Description
The vehicle's primary use
- Name
business
- Description
Business
- Name
service
- Description
Service
- Name
retail
- Description
Retail
- Name
commercial
- Description
Commercial
- Name
pleasure
- Description
Pleasure
- Name
farm
- Description
Farm
- Name
for_hire
- Description
For Hire
- Name
other
- Description
Other
- Name
- Description
None
- Name
notes
- Type
- nullable string
- Description
Any notes about the vehicle
- Name
image
- Type
- nullable string
- Description
The URL of the vehicle's image, if uploaded via the Wunderite UI
Commercial-only Properties
These properties are available only for commercial risk profiles.- Name
owning_entity
- Type
- nullable string
- Filterable
- Sortable
- Description
The legal entity UUID that owns the vehicle
- Name
driver_radius
- Type
- nullable enum
- Filterable
- Description
The radius within which the driver operates the vehicle
- Name
0_50
- Description
0-50 miles
- Name
51_200
- Description
51-200 miles
- Name
200
- Description
200+ miles
Personal-only Properties
These properties are available only for personal risk profiles.Meta
- Name
created
- Type
- timestamp
- Filterable
- Sortable
- Description
An ISO-8601 timestamp (UTC) indicating when the vehicle was created
- Name
updated
- Type
- timestamp
- Filterable
- Sortable
- Description
An ISO-8601 timestamp (UTC) indicating when the vehicle was last updated
- Name
has_vin_data
- Type
- bool
- Filterable
- Description
When
true
, indicates the vehicle has NHTSA data available
Global Relations
Learn more about including relations.- Name
attachments
- Type
- Attachment[]
- Name
attachments.uploader
- Type
- User
- Description
The user who uploaded the attachment
- Name
principal_garaging
- Type
- Address
- Filterable
- Sortable
Commercial-only Relations
Learn more about including relations.- Name
owning_entity
- Type
- Legal Entity
- Filterable
- Sortable
- Description
The legal entity that owns the vehicle. Only available for commercial vehicles.
List all vehicles
This endpoint allows you to retrieve a paginated list of all vehicles in the corresponding risk profile.
Each vehicle is returned as a vehicle object, corresponding with the risk profile type. See commercial-only properties for commercial vehicles, and personal-only properties for personal vehicles.
Filters and sorting
See the vehicle object for a list of all available filters and sorts.
Commercial-only filters
In addition to the filters available on the vehicle object, you can also filter commercial vehicles by a select number of their Owning Entity's properties.
Searchable
You can search for vehicles by providing a search query in the filter[search]
parameter.
The search query will be matched against a vehicle's VIN, make, model, registration, registration state.
For commercial vehicles, the search query will also be matched against it's owning entity name, FEIN, and DOT number.
- Name
owning_entity.name
- Type
- string
- Filterable
- Description
- The name of the owning entity
- Name
owning_entity.fein
- Type
- nullable string
- Filterable
- Description
- The FEIN of the owning entity
- Name
owning_entity.dot_number
- Type
- nullable string
- Filterable
- Description
- The DOT number of the owning entity
Request
curl -G https://app.wunderite.com/api/v1/risks/{risk}/data/vehicles \
-H "Authorization: Bearer {token}" \
-d filter[search]=5YFBU4EE6DP194022 \
-d per_page=50
Response
{ "data": [ { "object": "vehicle", "uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f", "data": { "owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9", "driver_radius": "51_200", "number": 1, "make": "Ford",
Create vehicles
This endpoint allows you to create new vehicles in the corresponding commercial or personal risk profile.
At least one vehicle object must be provided in the request body.
You can also create an address in the same request if you provide the principal_garaging
property.
Flags
Learn more about flags.
When creating a vehicle and providing a VIN number, Wunderite will automatically fetch the vehicle's VIN data from the NHTSA database.
By default, Wunderite will not fill in any fields on vehicles with the NHTSA data.
To insert available NHTSA data, set the flags.vin_data.fill
flag to true
.
By default, this will fill in the make
, model
, and year
fields.
To specify only a portion of those fields, use the flags.vin_data.only
flag.
- Name
flags.vin_data.fill
- Type
- bool
- Description
Defaults to
false
if not provided.Specify whether you want Wunderite to insert available NHTSA data on the vehicle. When
true
, all available data will be inserted unless otherwise specified byflags.vin_data.only
.
- Name
flags.vin_data.overwrite
- Type
- bool
- Description
Defaults to
false
if not provided.When enabled in conjunction with
flags.vin_data.fill
, vehicle fields that already have a value will be overwritten with the available NHTSA data. Whentrue
, all available data will be inserted unless otherwise specified byflags.vin_data.only
.
- Name
flags.vin_data.only
- Type
- enum[]
- Description
Defaults to
['make', 'model', 'year']
if not provided.Specify the fields you want Wunderite to automatically fill from the available NHTSA data.
When the flags.vin_data.fill
is not specified or is false
, VIN data will be fetched asynchronously.
This will result in meta.has_vin_data
on created vehicles being set to false
initially, until that asynchronous process completes.
Ping the GET vehicles endpoint to check meta.has_vin_data
for the latest status.
Optional global properties
See all available global properties in the vehicle properties section.
- Name
number
- Type
- nullable int
- Description
The vehicle's number. When this property is not provided, or uses a
null
value, the vehicle will be assigned a number automatically.
- Name
principal_garaging
- Type
- nullable Address
- Description
An address object that should be created with the vehicle
Optional commercial-only properties
See all available commercial-only properties in the vehicle properties section.
- Name
owning_entity
- Type
- nullable string
- Description
The owning entity of the vehicle. To find the UUID, you can use the GET legal entities endpoint.
Request
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/vehicles \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "vehicle",
"data": {
"owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9",
"driver_radius": "200",
"make": "Subaru",
"model": "Outback",
"year": 2020,
"vin": "1HGBH41JXMN109186",
"registration": "MYSUBA1",
"registration_state": "CA",
"cost_new": 43000,
"vehicle_use": "service",
"notes": "This is a test vehicle"
}
}
]
}'
Response
{ "data": [ { "object": "vehicle", "uuid": "0646049b-7fa0-4998-b69b-b3985ec581cf", "data": { "owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9", "driver_radius": "200", "number": 38, "make": "Subaru",
Request with sub resources
curl -X POST https://app.wunderite.com/api/v1/risks/{risk}/data/vehicles?include=principal_garaging \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "vehicle",
"data": {
"owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9",
"driver_radius": "200",
"make": "Subaru",
"model": "Outback",
"year": 2020,
"vin": "1HGBH41JXMN109186",
"registration": "MYSUBA1",
"registration_state": "CA",
"cost_new": 43000,
"vehicle_use": "service",
"notes": "This is a test vehicle",
"principal_garaging": {
"object": "address",
"data": {
"street_number": "123",
"address1": "Main St",
"city": "Boston",
"state": "MA",
"zip": "02108"
}
}
}
}
]
}'
Response
{ "data": [ { "object": "vehicle", "uuid": "261fe57d-c974-4c97-83ea-7b155287bb27", "data": { "owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9", "driver_radius": "200", "number": 38, "make": "Subaru",
Update vehicles
This endpoint allows you to perform bulk updates on vehicles in the corresponding commercial or personal risk profile.
At least one vehicle object must be provided in the request body. Each object must contain at least one property from the vehicle properties section.
Properties that are not provided will not be updated.
To clear a nullable property, provide a null
value.
You can also update / create an address in the same request if you provide the principal_garaging
property.
Flags
Learn more about flags.
When updating a vehicle and providing a new VIN number that is different than the vehicle's current VIN, Wunderite will automatically fetch the vehicle's VIN data from the NHTSA database.
By default, Wunderite will not fill in any fields on vehicles with the NHTSA data.
To insert available NHTSA data, set the flags.vin_data.fill
flag to true
.
By default, this will fill in the make
, model
, and year
fields.
To specify only a portion of those fields, use the flags.vin_data.only
flag.
- Name
flags.vin_data.fill
- Type
- bool
- Description
Defaults to
false
if not provided.Specify whether you want Wunderite to insert available NHTSA data on the vehicle. When
true
, all available data will be inserted unless otherwise specified byflags.vin_data.only
.
- Name
flags.vin_data.overwrite
- Type
- bool
- Description
Defaults to
false
if not provided.When enabled in conjunction with
flags.vin_data.fill
, vehicle fields that already have a value will be overwritten with the available NHTSA data. Whentrue
, all available data will be inserted unless otherwise specified byflags.vin_data.only
.
- Name
flags.vin_data.only
- Type
- enum[]
- Description
Defaults to
['make', 'model', 'year']
if not provided.Specify the fields you want Wunderite to automatically fill from the available NHTSA data.
When the flags.vin_data.fill
is not specified or is false
, VIN data will be fetched asynchronously if a new VIN is provided when updating a vehicle.
When the flags.vin_data.fill
is true
, VIN data will be filled into the fields. This will not be reflected in the response immediately.
Ping the GET vehicles endpoint to get the latest values, and to check meta.has_vin_data
for the latest status.
Optional global properties
See all available properties in the vehicle properties section.
- Name
principal_garaging
- Type
- nullable Address
- Description
An address object that should be created / updated with the vehicle
Optional commercial-only properties
- Name
owning_entity
- Type
- nullable string
- Description
The owning entity of the vehicle. To find the UUID, you can use the GET legal entities endpoint.
Request
curl -X PATCH https://app.wunderite.com/api/v1/risks/{risk}/data \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "vehicle",
"uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f",
"data": {
"owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9",
"driver_radius": "51_200",
"number": 1,
"make": "Ford",
"model": "Fusion",
"year": 2011,
"vin": "1FAHP2DW4BG193388",
"registration": "Y4B2T8",
"registration_state": "CA",
"cost_new": "20000.00",
"comprehensive_deductible": "500.00",
"collision_deductible": "1000.00",
"vehicle_use": "commercial",
"notes": null,
"image": null
}
}
]
}'
Response
{ "data": [ { "object": "vehicle", "uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f", "data": { "owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9", "driver_radius": "51_200", "number": 1, "make": "Ford",
Request with sub resources
curl -X PATCH https://app.wunderite.com/api/v1/risks/{risk}/data \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "vehicle",
"uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f",
"data": {
"owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9",
"driver_radius": "51_200",
"number": 1,
"make": "Ford",
"model": "Fusion",
"year": 2011,
"vin": "1FAHP2DW4BG193388",
"registration": "Y4B2T8",
"registration_state": "CA",
"cost_new": "20000.00",
"comprehensive_deductible": "500.00",
"collision_deductible": "1000.00",
"vehicle_use": "commercial",
"notes": null,
"image": null,
"principal_garaging": {
"object": "address",
"data": {
"street_number": 123,
"address1": "Test Street",
"address2": null,
"city": "Boston",
"state": "MA",
"zip": "08077",
"county": "Suffolk",
"lat": 0,
"lng": 0
}
}
}
}
]
}'
Response
{ "data": [ { "object": "vehicle", "uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f", "data": { "owning_entity": "83eae6d0-5c59-4289-9736-a2393c4b5ae9", "driver_radius": "51_200", "number": 1, "make": "Ford",
Delete vehicles
This endpoint allows you to bulk delete risk data, including vehicles.
At least one vehicle object must be provided in the request body to delete the corresponding vehicle.
Required properties
- Name
object
- Type
- string
- Description
The object type of the data to delete. Must be
vehicle
in this case.
- Name
uuid
- Type
- string
- Description
The UUID of the vehicle to delete
Request
curl -X DELETE https://app.wunderite.com/api/v1/risks/{risk}/data \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-d '{
"data": [
{
"object": "vehicle",
"uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f"
}
]
}'
Response
{
"data": [
{
"object": "vehicle",
"uuid": "a2ed3810-c5b6-44a0-af0f-37772761d02f",
"profile_type": "commercial"
}
]
}