When calling the shopify admin complete draft order api e.g (PUT "admin/api/2022-04/draft_orders/23423424/complete.json"), we are the following error "422 unprocessable entity, error : another staff member is processing this draft order. Check back in a minute ".
May i know how to resolve this error?
Hey @eragon - generally that error message reflects that either another staff member or app is currently processing the draft order as it indicates. Another reason for this could be that the app is somehow sending multiple requests and causing the system to think the draft order is already being worked on. If this issue is still occurring regularly, and you are sure that your app isn't concurrently trying to access the order multiple times or that it isn't being processed by a staff member of the store/another order management app, can you reach back out here?
If you do reach out - could you also share an X-Request-ID that should be present in the response headers for the error message? This will help us track down if this is an issue on our end and we can look into this further.
Hope this helps - please get back in touch if the error persists if you can confirm the issue isn't just that other user or app is dealing with draft orders concurrently with your app.
Al | Shopify Developer Support