As alluded to in our API documentation, it is possible to identify the point in which a driver is ‘unassigned’ from your job through our webhooks.
What do we mean by ‘unassigned’?
For various reasons, a driver who is assigned to your job may be unable to fulfil it, meaning it needs to be assigned to another driver. You can find the reason keys for such reassignment events here.
As an integrator you may be interested in identifying the point when the current driver is ‘unassigned’ from the job and the assignment of a new driver has begun. As an example, maybe you want to manage your end customer expectations in some way based on this information.
In what ways can we identify this driver unassigned event?
Alongside the relevant cancellation reason keys the following changes can also be recognised:
Delivery Update Event Webhooks:
When the delivery update webhook event received has a ‘pending’ status and the ‘cancellation.reasonKey’ is not null we can determine that the driver is being reassigned.
Driver object in webhooks:
When the driver is no longer assigned to the order, the driver object will also be null.