Sandbox webhook not recieved

Hi ,
I’m trying to create a webhook for the delivery event on sandbox but i don’t think my webhook is used. Just in case i configured my webhook to send me all events but i don’t receive anything, can you tell me if the webhook is sent on your side ?

ClientId : 451990

Hello.

Thank you for your message.

We are sending them, encountering one error : headers 'HTTP/1.1 400 Bad Request with one of the calls.

I send you by private message the webhook logs.

You can configure the headers and check the current setting in your Dashboard. Check out the webhook set up guide. You can also configure them by API using this endpoint.

Best,

Hello,
Thank you for your response, i actually see what is wrong now, i’m not using the right ID. Thanks to the webhook i receive something that looks like this for example :

{
"event":"delivery",
"type":"update",
"data":{
"id":100395073,
"trackingUrl":"https:\/\/stuart.sandbox.followmy.delivery\/XXXXXX",
"clientReference":"",
"driver":{
"status":"busy",
"latitude":48.859680179999998,
"longitude":2.3675599100000002,
"name":"Example Name",
"firstname":"Name",
"lastname":"LastName",
"phone":"+33300000000",
"picture_path_imgix":null,
"transportType":{
"code":"bike"
}
},
"status":"delivering",
"transportType":{
"code":"bike"
},
"packageType":null,
"etaToDestination":"2022-10-24T11:02:51.000+02:00",
"etaToOrigin":"2022-10-24T10:59:45.000+02:00",
"cancellation":{
"canceledBy":null,
"reasonKey":null,
"comment":null
}
}
}

When i create the job in my code i get an iD in the response that i store to compare it later to the id that i receive in the above json (100395073 here). However it seems they are not the same thing. From what i understand the one i save is the job Id and this one might be the delivery Id. Do you know how i can make a connection between the two ? Is there a way for me to get the deliveryId at some point ?

Hello @ThomasLs,

Thank you for coming back to us with your findings.

Indeed, there are two different ID’s returned when you create a job with us, the Job ID and the Delivery ID. Note that one job can have more than one delivery.

In the job creation response example of our API documentation, you can find the delivery ID as seen below:

"deliveries": [
    {
      "id": 100247837,

Depending on your other API endpoint usage, you may need to store both the job ID and the Delivery ID.

Nevertheless, we would actually recommend tracking your webhooks using your own unique 'client_reference' identifier to ensure you don’t loose track of your order. For more details please see “Manually_stacked”, what happened to my order?

Let us know if you have any questions or require further clarifications.