GET/api/v4/plan-sites

列出套餐包含的站点

返回账户套餐中包含的所有发布平台目录站点,以及每个站点的 ID、URL 和支持的国家。

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

参数

此端点不接受任何参数。

响应

200Array of plan site objects. Country arrays are truncated below for brevity; the live response lists every supported country.
Response
{  "data": {    "planSites": [      {        "hideAddressSupportedCountries": ["US", "CA", "AU", "IN", "GB"],        "id": 1,        "name": "Google Maps",        "supportedCountries": ["US", "CA", "IN", "GB", "DE"],        "url": "maps.google.com"      },      {        "hideAddressSupportedCountries": ["US", "CA", "AU", "IN", "GB"],        "id": 184,        "name": "Facebook",        "supportedCountries": ["US", "CA", "IN", "GB", "DE"],        "url": "facebook.com"      },      {        "hideAddressSupportedCountries": ["US", "CA", "AU", "GB"],        "id": 2,        "name": "Yelp",        "supportedCountries": ["US", "CA", "GB", "DE", "FR"],        "url": "yelp.com"      }    ]  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

返回当前账户所关联套餐中包含的所有发布平台目录站点。每个条目均包含整数 id、用于显示的 name、站点的 url、站点接受的 ISO 国家代码列表(supportedCountries),以及隐藏地址/服务区域标志生效的国家(hideAddressSupportedCountries)。

使用场景:构建有效的站点 ID 选择器。在为地点启用或禁用发布平台之前,调用此端点以了解套餐中有哪些数字站点 ID。只有此处返回的 ID 才能在 API 的其他调用中使用。将 id 对应到 name/url,即可显示易读的提交设置界面。

使用场景:预先检查地点所在的国家。筛选响应,仅保留 supportedCountries 包含地点的 countryIso 的站点,以便您仅提供确实接受该商家信息的发布平台。对于服务区域商家,交叉核对 hideAddressSupportedCountries,以了解在哪些国家可以隐藏地址。

注意事项。

  • 这是一个按套餐限定、不分页的列表:它在一次响应中返回该套餐的完整站点目录,因此没有游标。预计会有数十个条目,请缓存结果,而不是每次请求都调用此端点。
  • supportedCountries 和 hideAddressSupportedCountries 各自都可能包含 50 多个 ISO 代码;上方示例已截断。
  • 共用账户的速率限制;遇到 429 时,请遵循 Retry-After 响应头。
Request
curl -X GET 'https://listingsapi.com/api/v4/plan-sites' \  -H "Authorization: API $LISTINGSAPI_KEY"