GMB API - batchGet Results Missing LatLong Values[ Edited ]
November 2016 - last edited November 2016 by Terry W
We are using the batchGet process to pull locations from our accounts, prior to patch. We receive all locations that are included in our account in the response (no issue there), but the "latlong" field for a majority of our locations are missing.
Why would this data be missing if the locations are in fact appearing in the GMB UI with a published status and we can find the "latlong" manually through the Google Maps listings? Is there something we need to include in the batchGet to insure the latlong data is returned?
Re: GMB API - batchGet Results Missing LatLong Values
Hi @Amanda S,
The latlng field for the user-provided latitude and longitude is read-only and cannot be updated upon creation of a new location. This field is ignored if the provided address geocodes successfully when creating a location. This field is only present if the user-provided latlng field value in a LatLng object was accepted when creating a new location via the Google My Business API, or the latlng field value was updated by dropping a pin for a business location through the Google My Business UI. The absence of the latlng field for a specified location has nothing to do with the POST request and any request message components you send to the :batchGet endpoint for retrieving all specified locations in the given account. You should get the same result if you send a GET request to list all locations for the specified account.