我使用 GMB API 从我的 GMB 帐户中检索位置信息。如果我想选择所有位置没问题,但我无法使用过滤器参数选择相关子集。
检索我使用的所有位置时:
获取https://mybusiness.googlapis.com/v4/accounts/xxxx/locations
当我使用过滤时,我这样做:
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