POST/api/v4/connected-accounts/connected-account-listings

获取已连接账户的商家信息

返回已连接账户可访问的 Google Business Profile 或 Facebook 商家信息,支持可选的筛选和分页。

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

参数

请求体

名称类型必填描述
connectedAccountIdstring必填UUID of the connected account whose listings to fetch. Send this in the JSON body: as a query parameter it is ignored.
pageinteger可选Page number to fetch. Defaults to 1.
perPageinteger可选Records per page. Defaults to 500, which is also the maximum.
locationInfostring可选Free-text search within the account's listings. Matches business name, address lines, locality, postal code, store code, and phone.

请求示例

可直接粘贴的请求体。请将占位 ID 和值替换为您自己的。

Request body
{  "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",  "perPage": 50}

响应

200List of listings accessible to the account, with pagination metadata.
Response
{  "data": {    "connectedAccountListings": {      "pageInfo": {        "hasNextPage": false,        "hasPreviousPage": false,        "totalPages": 1,        "totalRecords": 60      },      "records": [        {          "accountTypeName": "Google",          "address": "123 William St, NY 10038, Manhattan, US",          "id": "R21iQnVsa0RhdGFMYWtlOjA2MDQ4NmExLTA0NzQtNDc4NS1iMjNhLTBkOGM4MzhmNGQ5OA==",          "liveLink": null,          "locationName": "Trial",          "phone": "(718) 667-7787"        }      ]    }  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

返回已连接账户有权访问的 Google Business Profile 或 Facebook 商家信息。每条记录包含商家信息的 id(base64 编码的 ID)、locationName、address、phone 和 liveLink。虽然使用 POST,但这是读取操作;账户和分页选项必须在 JSON 请求体中发送。

使用场景:构建商家信息选择器。客户连接拥有数十条商家信息的 Google 账号后,调用此端点来显示可搜索的列表。将客户输入的搜索词放入 locationInfo(会匹配名称、地址、电话号码、邮政编码和门店代码),以便客户快速找到正确的门店。

使用场景:为 connect-listing 提供输入。每条记录中的 id 正是 connect-listing 所需的 connectedAccountListingId。获取商家信息,让客户(或您的匹配逻辑)选择其中一条,然后将其 id 与目标 Listings API locationId 一起传给 connect-listing,以建立关联。

使用请求体中的顶层键 page 和 perPage 分页;perPage 默认为 500,这也是最大值。从响应中读取 pageInfo.hasNextPage 和 pageInfo.totalPages,以逐页获取完整结果集。此端点的调用会计入账户的速率限制,429 响应包含 Retry-After 响应头。

上述请求结构已通过线上 API 验证。示例响应仅作说明。

Request
curl -X POST 'https://listingsapi.com/api/v4/connected-accounts/connected-account-listings' \  -H "Authorization: API $LISTINGSAPI_KEY" \  -H 'Content-Type: application/json' \  -d '{    "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",    "perPage": 50  }'