Webhooks are a gateway to receiving valuable information when it happens, rather than continually polling for that data. In the case of multiple events, various URLs have to be specified. Motive will then POST data to those URLs when the events occur.
Follow the link below to find the currently supported actions and their payloads on the Webhooks developer documentation:
developer.gomotive.com/reference/introduction#webhooksdeveloper.keeptruckin.com/reference#webhooks
Some of the common use cases of Webhooks are:
- Vehicle Location Updates: If you want to be notified whenever a vehicle’s current location updates, subscribe to the vehicle_location_updated action.
- Fault Code Opened: If you want to receive a notification any time a new fault code is opened on a vehicle, subscribe to fault_code_opened action.
- Fault Code Closed: If you want to receive a notification whenever an existing fault code is closed on a vehicle, subscribe to fault_code_closed action as it gets triggered whenever an existing fault code is closed on a vehicle.
Creating Webhooks in Fleet Dashboard
1. Log in to the Motive Fleet Dashboard and click the Admin icon.
2. Click Developers.
3. From the Webhooks tab, + Create webhook.
4. Fill in all the required information with the following attributes:
- Name: The name for the webhook
- URL: Address that the webhook makes an HTTP Post request to
- Secret: 20-character code to ensure that the request was sent by Motive servers and has been modified in-flight
- Event: Action that you want to get notified about (i.e., HOS Violation)
5. Once the form has been filled, click Save.
Share this with others