AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

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

Issues with Administrative Area field

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi Team,

 

We are trying to integrate our application with GMB to automatically create locations in GMB based on our data. But, we does not valid fields for Administrative Area for all countries due to which we could not successfully create a GMB location.

 

Please clarify below points on Administrative Area:

 

1. Can we get a valid list of all Administrative Area fields for all countries. ( https://www.en.advertisercommunity.com/t5/Google-My-Business-API/Scope-of-Administrative-Area-s-valu...)

 

2. Can Administrative Area field be made optional permanently while creating GMB location using GMB API? ( customaztions in GMB API)

 

Thanks and Regards,

Bharath

1 Expert replyverified_user

Re: Issues with Administrative Area field

Google Employee
# 2
Google Employee

Hi @anumula b,

 

I believe I’ve already answered your questions regarding the administrativeArea field in this thread.

 

1. No, you can’t get a list of valid administrativeArea field values for all countries. However, you can get a list of country-specific names for the administrativeArea field from the Address format article in the Google My Business Help Center. Note that you should preferably use the full ISO 3166-2 code for this field, such as US-CA for California or DE-BE for Berlin.

 

2. No, you can’t make the administrativeArea field optional permanently via the API nor the UI. You should enter the complete and exact street address for your location. Note that not all countries require the administrativeArea field. You can use the address editor in the Google My Business UI to determine whether this field is appropriate for an address in a particular country. You’ll be notified in the UI if you need to correct any fields that are missing required information, or contain information that is not allowed for that country. I suggest you set the validateOnly boolean field to true for testing whether address.administrative_area is required for the specified location in a particular country without actually affecting the location when sending a POST request to create a new location or a PATCH request to update a specified location via the Google My Business API.

 

Thanks,

Terry

Issues with Administrative Area field

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi @Terry W,

 

I am trying to add an Italy Location where I am getting an invalid administrative area issue, even though the correct details are provided. Can you kindly help me on this.

 

Below is the request:

 

{
"location": {
"name": "",
"storeCode": "1",
"locationName": "Test Milano",
"primaryPhone": "0229523755",
"address": {
"addressLines": [
"Corso Buenos Aires 88"
],
"locality": "Milano",
"administrativeArea": "Lombardia",
"country": "IT",
"postalCode": "20131",
},
"latlng": {
"latitude": 45.485208,
"longitude": 9.216016,
},
"primaryCategory": {
"categoryId": "gcid:shoe_store",
},
},
"languageCode": "en-IT",
"validateOnly": "true",
"request_id": "dfsdfsdf",
}

 

I have cross checked the address by reverse geocoding the latlng values as well. Below is the link for reverse geocoding:

 

https://maps.googleapis.com/maps/api/js/GeocodeService.Search?5m2&1d45.485208&2d9.216015999999968&7s...

 

Thanks and Regards,

Bharath

Re: Issues with Administrative Area field

Google Employee
# 4
Google Employee

Hi @anumula b,

 

I notice from the HTTP request message you provided in your post that you are still using v2 of the Google My Business API because the format of the HTTP request including query parameters and request body for creating a new location or updating a location has changed for v3 of the Google My Business API. We will continue to support v2 of the API until December 5, 2016. Please check out the Deprecation Schedule for more details. We strongly encourage you to migrate to v3.1 of the API as soon as possible to enjoy the new features and prevent any interruptions in your service.

 

I used the ISO 3166-2 code "MI" for the “Milan” province instead of the “Lombardy” region from your JSON payload of HTTP request message to fill the administrativeArea field of the Address object for this location in Italy, and the POST request passed system validation and created the location successfully. It appears that the ISO code for the province is accurate instead of the region when supplying the value for the administrativeArea field in this case.

 

Thanks,

Terry