Can't find a way to update a customer address longitude/latitude using the GraphQL API

Highlighted
New Member
2 0 0

Hi, there's the customerAddressUpdate mutation for that, but surprisingly the MailingAddressInput doesn't allow to provide longitude/latitude properties, am I missing something? Is the only way to create a brand new address by copying over the value of the one to "update" and add longitude / latitude at create time? I hope I'm missing something!

 

Thanks for any insight! 

0 Likes
Shopify Staff
Shopify Staff
1087 75 140

Hey @benoitmarchant , 

 

Since latitude/longitude aren't stored on customer addresses, I wouldn't expect them to be mutable by using a customer-related mutation. The only place that I'm aware of where this is information stored is the address attached to an order. 

 

Editing the address on an order doesn't appear to change the latitude/longitude values either, so this data doesn't appear to be something that can be re-written regardless of the resource being used.

0 Likes
New Member
2 0 0

Hi Josh, thanks but they are documented in GraphQL API as being stored, take a look here:

https://help.shopify.com/en/api/graphql-admin-api/reference/object/mailingaddress

 

And when you ask it in the result, the fields shows up, empty, but they do. Asking for a property that's not part of the schema creates an error as it should. So it really feels like something was half-done there.

 

 

0 Likes