GET/api/v4/locations/{locationId}/reviews/settings

列出地点的评价来源

返回为单个地点配置的评价来源及其连接 URL。

需要 API 密钥。请求头格式和密钥轮换请参阅身份验证。

参数

路径

名称类型必填描述
locationIdstring必填Location to read. Accepts a base64-encoded Relay ID (e.g. `TG9jYXRpb246MTgwMDI4OQ==`) or a raw numeric location ID.

响应

200Review-source sites and their configured URLs for the location.
Response
{  "data": {    "interactionsSetting": {      "siteSettings": [        { "name": "maps.google.com", "url": null },        { "name": "facebook.com", "url": null },        { "name": "yelp.com", "url": null }      ]    }  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

返回一个地点的评价来源设置。siteSettings 中的每个条目都是该账户的套餐支持的平台。url 非 null 表示该平台已连接,且 Listings API 正在从该 URL 拉取评价;url 为 null(如上方实际地点 Jenny Home 的示例所示,该地点尚未关联任何第三方来源)表示该平台可用,但尚未配置。

使用场景:查找仍需填写 URL 的来源

获取此列表并按 url: null 筛选,以生成地点所有者仍需连接的平台清单。地点的 Google 和 Facebook 资料连接后,评价来源会自动关联,连接这些账号即可填充缺失的 URL:

JSON
{ "name": "yelp.com", "url": "https://www.yelp.com/biz/your-listing" }

编辑后,再次返回的同一平台条目中,url 将已填充,不再是 null。

使用场景:核查多个地点已连接的来源

遍历您的地点(通过列出所有地点 获取),并为每个地点调用此端点,以报告评价来源的覆盖情况。由于每个地点都需要发起一次请求,请遵守账户的速率限制,分散调用时间,并在遇到 429 时,等待 Retry-After 响应头指定的时间后再重试,避免频繁发送请求。

通过 OAuth 连接的 Google 和 Facebook 会自动显示为已连接,且无法通过编辑端点覆盖。使用账户范围的列出账户的评价来源,查看该套餐可能支持的全部平台。

Request
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/reviews/settings' \  -H "Authorization: API $LISTINGSAPI_KEY"