Reputation: 1265
I've a business published in Google My business.It is in live. I tried to update the location details via API. But I'm getting 400 error and getting the following response.
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.mybusiness.v4.ValidationError",
"errorDetails": [
{
"code": 3,
"field": "latlng",
"message": "The specified address cannot be located. Please use the UI to provide a pin drop."
}
]
}
]
}
}
But in the above scenario, patch request doesn't contains the location coordinates. But I still getting the specified address cannot be located response.
Body of patch request::
{
"primaryPhone": "xxxxxxxxx",
"locationName": "xxxx",
"address": {
"regionCode": "IN",
"postalCode": "xxxxx",
"locality": "xxxxx",
"addressLines": [
"xxxxxx xxxx xxxx"
],
"administrativeArea": "xxxx xxxxxx"
},
"primaryCategory": {
"displayName": "Apartment building",
"categoryId": "gcid:apartment_building"
},
"languageCode": "en",
"storeCode": "xxxxxx9dda0dc5-c709-410c-a272-912486b1b5f4"
}
This is doesn't contains the lat,lng but still getting the same lat,lng field error.
Actually I've changed the name only change . I don't know how it is related to lat,lng.
And tried updating without the address field and with address field. But in both case getting the same response.
Upvotes: 2
Views: 1155
Reputation: 1613
Seems like you are using this method (https://developers.google.com/my-business/reference/rest/v4/accounts.locations/patch).
This error occurs when Google determines that their own Geocoder doesn't really know where they should be placing the pin for that address. So additionally to the address property, Google may(!) allow you to also send them the latLng property - if Google determines that this is a credible set of coordinates, the address will be updated. It is however still possible that they won't believe you that you know where that address is exactly. In that case, the only way to get address data through is in fact to go to the Google My Business UI of the location and manually dragging that pin to where it needs to go.
Upvotes: 1