Solved

Cannot create fulfillment for the fulfillment order.

joose
Shopify Partner
26 1 11

Trying to fulfill order but will get response "Cannot create fulfillment for the fulfillment order.". Any ideas why it fails? What to change to make it work?

 

Here is the info:

 

RequestId: f6ecb378-92ca-4623-86fa-5910a3c19ff9

 

Request:

mutation CreateFulfillment {

fulfillmentCreateV2( fulfillment: {lineItemsByFulfillmentOrder: {fulfillmentOrderId: "gid://shopify/FulfillmentOrder/5275395227748"}} )

        {

                userErrors {

                        field

                        message

                }

        }

}       

 

Response:

{

"data": {

"fulfillmentCreateV2": {

"userErrors": [

{

"field": [

"fulfillment"

],

"message": "Cannot create fulfillment for the fulfillment order."

}

]

}

},

"extensions": {

"cost": {

"requestedQueryCost": 10,

"actualQueryCost": 10,

"throttleStatus": {

"maximumAvailable": 1000,

"currentlyAvailable": 990,

"restoreRate": 50

}

}

}

}

 

Order info:

{

"data": {

"order": {

"id": "gid://shopify/Order/4321688551524",

"legacyResourceId": "4321688551524",

"fulfillments": [],

"fulfillmentOrders": {

"edges": [

{

"node": {

"id": "gid://shopify/FulfillmentOrder/5275395227748"

}

}

]

}

}

},

"extensions": {

"cost": {

"requestedQueryCost": 14,

"actualQueryCost": 5,

"throttleStatus": {

"maximumAvailable": 1000,

"currentlyAvailable": 995,

"restoreRate": 50

}

}

}

}

 

Fulfillment service is set up as:

 

{"fulfillment_services":[{"id":xxxxx,"name":"xxxxxx","email":null,"service_name":"xxxxx","handle":"xxxxxx","fulfillment_orders_opt_in":true,"include_pending_stock":false,"provider_id":null,"location_id":xxxxxx,"callback_url":"https:\/\/xxxxx\/xxx\/callback","tracking_support":true,"inventory_management":true,"admin_graphql_api_id":"gid:\/\/shopify\/ApiFulfillmentService\/xxxxx","permits_sku_sharing":false}]}

 

Accepted Solution (1)

joose
Shopify Partner
26 1 11

This is an accepted solution.

Solution: I needed to have read_third_party_fulfillment_orders,write_third_party_fulfillment_orders scope rights.

 

View solution in original post

Replies 2 (2)

joose
Shopify Partner
26 1 11

This is an accepted solution.

Solution: I needed to have read_third_party_fulfillment_orders,write_third_party_fulfillment_orders scope rights.

 

Blast2hell
Shopify Partner
1 0 0

Thank you for posting this, it is missing from the documentation for POST "Creates a fulfillment for one or many fulfillment orders".  You saved my morning from having to figure it out.