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 そのものです。掲載情報を取得し、顧客(またはマッチングロジック)に 1 件を選択させ、その 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  }'