Migration from Fulfillment to FulfillmentOrder - Requesting required scopes

Solved

Migration from Fulfillment to FulfillmentOrder - Requesting required scopes

cajudosu
Shopify Partner
3 1 2

Hey community,

 

I am currently trying to migrate from Fulfillments to FulfillmentOrders. We have a lot of users that already have authorized our app to access Shopify via the Admin API. For them, we want to make the transition as seamless as possible. Therefore, we would like to add the scope write_merchant_managed_fulfillment_orders via the request_granular_access_scopes.json endpoint.

 

However, when we request that scope we get an error requested_scopes=Missing required scopes ["write_fulfillments"]. Although I know that the documentation says that the scope write_fulfillments is required for the request this seems not logical to me because with the scopes we requested before, we were already able to create fulfillments via the endpoint

 

POST orders/<order_id>/fulfillments.json

The scopes we requested before are:

 

read_orders
write_orders
read_products
write_products
read_inventory
write_inventory
read_all_orders

Is the error correct or is this a bug on the Shopify side and I should actually be allowed to request that scope?

BTW: The URL for endpoint request_granular_access_scopes.json seems to be wrong in migration article https://shopify.dev/apps/fulfillment/migrate. If a have the the parts /api/<api_version> in the URL e.g.

 

POST https://my-foo-shop.myshopify.com/admin/api/2022-07/request_granular_access_scopes.json

I always get a 406 error while the URL without these parts works:

 

POST https://my-foo-shop.myshopify.com/admin/request_granular_access_scopes.json  

 

Accepted Solution (1)

cajudosu
Shopify Partner
3 1 2

This is an accepted solution.

Ok, the problems seems to be resolved. I am now able to successfully request scope write_merchant_managed_fulfillment_orders by having scope write_orders and NOT having scope write_fulfillments.

View solution in original post

Reply 1 (1)

cajudosu
Shopify Partner
3 1 2

This is an accepted solution.

Ok, the problems seems to be resolved. I am now able to successfully request scope write_merchant_managed_fulfillment_orders by having scope write_orders and NOT having scope write_fulfillments.