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 24 (24)
Gabe8
Shopify Partner
8 0 0

Hi @Kevin_A ,

Were you able to find out anything?

 

Thank you,

Gabe

Kevin_A
Shopify Staff
317 42 55

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 | Developer Support @ 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
8 0 0

Hi @Kevin_A ,

Great! I will give that a try.

Thank you,

Gabe

Gabe8
Shopify Partner
8 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
317 42 55

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 | Developer Support @ 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