Migration to fulfillment order

This documentation for Fulfillment Order - https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillmentorder - states that “Fulfillment orders are created automatically when an order is created.”. So I should expect to see something returned when making a call to

/admin/api/2023-01/orders/{order_id}/fulfillment_orders.json - correct?

Whenever I make a call to it though, I get back an empty array. Why would that be?

{
“fulfillment_orders”:
}

Hi @rah_shop :waving_hand:

To start, I would recommend checking whether your app has all appropriate permissions. When the fulfillment order is created, it will be assigned a specific location, and it’s likely that your app doesn’t have permissions to view fulfillment orders at that particular location.

Hope that helps!

Thanks - I had already made this call (steps 1 and 2) before doing all this
(per the docs). Note though - I didn’t do anything re step 3 (Opt in to
fulfillment orders as a fulfillment service - since I don’t have any
fulfillment services that are in the system since the fulfillment service
is specified as manual). I just need to create the fulfillment via the API
as I have been doing prior to the migration but am stuck just because the
fulfillment order is returned as an empty list.

{
“requested_scopes”: [
“write_assigned_fulfillment_orders”,
“read_assigned_fulfillment_orders”,
“read_third_party_fulfillment_orders”,
“write_third_party_fulfillment_orders”
]
}

and then got this response

{
“access_scopes”: [
{
“handle”: “write_fulfillments”
},
{
“handle”: “write_inventory”
},
{
“handle”: “write_orders”
},
{
“handle”: “write_products”
},
{
“handle”: “write_script_tags”
},
{
“handle”: “write_themes”
},
{
“handle”: “write_assigned_fulfillment_orders”
},
{
“handle”: “read_assigned_fulfillment_orders”
},
{
“handle”: “read_third_party_fulfillment_orders”
},
{
“handle”: “write_third_party_fulfillment_orders”
},
{
“handle”: “read_fulfillments”
},
{
“handle”: “read_inventory”
},
{
“handle”: “read_orders”
},
{
“handle”: “read_products”
},
{
“handle”: “read_script_tags”
},
{
“handle”: “read_themes”
}
]
}

1 Like

So it turns out these 2 permissions were missing

“read_merchant_managed_fulfillment_orders”
“write_merchant_managed_fulfillment_orders”

Once these were added, then it worked. So in the end I had to add these 6 new perms

“read_third_party_fulfillment_orders”

“write_third_party_fulfillment_orders”
“read_assigned_fulfillment_orders”
“write_assigned_fulfillment_orders”
“read_merchant_managed_fulfillment_orders”
“write_merchant_managed_fulfillment_orders”

1 Like

The API documentation states that there are multiple scopes and to reference each endpoint to see what scopes are needed, but there are no references to them all in the documentation.

In the end I needed the following scopes for our fulfillment app:

Fulfillment services

View or manage fulfillment services

write_fulfillments
read_fulfillments

Merchant-managed fulfillment orders

View or manage fulfillment orders assigned to merchant-managed locations

write_merchant_managed_fulfillment_orders
read_merchant_managed_fulfillment_orders

Orders

View or manage orders, transactions, fulfillments, and abandoned checkouts

write_orders
read_orders

Third-party fulfillment orders

View or manage fulfillment orders assigned to a location managed by any fulfillment service

write_third_party_fulfillment_orders
read_third_party_fulfillment_orders