We are using the shopify_api gem (https://github.com/Shopify/shopify_api) to make REST API requests through our private apps. Some of our requests to cancel or complete fulfillments fail with the 422. The response error messages do not tell us what the problem is. I do not know how to get the X-Request-Id when using this gem so I can't provide that but I can provide order and fulfillment IDs of requests that are failing in a private chat/email. Please advise.
Solved! Go to the solution
We are using one of the latest versions of the shopify_api gem
gem 'shopify_api', '~> 9.0', '>= 9.0.1'
I have confirmed that the private app we setup for this customer has the Read and Write access for the fulfillments Admin API. We are using these credentials to make requests.
Here is the request method and path ActiveRecord is using that returns the 422:
This is an accepted solution.
Re-posting from the other forum thread for visibility:
As of API Version 2020-01, Shopify did update how it handles fulfillments and fulfilling orders. There is a new resource introduced (FulfillmentOrders) that represents the groups of line items in an order that are fulfilled together and this resource gives you more control over managing fulfillment. There are also new access scopes your apps will need to use this resource. For a detailed guide on the new workflow in API Version 2020-01, please read this guide: https://shopify.dev/tutorials/manage-fulfillments-with-fulfillment-and-fulfillmentorder-resources
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution