Development discussions around Shopify APIs
When trying to use the fulfillment orders API, we are getting the following error message.
{"errors":"The api_client does not have the required permission(s)."}
What permissions are needed for this?
Hey @Gabe8
Sorry about the delay. It looks like the issue here is a permissions one. Take a look at: https://shopify.dev/api/admin/access-scopes
It looks like your app requests "read_assigned_fulfillment_orders" but this would only show fulfillment orders assigned by a fulfillment service associated with your app. In this case, it looks like the fulfillment orders are generated for merchant managed locations by Shopify, so I believe you need the scope "read_merchant_managed_fulfillment_orders".
Kevin_A | Solutions Engineer @ 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 Shopify.dev or the Shopify Web Design and Development Blog
Hi @Kevin_A ,
That was it! Can't thank you enough!
But to be honest, I don't really understand this concept of "merchant-managed locations" vs other kinds of locations (fulfillment service managed?), even though I have read through lots of documentation pages about locations. Is there anything you can suggest which clarifies this for me?
Thank you,
Gabe
Hey @Gabe8
Basically it comes down to where the fulfillment order originated from. The merchant managed scope is for any product not managed by a fulfillment service where Shopify assigns the fulfillment order based on the locations the merchant has setup. The merchant sets location priority for fulfillment, and controls the inventory levels for the products and then we do some magic to determine which location a fulfillment order should be assigned to. The other two fulfillment order scopes are for fulfillment orders made through a fulfillment service (either third party, or one that is associated with your app).
If you want to learn more about how apps can handle fulfillments I would take a look at these guides:
https://shopify.dev/apps/fulfillment/fulfillment-service-apps
https://shopify.dev/apps/fulfillment/order-management-apps
Kevin_A | Solutions Engineer @ 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 Shopify.dev or the Shopify Web Design and Development Blog
so I believe you need the scope "read_merchant_managed_fulfillment_orders".
How is this added?
Hi Kevin,
I am also having the same problem. This is my x-request-id response:
e6568e7b-6148-4c8c-b62f-d727f81419c7
Can you please help me out?
I had all the suggested permissions and was still getting the error. I ended up scraping the permissions page and added a bunch until it worked. One of these did the trick:
read_all_orders
read_inventory
write_inventory
read_locations
write_merchant_managed_fulfillment_orders
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023