API Reference
Webhooks
Webhooks
Webhooks offer an efficient way to receive real-time notifications about events in the Hapn platform. Instead of constantly polling API endpoints for updates, developers can subscribe to specific events and receive notifications as they occur. This greatly reduces unnecessary API calls and allows for more efficient use of resources.
The following example shows the payload of an ignition event.
Example
{
"messageId": "cb44ad2a-6096-4a37-93a9-41b4882593e9",
"imei": "015181000393760",
"type": "GTVGN",
"sendTime": "2020-02-25T18:09:10.000Z",
"gpsUTCTime": "20200225180852",
"latitude": 26.111229,
"longitude": -81.757925,
"odoMileage": 2918.4,
"speed": 0,
"batteryPercentage": 88,
"ignition": "ON"
}
Endpoints
Manage webhooks through the following endpoints:
- Get Webhooks Get a list of all the webhook subscriptions in the account.
- Create Webhook Create a new webhook subscription.
- Delete Webhook Delete an existing webhook subscription.
- Update Webhook Update an existing webhook subscription.