Currently, we want to send our customer the custom_tracking_url from your update webhook. In most of our orders, we have many items in it and they might be sent by different shipment which means different custom_tracking_url. Would the webhook feature send multiple request for different shipments when you get a new custom_tracking_url? Or how would your webhook handle for this kind of situation? Thanks!
Hi @vegeman!
That is correct, there should be one Shipment Update webhook per shipment. This means if two different Shipments have two different Tracking URLs you should receive two Webhooks (one per shipment) with their corresponding Tracking URLs.
Let us know if that doesn’t help.
Thanks in advance!
Tom
Another follow up question, would the payload of the webhook tells us the particular goods of this shipment? Like, we have A, B, C, D in an order and the first shipment only carry A and B. Could we know that detail of the webhook?
Hello @vegeman !
Yes, it will, exactly as you said, in each shipment, you will only see the items from that order shipped in it.
In this link, you can check the full payload of the webhook: https://developer.shiphero.com/webhooks#shipment-update-webhook
Line items will have inside one entry for each line item shipped in that shipment with all its fields. You should expect something like this: "line_items": [{line item 1 fields},{line item 2 fields},{line item 3 fields}].
Please let us know if that helped.
Have a nice day!
Tomas
Yes, I’m talking about shipment webhook and I double check with my colleague that appended date string was made by them.
Besides that, we have another related issue about webhook topic. We are using your update webhook to trigger our notification email to our customer but sometimes we received the same request twice in the same time and it is the same tracking url. Why does it happen and could we adjust it? Thanks!
Hello @vegeman!
I hope you are doing well.
Yes, you are right. I just saw those other SKUs with the appended dates. Was it an attempt to track lots/expiration dates?
I will run some tests on my end to see if the same thing happens to me. Could you share with me and order with which this has happened? You can send it by private message if you want.
Best,
Tomas
You can see the latest order 378 & 379. I also looked up the request log of order 379:
2021-11-17 14:56 +00:00 HTTP/1.1 200 34 - 0.483 ms
2021-11-17 14:57 +00:00 HTTP/1.1 200 34 - 0.494 ms
As we can see, our server responds to your status 200 instantly but gets another same request within 30s…
Hello @Vegeman!
I can see what you’re explaining. It seems we are sending two shipment update notifications per request, not because we are not receiving your 200s. I think they are being enqueued at the exact second, so the second one goes through anyway, no matter your answer.
These orders, are you creating them with the API or manually? Or is it both?
Bets regards,
Tomas