BAdam
1
Hi,
I know this was answered in the thread “Re: Add address to orders that do not require shipping”
But I’m trying to set up a flow to update order details for store pickups. However, I’m getting the following error for the orderUpdate mutation.
"Mutation had errors: “Variable $input of type OrderInput! was provided invalid value for id (Expected value to not be null)”
Am I missing anything obvious? Any help would be appreciated.
Adam
1 Like
Hi @BAdam !
You’re right - the error message is telling you exactly what’s missing: the order ID!
In your orderUpdate mutation, you need to include the “id” field in your input. Your current JSON is missing this required field.
Try updating your mutation input to include the order ID like this:
{
"input": {
"id": "{{ order.id }}",
"shippingAddress": [
"address1": "STORE PICK UP",
"city": "STORE PICK UP",
"countryCode": "AU",
"firstName": "{{order.billingAddress.firstName}}",
"lastName": "{{order.billingAddress.lastName}}",
"phone": "0000000000",
"provinceCode": "New South Wales",
"zip": "2000"
]
}
}
The Shopify API needs to know which order to update, and that’s what the “id” parameter provides.
Once you add this, your mutation should work correctly for store pickups.
Hope this helps!
1 Like
BAdam
3
Hi @TikitaTech ,
Appreciate your help, that fixed it. Thankyou.
1 Like