You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GMB Business Information API移除LocationState后状态字段获取咨询

解决方法

Business Information API v1 并未将原 GMB v4.9 中 LocationState 对象的所有字段统一收纳在 Metadata 下,相关状态需要搭配当前仍处于活跃状态的同生态接口分别获取,各字段的具体获取方式如下:

  • isVerified:调用 My Business Verifications API v1 的 locations.getVerificationStatus 接口,返回结果中的 hasVerification 字段即为对应状态值。
  • isPublished:调用 Business Information API v1 的 locations.get 接口时,在请求的 readMask 参数中显式指定 metadata 字段,返回结果的 metadata.live 字段为 true 即代表已发布。
  • isSuspended、isDisabled:调用 Business Information API v1 的 locations.get 接口时,在请求的 readMask 参数中显式指定 status 字段,返回结果的 status.suspended、status.disabled 字段直接对应两个状态。
  • isDisconnected:调用 Business Information API v1 的 locations.get 接口时,在请求的 readMask 参数中显式指定 metadata 字段,返回结果的 metadata.locationState.isDisconnected 即为对应状态值。

注意:所有Google商家相关API的GET请求都需要显式配置readMask参数,明确指定你需要返回的字段列表,未在readMask中声明的字段默认不会返回,这也是你之前拿到的Metadata对象缺失字段的核心原因。

内容的提问来源于stack exchange,提问作者Victor C

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.27 10:00:00