to move an order through the fulfillment process but I keep getting
{"errors":"The api_client does not have the required permission(s)."}
I’ve added all the fulfillment authorization scopes but still giving me this error. I can access the fulfillments array but not the fulfillment orders. The scopes I have added are:
I too am having a similar issue, except my issue is with a POST to 2023-04/fulfillments.json to create a fulfillment for an order. Was there a generic solution for this, or should I send a DM to Michael_AG too?
Does you app have the correct permissions? It should be one of the write_{assigned/merchant_managed/third_party}_fulfillment_orders, depending on the your app role and the kind of the fulfillment order you are intending to fulfill.
Can you retrieve that fulfillment order with
GET "[https://your-development-store.myshopify.com/admin/api/2023-04/fulfillment_orders/](https://your-development-store.myshopify.com/admin/api/2023-04/fulfillment_orders/)<id>.json" ?
You may be encountering permission errors as stated above. You can refer to our documents on migrating to fulfillment orders and under step 1 you can get an understaffing of the scopes you will require.
Also, it may be worth going over our fulfillment documents in full just to give you a greater understanding of the entire process.
I have all of the fulfillment permissions/scopes that are configurable. Much as you had written write_{assigned/merchant_managed/third_party}_fulfillment_orders.
The header X-Shopify-Access-Token is set on my Postman request. The app itself is a Spring Boot application and uses the Base64 encoded : format for the Basic Authorization header. Both give the same 403 response.
"errors": "The api_client does not have the required permission(s)."
The order is unfulfilled, I am able to query 2023-04/fulfillment_orders/<fulfillment_order_id>.json and 2023-04/orders/<order_id>/fulfillment_orders.json and 2023-04/orders/<order_id>/fulfillments.json successfully.
If so, then the scopes/permissions are either not properly configured or not being applied. I do see the scopes listed on the app settings on the store settings for the app.
The flow I am using is when a shipment webhook comes in from a processing system outside of the Shopify realm I use the REST API to pull the fulfillment orders for the order, then I create a fulfillment payload with the line_items_by_fulfillment_order structure with related fulfillment_order_line_items that were shipped; the tracking information is included on the fulfillment object as well to be submitted to the 2023-04/fulfillments.json endpoint.
I am able to access fulfillments related data since I can get the empty fulfillments array from the orders endpoint 2023-04/orders/<order_id>/fulfillments.json
I will take a closer look at this documentation segment.
I have the write_fulfillments scope on my app scope list and it is provided to the /authorize endpoint during the OAuth installation/update. I am unable to create a fulfillment service for the app with the following response.
"errors": "[API] This action requires merchant approval for write_fulfillments scope."
Since the scopes have been submitted to the store and updated, what could be the next problem in this process?
Not sure what happened, but I went through each write_*_fulfillment_order on the request_scope endpoint on the migration guide and all but the write_assigned_fulfillment_orders worked. Now the app is working, no scope update required on the app by the client. Either that made a difference, or it was a timing thing and now it works. Either way, thank you for you help, it is now functional.