Setting Up Webhooks
The following guide will help you to create your own webhooks to track changes for orders, ASNs, inventory adjustments, etc.
In order to test your webhooks, start by setting up a local environment and using ngrok to expose the port of your application
- You can install ngrok at their website located at https://ngrok.com/
- Next, go to https://app.shippingtree.co/company/webhooks/ and you will see a list of your application's webhooks.
- Click Add Webhook and detail the URL of your application with the specific endpoint which will receive the data of the changes made from us. In the test example, we would use the ngrok URL from above.
Depending on the event type that will trigger the webhook, you will receive a POST with the object every time a record is added or updated from our servers.
- In order to confirm that your webhook is correctly set up, you need to return a 200 status code when receiving a POST from us. If you have more than 5 continuous events without returning 200 we will lock your webhook. We will then send the same call 3 times until we successfully receive an OK response.
If you want to confirm that your webhook is set and able to receive data from us, you can click Test webhook under the webhook modal to validate that a request has been sent.
Updated over 1 year ago