I’m using the shopify-api-node module to POST an order fulfillment (docs)
422 http error is thrown when creating a fulfillment for one specific order for a merchant. I have the order JSON saved should that be of assistance. Here is a snippet from the thrown error:
Everything else in the order json appears fine, so it is puzzling why this order failed. Is it possible for the Shopify support team examine logs for this order? I can supply an order ID.
Thanks for the report @bansavage , @bterry Order IDs will definitely help, if you could post them here that would be great. Another thing to help us troubleshoot would be the X-Request-ID you receive in response from your API call that fails.
This does look like an issue, and we are investigating. We are going to implement a change shortly that we believe will fix these 422 errors. It looks like they are occurring in situations where your apps are attempting to create a fulfillment with some lines items that are marked as require_shipping: true and others with require_shipping: false.
Let me know if you are still encountering this issue moving forward as hopefully this change will prevent the error from re-occurring.
I found the problem is that you have to first accept the fulfillment request from your fulfillment service before creating the fulfillment.
Check out the acceptFulfillmentRequest mutation here. I don’t believe it’s possible to accept a fulfillment request through the REST API, but could be wrong.