Covers all questions related to inventory management, order fulfillment, and shipping.
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:
{ HTTPError: Response code 422 (Unprocessable Entity) at stream.catch.then.data (/Users/{localusername}/Projects/{projectname}/node_modules/got/index.js:386:13) at process.internalTickCallback (internal/process/next_tick.js:77:7) name: 'HTTPError', host: undefined, hostname: 'wholelattelove.myshopify.com', method: 'POST', path: '/admin/orders/998723125302/fulfillments.json', protocol: 'https:', url: undefined, statusCode: 422, statusMessage: 'Unprocessable Entity'
The order consists of 3 items. 1 is physical. 2 are digitial. Thus, the line items are grouped into was looks like two separate "unfulfillments":
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.
I am having the same issue, any isight would be helpful, as this just started today, and hasn't been an issue for the last month.
The response that I get back is a 422 Unprcoessable Entity, with the body of the response as:
{
"errors": {
"base": [
"An error occurred, please try again"
]
}
}
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.
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Sure, here are some of my orders:
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.
EDIT: This was fixed 07-17-2019
Ryan | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
@Ryan wrote: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.
EDIT: This was fixed 07-17-2019
Hi Ryan,
We're currently facing this error, still: base - An error occurred, please try again
The order got error has only one time with require_shipping: false. Could you please help to identify why it happened?
I am suffering the same problem but with a single item on a test website:
Result
422 Unprocessable Entity
{
}
Fulfillment Order
"fulfillment_orders": [
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.