All things Shopify and commerce
Hello,
I've been trying for some time to set an order as ready for pickup and obtain the same result as when we manually click it.
From what I understood, there is no way to do this using the REST API, only graphQL.
I tried to do it using this mutation: https://shopify.dev/docs/api/admin-graphql/2023-04/mutations/fulfillmentOrderLineItemsPreparedForPic... that I understood its the only way (https://community.shopify.com/c/shopify-apis-and-sdks/mark-order-as-quot-ready-for-pickup-quot-via-a...) but when I'm trying to actually use it there are some errors. Can anybody help me figure it out? Thank you
@body= {"errors"=> [{"message"=>"FulfillmentOrderLineItemsPreparedForPickupInput isn't a defined input type (on $input)", "locations"=>[{"line"=>1, "column"=>53}], "path"=>["mutation fulfillmentOrderLineItemsPreparedForPickup"], "extensions"=> {"code"=>"variableRequiresValidType", "typeName"=>"FulfillmentOrderLineItemsPreparedForPickupInput", "variableName"=>"input"}}, {"message"=>"Field 'fulfillmentOrderLineItemsPreparedForPickup' doesn't exist on type 'Mutation'", "locations"=>[{"line"=>2, "column"=>3}], "path"=>["mutation fulfillmentOrderLineItemsPreparedForPickup", "fulfillmentOrderLineItemsPreparedForPickup"], "extensions"=> {"code"=>"undefinedField", "typeName"=>"Mutation", "fieldName"=>"fulfillmentOrderLineItemsPreparedForPickup"}}, {"message"=>"Variable $input is declared by fulfillmentOrderLineItemsPreparedForPickup but not used", "locations"=>[{"line"=>1, "column"=>1}], "path"=>["mutation fulfillmentOrderLineItemsPreparedForPickup"], "extensions"=>{"code"=>"variableNotUsed", "variableName"=>"input"}}]}
Hello, it is related to the GraphQL API version that you have used. the version '2022-10' and older versions respond like the sample.
I faced the same issue when I used graphql method on the 'shopify-api-node' package. Even if I upgrade this package the latest version, I have not figured it out.
Finally, I sent the query with fetch.
Thanks. I managed to get it done months ago. It was the shopify api version indeed.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024