Re: Set ready for pickup

How can I set an order as ready for pickup using GraphQL?

Bitzu
Shopify Partner
11 0 2

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"}}]}

 

Replies 2 (2)

ilkerozer
Shopify Partner
1 0 0

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.

Bitzu
Shopify Partner
11 0 2

Thanks. I managed to get it done months ago. It was the shopify api version indeed.