Webhook Integration

Hi,
I’m new to webhook integration. I have set the Webhook V2 URL in my sandbox dashboard. how I get the response from Stuart? Could you please help me,?

ThankYou…

Hello @Lendress1,

A webhook integration is a way for our servers to tell your servers that there has been an update in one of the jobs you created.

Every time there’s an update, you’ll receive an HTTP call to the endpoint you configured in the dashboard.

Could you please explain what are you trying to achieve?

Thanks,

I got the response as “Too many requests”.The following is my script.
Client ID:409630

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => “http://34.87.173.64/en/api/v2/stuartWebhooks”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => "{“event”:“delivery”,“type”:“create”,“data”:{“id”:100078480,“driver”:null,“transportType”:{“code”:“bike”},“packageType”:{“code”:“small”},“etaToDestination”:null,“etaToOrigin”:null,“status”:“pending”,“trackingUrl”:"https://stuart.followmy.delivery/{DeliveryId}/{Hash}",“clientReference”:null}}",
CURLOPT_HTTPHEADER => array(
“content-type: application/json”
),
));

$response = curl_exec($curl);

$err = curl_error($curl);

curl_close($curl);

if ($err) {
print_r(“cURL Error #:” . $err);
} else {
print_r( $response);
}

Could you please tell me where I went wrong?

Hello @Lendress1,

What are you trying to achieve with this PHP script?. All you have to do in our dashboard API settings is to configure the endpoint in which you expect us to send the HTTP calls.

If you want to create deliveries, you have to do calls to this endpoint right after authenticating.

Let me know if I can help you further.

Actually, I have set the Webhook V2 URL as http://demo.lendress.com/en/api/v2/stuartWebhooks in my sandbox. but I couldn’t get any updates. when I try to call this URL from my postman, it returns “Too many requests”.

Client ID:409630

Hello @Lendress1,

From my side, if I run this command:

curl -X POST http://demo.lendress.com/en/api/v2/stuartWebhooks -v
Your server is responding a 200 correctly. So I cannot reproduce the 429 you are mentioning.

On the other side, can you set up SSL on this endpoint and update the webhook URL accordingly?

Thanks,

I am sending the test payload to the same address (https://demo.lendress.com/en/api/v2/stuartWebhooks) I have specified in the sandbox - but get nothing from your system.

Hello @Lendress1,

I recommend you, in order to see the payloads we send, to visit https://webhook.site/#!/ and set up their webhook URL in our dashboard API settings. This way you’ll see the different events and the payloads we send for every update.