A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
fulfillment = ShopifyAPI::Fulfillment.new fulfillment.message = "The package will ship within 1 business day." fulfillment.notify_customer = true fulfillment.tracking_info = { "number" => tn, "company" => tc } fulfillment.line_items_by_fulfillment_order = [ { "fulfillment_order_id" => fulfillment_order.id } ] fulfillment.save!
Solved! Go to the solution
This is an accepted solution.
Figured it out. The issue was that the FulfillmentOrder was not accepted yet. Once I accepted it, the error went away and the Fulfillment was able to save.
In the
fulfillment.line_items_by_fulfillment_order
You need to add
"fulfillment_order_line_items" => [
{
"id" => ,
"quantity" =>
}
https://shopify.dev/api/admin-rest/2022-10/resources/fulfillment#post-fulfillments
This is an accepted solution.
Figured it out. The issue was that the FulfillmentOrder was not accepted yet. Once I accepted it, the error went away and the Fulfillment was able to save.
hi @doughty I have same problem, I have a question.
What do you mean "FulfillmentOrder was not accepted yet"?
How can I confirm and accept it?
Thank you.
Hi @lytiuha 👋
You'll need to first accept the fulfillment order as shown in this doc here using POST fulfillment_request/accept in REST or fulfillmentOrderAcceptFulfillmentRequest mutation with GraphQL.
Hope that helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog