Webhooks Locate2u API
What are Webhooks?
Webhooks are automated notifications sent from Locate2u to your specified URL when certain events occur within our system. Instead of polling for updates, webhooks allow real-time data delivery, ensuring you are always up-to-date with the latest information.
How Webhooks in Locate2u Help Customers
Webhooks in Locate2u provide seamless integration possibilities, allowing you to receive instant notifications about critical events that matter to your operations. By configuring webhooks, you can streamline your workflows by responding promptly to changes within the platform.
Event Types for Webhooks
Locate2u supports various event types to cater to different operational needs:
- stop.assigned
- Triggered when a stop is assigned.
- stop.status-changed
- Triggered when the status of a stop changes.
- shipment.assigned
- Triggered when a shipment is assigned.
- shipment.status-changed
- Triggered when the status of a shipment changes.
- trip.status-changed
- Triggered when the status of a trip changes.
- trip.created
- Triggered when a new trip is created.
- note.created
- Triggered when a note is created. A note can be a text, image or document which is attached to a stop or a shipment.
- trip.assigned
- Triggered when a trip is assigned.
How to Use Webhooks
Integrating webhooks with Locate2u is straightforward. Simply provide us with the URL where you want the webhook notifications to be sent, and choose the events you are interested in receiving. Our system will ensure that you receive timely updates whenever these events occur.
Integration with Webhooks
Zapier Integration
If you prefer using Zapier for integration, currently, only the “stop.status-changed” webhook event is supported. Here is the guide on how to integrate stop status change using Zapier.
Manual Integration
For manual integration, follow these steps:
- Create Webhook Endpoint:
- Set up an endpoint on your server or use any service like Hookbin (for testing purposes) to receive webhook notifications.
2. Subscribe to Webhook Event:
- Subscribe to the “stop.status-changed” event in Locate2u’s webhook settings.
- Provide your endpoint URL where Locate2u should send notifications.
- Make a POST call to the api/v1/webhooks endpoint with two parameters : “eventType” and “url”.
3. Confirmation:
- Once subscribed, Locate2u will send a POST request to your endpoint URL.
- Your endpoint should respond with a 201 HTTP status code to confirm the subscription.
4. Testing:
- Trigger a “stop.status-changed” event in Locate2u (e.g., change the status of a stop).
Check your endpoint (e.g., Hookbin) to see if it receives the webhook payload.
5. Refresh and Verify:
- After triggering an event in Locate2u, refresh your endpoint page (Hookbin) to view the webhook payload and verify integration.
Benefits of Integration
Integrating with Locate2u via webhooks provides real-time updates and seamless automation of your workflow. Whether using Zapier for simplicity or setting up manually for more control, you can enhance operational efficiency and responsiveness.
Get Started Today
Choose the integration method that best suits your needs and start leveraging the power of webhooks with Locate2u to streamline your operations effectively. See below for the list of Locate2u webhook URLs.
Method | URL | Description |
GET | https://api.locate2u.com/api/v1/webhooks | List of all of your subscribed webhook and which url are listening to the webhook. |
POST | https://api.locate2u.com/api/v1/webhooks | Subscribe to a Locate2u webhook by providing the event and your url listening to it. |
GET | https://api.locate2u.com/api/v1/webhooks/{id} | Retrieve the detail of one of the webhook event (provided in the {id}). |
DELETE | https://api.locate2u.com/api/v1/webhooks/{id} | Unsubscribe to a Locate2u webhook (provided in the {id}). |
Request parameters:
Parameter Name | Description |
eventType | The event type in Locate2u which you want to subscribe or unsubscribe to. |
url | Your web’s URL which is listening to the subscribed webhook event. |