Google my business api Google My Business API使用的过滤器参数不清楚

Google my business api Google My Business API使用的过滤器参数不清楚,google-my-business-api,Google My Business Api,我使用GMB API从我的GMB帐户检索位置信息。如果要选择所有位置,则没有问题,但无法使用filter参数选择相关子集 检索我使用的所有位置时: 得到 使用筛选时,我会执行以下操作: GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=%22storeCode='RT-1'%22 --> this still gives all results GET https://mybusiness.goo

我使用GMB API从我的GMB帐户检索位置信息。如果要选择所有位置,则没有问题,但无法使用filter参数选择相关子集

检索我使用的所有位置时:

得到

使用筛选时,我会执行以下操作:

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=%22storeCode='RT-1'%22
--> this still gives all results

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=%22location.storeCode='RT-1'%22
--> this still gives all results 

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=%22store_code='RT-1'%22
--> this still gives all results

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=%22location.store_code='RT-1'%22
--> this still gives all results

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=store_code=%22'RT-1'%22
--> gives no results, but also not an error message

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=store_code=%22RT-1%22
--> gives no results, but also not an error message

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=location.store_code=%22RT-1%22
--> gives no results, but also not an error message

GET https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=location.storeCode=%22RT-1%22
--> gives no results, but also not an error message

Could someone please point me a working solution?

I read through pages of documentation, but they give different stories. I also tried to filter with other attributes, but that appears not to be different. Next to that, the Google documentation states I can use all fields to filter.

To support my statements I used OAuth2 playground, so no programming issues. Authentication is not the problem since I can retrieve the complete list of locations.

Hope someone can help me! And if you also have an example of the 'orderBy' parameter that would be great!

Leon


我们一直在为同样的问题苦苦挣扎,谷歌的文档非常无助,因为他们自己关于storeCode的示例根本不起作用

实际上,似乎有效的方法是通过location\u name/locationName进行过滤,然后在那里输入商店代码(当然,别问我为什么,这没有任何意义)

因此,您必须像这样调用API:

GET
https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=location_name="RT-1"

GET
https://mybusiness.googlapis.com/v4/accounts/xxxx/locations?filter=locationName="RT-1"
如果您使用大写或不使用大写似乎没有任何区别

向你问好,马克