My Products
Magnus Vadla

shipment_changed webhook fires prematurely?

by Magnus Vadla

I was not able to reproduce this behavior in test, but for one of our live companies we are experiencing the following.


Shipment is confirmed (through the API), but it fails to save because of duplicate serial numbers. Shipment confirmed webhook is still sent.


My solution to this was to add a check in my code for the shipment status in the shipment GET. If the shipment is still Open I abort the process.


My issue now is sometimes this shipment GET shows status Open even though the shipment was successfully confirmed.


Is this intended behavior? Am I supposed to await a background operation?

Magnus Vadla

by Magnus Vadla

Will it help if I provide examples of this happening? NotificationID and maybe clientId?

by Magnus Johnsen


We haven't been able to replicate the exact same behaviour, however the salesOrder webhook is sent as soon as the shipment confirmation is sent, we'll check if it is intended to be this way.

There is a background operation, currently there is no way of getting notified when this operation has succeeded or failed, your only notified in the response that the operation has been queued.