Monitor Vehicles
Monitor Vehicles
In this guide, we will create a vehicle monitorable to allow us to monitor events for a vehicle.Overview
Monitorables are people, places, or things that you want to monitor for events and alarms. Vehicle monitorables are used to track and monitor vehicles, enabling use cases such as fleet management and stolen vehicle recovery.
Getting Started
Before creating a vehicle monitorable, you need an application with the monitorable:write scope. If you haven't created an application yet, see the Create Application API Reference to get started.
Once you have your application credentials, use the Set Access Token button in the navbar to configure your access token for making API requests.
Create a Vehicle Monitorable
To create a vehicle monitorable, send a POST request to the /monitorables endpoint with the vehicle information:
Response
Upon successful creation, you'll receive a response containing the vehicle monitorable details:
{
"id": "7a60216c-5512-467a-8d70-6b5ccc7c9b7d",
"partnerId": "550e8400-e29b-41d4-a716-446655440000",
"externalId": "ext-vehicle-abc123",
"type": "VEHICLE",
"verificationStatus": "VERIFIED",
"systemStatus": "INACTIVE",
"picEnabled": false,
"keys": [],
"requirements": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"monitorableId": "7a60216c-5512-467a-8d70-6b5ccc7c9b7d",
"type": "NUMBER_OF_CONTACTS",
"status": "COMPLETE",
"stage": "PRE_ACTIVATION",
"responsibleParty": "CUSTOMER",
"count": 1,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"documents": [],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
Contact Ordering
Contacts serve as the call escalation list used by monitoring agents and emergency services when a vehicle alarm occurs. Use the optional order field on each contact to control the sequence in which contacts are attempted — order: 1 is tried first, then order: 2, and so on.
When order is omitted on create, the platform assigns based on the contact's position in the request array. When adding a new contact on update without order, the next available value is assigned. Each contact must have a unique order — duplicates are rejected with a 400 error. Exactly one contact must be PRIMARY, and that contact needs an email. See Contact type.
{
"type": "VEHICLE",
"contacts": [
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15551110001",
"emailAddress": "john.doe@example.com",
"contactType": "PRIMARY",
"preferredLanguage": "en-US",
"order": 1
},
{
"firstName": "Jane",
"lastName": "Doe",
"phoneNumber": "+15551110002",
"emailAddress": "jane.doe@example.com",
"contactType": "EMERGENCY",
"preferredLanguage": "en-US",
"order": 2
}
]
}
See Contact Ordering in the Monitorables concept guide for a full explanation.
Activate the Monitorable
After creating the monitorable, you need to activate it before events can be created. The monitorable must have a status of PENDING_REQUIREMENTS or VERIFIED and meet all activation requirements such as required contacts.
Send a POST request to the /monitorables/:monitorableId/activate endpoint:
Conclusion
You've successfully created and activated a vehicle monitorable in the Hyperion platform. The vehicle monitorable can now be used to track events for the vehicle.
Next Steps
Now that you have a monitorable, you can start creating events for it. See the Create Events guide to learn how to send events for your monitorable.
Learn More
Related Concepts
- Monitorables - Understanding monitorable types and fields
- Events - Creating events for monitorables
API Reference
- Create Monitorable - Create a new monitorable
- Get Monitorable - Retrieve monitorable details
- List Monitorables - List all monitorables
- Update Monitorable - Update monitorable details