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

API_Dev
Tourist
4 0 1

Was this ever resolved?

0 Likes
Gabe8
Shopify Partner
8 0 0

This is ridiculous! I am getting the same issue in multiple accounts, and whenever I contact Shopify Partner Support, all they do is direct me to these forums, where these issues remain unresolved.

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
317 42 55

Hey @Gabe8 

Can you provide me with an x-request-id from the response headers so I can take a look?

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

0 Likes
Gabe8
Shopify Partner
8 0 0

Hi Kevin,

68cb1475-8b7e-4ff3-8635-aa276fee36cb

BTW, I tried it with all permissions set to at least Read.

 

Thank you!

Gabe

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
317 42 55

Hey @Gabe8 

Looks like the request is originating from your browser and is inheriting permissions from what appears to be an authenticated staff account (normally we should see the request attached to an api key, but in this case it looks like there is a browser user agent). If you run this in a dedicated API client (I recommend against using one of the web based ones) you should be able to pull the fulfillment order details. 

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

0 Likes
Gabe8
Shopify Partner
8 0 0

Ok, that is indeed the cause of this particular message! You can't imagine how grateful I am for finally making some progress on this!

I actually tried it in a different browser instance, one where I am not logged in anywhere, and it worked.

 

Now, trying to access fulfillment orders in our client's LIVE website. Would you be able to tell me what the reason is for getting an empty list back for the same request? Example request IDs :1f479634-bd03-40a1-8653-0cfe81c145a5,  225109f6-a6a2-4994-ac52-d99616995ee9.

Are there other permissions that we need than what we already have?

{
"access_scopes": [
{
"handle": "write_orders"
},
{
"handle": "write_products"
},
{
"handle": "write_inventory"
},
{
"handle": "write_fulfillments"
},
{
"handle": "read_assigned_fulfillment_orders"
},
{
"handle": "read_orders"
},
{
"handle": "read_products"
},
{
"handle": "read_inventory"
},
{
"handle": "read_fulfillments"
}
]
}

Thank you!

Gabe

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
317 42 55

Hey @Gabe8 

I don't think this is a permissions issue. Is it only for these 2 orders that you are seeing this or are you able to reproduce this for other orders as well? 

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

0 Likes
Gabe8
Shopify Partner
8 0 0

It never worked. I tried it with at least 5 or 6 orders today, 2 of them definitely in financial_status:paid, fulfillment_status:null, and canceled_at:null.

Throughout the last couple of months, I tried it with many more. Of course, back then from the wrong browser session (where I was logged into the our dev account).

Should it work on orders that have been fulfilled already, or which have been refunded?

Right now, they only have one refunded order, when querying orders.json, without "status=any". Just tried it on that one, and here's the request ID: 17b6954e-5242-4f31-af05-3dc7b0357d37

Here's the request id for a random recent fulfilled order: 17cbd53b-988a-4dec-a08a-6a492cc7405c

Thanks,

Gabe

 

0 Likes
Gabe8
Shopify Partner
8 0 0

Hi @Kevin_A ,

 

So right now the account where we need access to fulfillment_orders is the one where I made the following requests that I already sent you yesterday:

1f479634-bd03-40a1-8653-0cfe81c145a5

225109f6-a6a2-4994-ac52-d99616995ee9

 

I also made other requests to other accounts where:

- we have the read_fulfillments and read_assigned_fulfillment_orders permissions  - not sure which one we really need

- there are multiple active locations - is this one of the necessary criteria?

- there is an order that fits this criteria: ?status=open&financial_status=paid&fulfillment_status=unfulfilled

 

I got no data for fulfillment_orders.json - empty array in the response

Are the above the necessary criteria? What else should I check for?

 

These are the request IDs in case it helps looking at other examples:

b261d868-cf63-446b-aa8e-aef680add206

1192bf9f-3eb6-4796-b44b-265d61959a62

6ef342cd-00a9-49fd-8288-47b5f5054adc

c47a52d3-242d-41bb-81b0-e5f9071e3467

41de4d99-6a85-4ae8-9729-52bb7a73d21e

2c02e4e7-dcbb-41d7-9047-dc11baa7a8e4

 

Thank you,

Gabe

 

0 Likes
Kevin_A
Shopify Staff
Shopify Staff
317 42 55

Hey @Gabe8 

I know that there are certain situations where fulfillment orders won't be created (such as if all items are managed by a fulfillment service) but I will need to look into this further to confirm everything is working as expected here. 

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

0 Likes