We are successfully creating jobs using the Stuart API. However, in some cases the job is created (example Job ID: 100895047), but it remains stuck at the status “Contacting couriers” and no courier is ever assigned.
Could you please confirm:
-
Is this due to a courier availability issue in that area (23 Ethelbert Rd, London SW20 8QD, UK)?
-
Is there any way to programmatically detect if a job will fail to be assigned (so we can notify our users earlier)?
Hi Krinal,
Thank you for reaching out.
The status “Contacting couriers” means the job is stuck in pending because no courier has been assigned yet.
This can occasionally happen in sandbox, as we’ve had some issues with the courier-assigning bot there — but we’re working on improving it. In production, there are no supply issues in the area, and even in sandbox, it should generally work. For example, I tested this morning (with an identical job payload as yours) and my job was delivered successfully.
That said, if no courier becomes available (both in production and Sandbox), the job will expire after a configured expiration interval (currently 1h30m). When that happens, we send a cancellation webhook with the reason job expired.
If you’d like to test this scenario, you can also trigger it directly via the dashboard, via the “Testing Scenarios” menu..
Let me know if you have any further questions.
Best,
Tasnim
Hi Tasnim,
I tested the Testing Scenarios from the Stuart dashboard (e.g., Expired package), but it does not behave as expected. Even when I select a failure scenario, the job continues on the happy path and gets delivered normally.
Could you please confirm if this is a known sandbox issue? Also, is there any reliable way to force trigger scenarios like <reason:job_expired> for testing purposes, or should we simulate the webhook manually on our side?
Thanks in advance for your support.
Best regards,
Krinal
Hello Krinal,
I can confirm that the testing scenario feature on our Sandbox dashboard is currently experiencing some bugs and not working as expected. This issue has been identified and escalated to our dev team.
That said, please note there may be some delays in the rollout of the fix, as our team is currently operating with limited resources while several members are on leave.
Regarding the package expiration: normally, you should receive a cancellation webhook (v3) containing the cancellation key job_expired. You can find an example payload in our API documentation, and you should be able to test it on your end.
Please let me know if you need any further support.
Thanks,