Prerequisites: Creating Your Application
Before implementing preventive maintenance capabilities ensure you have:- Created a Smartcar account and registered your application to obtain your
client_id
andclient_secret
. - Set up the Smartcar Connect flow to authenticate and authorize users.
For more details, refer to the Getting Started Guide.
Smartcar API Endpoints for Preventive Maintenance
Use the following endpoints to build your preventive maintenance solution:1. Track Odometer Readings
Retrieve odometer data to schedule maintenance services such as tire rotations or oil changes based on mileage.Odometer
Example Response
2. Monitor Engine Oil Life
Retrieve oil life data to prompt users when an oil change is due.Engine Oil Life
Example Response
3. Retrieve Diagnostic Trouble Codes (DTCs)
DTCs help you identify and diagnose specific vehicle issues, allowing for quick and accurate repairs.DTCs
Example Response
4. Monitor Vehicle System Status
Retrieve a snapshot of key systems like the engine and battery to assess health and detect anomalies.System Status
Example Response
Webhooks for Preventive Maintenance
Webhooks enable real-time notifications for certain vehicle events, reducing the need for polling. Examples include:- DTC Updates: Receive a webhook when a new trouble code is logged.
- System Changes: Get updates for changes in engine or battery status.
Setting Up Webhooks
To receive real-time notifications (e.g., when new DTCs appear), consider setting up webhooks:- Create a Webhook: Configure a secure endpoint on your server to handle POST requests from Smartcar.
- Register the Webhook: Specify which events (such as DTC) you want to subscribe to.
- Instant Alerts: When an event triggers, Smartcar sends a payload to your endpoint, enabling immediate responses (like sending notifications or scheduling service).
See the Smartcar Webhooks Documentation for more information.
Example Workflow
- Authorization: The user logs in via Smartcar Connect to grant access to vehicle data.
- Monitoring: Your backend polls GET endpoints (e.g., odometer, oil, system status) or listens for webhook events.
- Threshold Detection: Evaluate data (e.g., oil life < 20%, mileage > 5,000 miles) and identify DTCs or system warnings.
- Notifications: Send push notifications, emails, or SMS to users with maintenance reminders or alerts.
- Ongoing Updates: Combine periodic polling and webhooks to ensure vehicles stay road-ready.
FAQs
Do all vehicles support these endpoints
Do all vehicles support these endpoints
No. Data availability depends on the OEM, model, and year. Check the
Compatible Vehicles
page for details.
Can I use webhooks for real-time updates?
Can I use webhooks for real-time updates?
Yes, webhooks can be used for supported events such as DTC updates or
system status changes.