fulfillment orders returning {"errors":"The api_client does not have the required permission(s)."}

browntaped
Tourist
7 0 4

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)."}

browntaped_0-1595821316303.png

What permissions are needed for this?

Replies 29 (29)
Gabe8
Shopify Partner
10 0 0

Hi @Kevin_A ,

Were you able to find out anything?

 

Thank you,

Gabe

Kevin_A
Shopify Staff
Shopify Staff
318 42 61

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

Gabe8
Shopify Partner
10 0 0

Hi @Kevin_A ,

Great! I will give that a try.

Thank you,

Gabe

Gabe8
Shopify Partner
10 0 0

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

Kevin_A
Shopify Staff
Shopify Staff
318 42 61

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

sumjoekin
Shopify Partner
8 0 1

so I believe you need the scope "read_merchant_managed_fulfillment_orders". 

How is this added?

talalbsse
Shopify Partner
9 0 6

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?

talalbsse
Shopify Partner
9 0 6

Hi @Paul_McWhinnie ,

Were you ever able to solve this?

I am still trying to figure it out

talalbsse
Shopify Partner
9 0 6

Hi @browntaped ,

 

I am also getting the same error:

talalbsse_0-1667422340235.png

We tried alot, searched a lot but no success..

 

 

ChannelCat
Shopify Partner
1 0 0

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