New Fulfillments API Error

Hi All,

I’m trying to update our API version to the latest version meaning I need to update how we handle fulfilments. I’m trying to make a GET request to https://xxx.myshopify.com/admin/api/2023-04/orders/XXX/fulfillment_orders.json following the documentation however I’m receiving a Bad Request response and if I try to access that URL whilst logged in via a web browser I get a

api_client does not have the required permission(s).

Error.

Screenshot of my postman request:

Documentation I’m following https://shopify.dev/docs/api/admin-rest/2023-04/resources/fulfillmentorder#get-orders-order-id-fulfillment-orders

Any help would be appreciated, thanks.

Hi Toma-Ohhdeer,

Did your app get approved to be able to access protected customer data? If so, I’d also doublecheck that your app has access to these scopes:

  • read_assigned_fulfillment_orders
  • read_third_party_fulfillment_orders
  • read_merchant_managed_fulfillment_orders

If these are all enabled and you’re still seeing this error let me know and we’ll troubleshoot further. Hope this helps,

Hi Liam,

I was trying to make a test request outside the app previously, making it through the app I also get a 403 forbidden. I went to the app in the partners dashboard and there wasnt a protected customer data, only orders, subscriptions, payment mandate, Checkout UI extensions and post-purchase. I have made sure I’ve got the scopes.

Thanks, Tom

Hi Tom - could you try making the same request as a curl request, to rule out that there’s something on Postmans side that’s causing this?

Hi, I tried making the request directly through our app using the Shopify PHP Library

tomaohhdeer_0-1689061317377.png

This returns a 403 Forbidden error

Hi again Tom - that 403 does still suggest a permissions related issue. Even though you’re trying to make a GET request, do you have all the read permissions for fulfilment related scopes?

Hi Liam,

I’ve added to scopes to my .env to be passed through but I think I need to somehow update the scopes given by the app in partners, is there an easy way to do this without uninstalling and reinstalling the app?

Hi Tom - you don’t need to uninstall/reinstall to accept the new scopes, you can use the same the authorization URL that was used to install the app originally. It would look something like:

https://mystore.myshopify.com/admin/oauth/authorize?client_id=apikey&scope=read_products,write_products&redirect_uri=https://myapp.com/shopify/callback&state=1234

Hope this helps!