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

proper documentation for Location.Address validation rules

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hi,

 

We're seeing that the documentation here is not correct or is outdated. When we PATCH a location within country code BE  we see errors like:

 

{
        "error": {
            "code": 400,
            "message": "Request contains an invalid argument.",
            "status": "INVALID_ARGUMENT",
            "details": [
                {
                    "@type": "type.googleapis.com/google.mybusiness.v3p1.ValidationError",
                    "errorDetails": [
                        {
                            "code": 3,
                            "field": "address.sub_locality",
                            "message": "Sub-localities aren't used in BE",
                            "value": "Vennes",
                            "subErrorCode": 44,
                            "additionalValue": "BE"
                        }
                    ]
                }
            ]
        }
    }

From what I can see, this is not mentioned properly in the documentation.

 

We see a similar error for administrativeArea. The strange thing is, we're using the Google Geocoding API to get these addresses in the first place, so its really strange to get one thing from one API of Google and to have it rejected by another API on Google (the Geocoding API clearly responds with an administrativeArea and a subLocality).

 

Is this expected? If yes, can the documentation be updated please? We'd like to know what to include in the Address object depending on the country.

 

Thank you.

1 Expert replyverified_user

Re: proper documentation for Location.Address validation rules

Google Employee
# 2
Google Employee

Hi @Ashesh A,

 

Thank you for your input regarding the documentation! We will keep a note for your scenario in future improvements.

 

Please note, address format can vary widely by country, so all fields including locality, subLocality or administrativeArea may not be required for every location in the Google My Business. Depending on the country, some fields will be required, optional, or not allowed.

 

Please do let me know if you have any questions!

 

Thanks,

Shalini, The Google My Business API team

proper documentation for Location.Address validation rules

[ Edited ]
Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Hi @Shalini S,

 

That was not really my question. The question is – why is there a discrepancy between the Google Geocoding API and the GMB API? The Geocoded addresses with which we are making these requests to GMB come from the Google Geocoding API – and that API reports the places to have an administrativeArea, a subLocality and so forth. However, this doesn't seem to be the case on GMB – which operates on a different set of rules as compared to the Geocoding API. 

 

Why is that? If different API's on Google have different sets of validation rules, it makes things comprehensively more complicated for us to work with these API's.

proper documentation for Location.Address validation rules

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

 

Hi @Shalini S,

 

I'm also experiencing such troubles with Address validation when patching locations and I'm trying to identify a way to improve our data.

 

Do you have some rules/tool/url our teams could use to check the addresses they specify will be OK with regards to GMB API patch requests ?

For the moment we are confused because they get and validate those addresses directly on maps but we still get many errors (30-40% of our updates, depending on the countries). Thus we don't understand what changes we should make to ensure patching will succeed.

 

Thanks in advance for your answer,

Adrien

Re: proper documentation for Location.Address validation rules

Google Employee
# 5
Google Employee

Hi @Adrien L,

 

The address format can vary widely by country, so depending on the country, some fields will be required, optional, or not allowed. Unfortunately we don’t have any tool where you can validate your address but this link can help you to know about address format for a location.

 

Thanks,

The Google My Business API team