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

Hi @Kevin_A ,

Were you able to find out anything?

Thank you,

Gabe

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”.

Hi @Kevin_A ,

Great! I will give that a try.

Thank you,

Gabe

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

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?

Hi @Paul_McWhinnie ,

Were you ever able to solve this?

I am still trying to figure it out

Hi @browntaped ,

I am also getting the same error:

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

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

Hi, I have the same problem, I have try to put all permission, all flag are acrite but when I try to read from url the fulfillment I receive the permission error

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

I don’t think that is a permission problem… I have full permission… why?

1 Like

Please help to check x-request-id: fee24792-2d96-4b6a-bb75-76b6a26ea199-1718342873
https://esafetysupplies.com.au/admin/api/2010-10/fulfillments.json

{
“location_id”:69607489704,
“notify_customer”:false,
“line_items_by_fulfillment_order”:[
{
“fulfillment_order_id”: 6705934434472,
“fulfillment_order_line_items”:[
{
“id”:13540480450728,
“quantity”:1
}
]
}
],
“tracking_info”:{
“company”:“Starshipit”,
“number”:“2492282274375”
}
}