My Business
2.2K members online now
2.2K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Locality is not returned in GET call to method accounts.locations.getGoogleUpdated

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

For the location with id 12018866123847894679, when updating it via a PATCH call to https://mybusiness.googleapis.com/v2/accounts/105890953875032770944/locations/12018866123847894679?a... we are sending the following parameters related to the address:

 

"address": {
  "postalCode": "14542",
  "addressLines": [
   "Poststraße 1"
  ],
  "locality": "Werder (Havel)",
  "country": "DE"
 },

 

The response to this PATCH call is returning the same data that we are sending. However, when doing a GET detail call to  https://mybusiness.googleapis.com/v3/accounts/105890953875032770944/locations/12018866123847894679:g... the response does not contain the locality field as it can been seen below (instead the subLocality field is included):

 

"address": {
        "postalCode": "14542",
        "administrativeArea": "BE",
        "addressLines": ["Poststraße 1"],
        "subLocality": "Glindow",
        "country": "DE"
    },

 

Using the endpoint to normalise/obtain addresses http://maps.googleapis.com/maps/api/geocode/json?address=Poststra%C3%9Fe%201%2014542, the result returns the locality value that we are sending and we are expecting.

 

For other locations, we have observed that the locality field is returned when doing a GET detail call. So, we would like to know what we should do for that case, so we can obtain the value expected for locality when doing a GET call to https://mybusiness.googleapis.com/v3/accounts/105890953875032770944/locations/12018866123847894679:g...

 

Thanks so much in advance.

 

Andrea

 

1 Expert replyverified_user

Re: Locality is not returned in GET call to method accounts.locations.getGoogleUpdated

Google Employee
# 2
Google Employee

Hi @Andrea M,

 

The GET request you send to the :googleUpdated endpoint is for retrieving the Google updated version of the specified location and the returned Location object is different from the response of a regular Get call only when you have a Google update for this location.

 

If you don’t accept the business information that Google has updated for your location, you can either review the Google update in the UI or override the Google updated version of the specified location by making further edits to the location with a PATCH call via the Google My Business API. Please make sure the updated business information you provide is accurate.

 

Thanks,

Terry

Re: Locality is not returned in GET call to method accounts.locations.getGoogleUpdated

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Terry,

Thanks for your response.

Yesterday, the only google update that we have for that location was in the attributes field (which appears in the diffMask key, right?). For this reason, as the locality was not involved, I was expecting to have as locality the value of Werder (Havel), but the locality key was not in the response at all.

However, today performing again a GET call to https://mybusiness.googleapis.com/v3/accounts/105890953875032770944/locations/12018866123847894679:g... the locality field just appears again, with the expected value.

So, I would like to understand why during approximately 20 days, doing the previous GET call, the locality field was missing and today, it has appeared again (without having changing anything in the PATCH call to update the location).

Thanks so much in advance.

Andrea

Re: Locality is not returned in GET call to method accounts.locations.getGoogleUpdated

[ Edited ]
Google Employee
# 4
Google Employee

Hi @Andrea M,

 

There have been some recent updates to this location you described in our system. The diffMask field returned from a GET request you send to the :googleUpdated endpoint indicates the fields that Google updated for the specified location. In your case, your diffMask should include address and attributes if those fields are different from the response of a regular Get call.

 

Please note that you may get a "Google update" to the location at any time if we receive reports of incorrect or outdated information for a location.

 

Thanks,

Terry