/api/v4/rollup_interactions集約されたインタラクションの取得
アカウント内の複数の拠点にわたるインタラクションを、絞り込みと並べ替えに対応したカーソルページネーション形式のリストで返します。
パラメーター
クエリ
| 名前 | 型 | 必須 | 説明 | デフォルト |
|---|---|---|---|---|
| tag | string | 任意 | Location tag to scope the rollup to. Defaults to `all`, every location the key can see. Omit it unless you tag locations. | all |
| siteUrls | string | 任意 | JSON-encoded array of publisher hostnames to include. | — |
| startDate | string | 任意 | Start of the date-range filter (YYYY-MM-DD). | — |
| endDate | string | 任意 | End of the date-range filter (YYYY-MM-DD). | — |
| searchString | string | 任意 | Full-text search across interaction content. | — |
| category | string | 任意 | Single interaction category, e.g. `REVIEW`. | — |
| categories | string | 任意 | JSON-encoded array of interaction categories. | — |
| ratingFilters | string | 任意 | JSON-encoded array of star ratings to include, e.g. `[3,4]`. | — |
| ratingFilter | integer | 任意 | Single star rating to filter by. | — |
| responseStatus | string | 任意 | JSON-encoded response-status filter. Values: `RESPONDED`, `PENDING`. | — |
| sortOrder | string | 任意 | JSON-encoded sort order. Values: `NEWEST_FIRST`, `OLDEST_FIRST`, `LAST_RESPONDED`. | — |
| first | integer | 任意 | Number of records to return from the beginning. Defaults to 20 when omitted, the endpoint always returns a single page, never the whole history. | — |
| after | string | 任意 | Cursor to page forward from. Pass `pageInfo.endCursor`, or equivalently the `cursor` of the last edge in the previous page. | — |
| last | integer | 任意 | Number of records to return from the end. | — |
| before | string | 任意 | Cursor to page backward from, used with `last`. Pass the `cursor` of the first edge of the page you are moving back from. `pageInfo` carries no `startCursor` field, so the edge cursor is the value to use. | — |
レスポンス
200Paginated rollup of interactions across the account. `data.rollupInteractions` holds the connection.
{ "data": { "rollupInteractions": { "pageInfo": { "hasNextPage": true, "hasPreviousPage": false }, "edges": [ { "node": { "id": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841", "source": "maps.google.com", "content": "Excellent service, highly recommend.", "authorName": "Priya S.", "rating": 5, "date": "2026-06-30T12:04:11+00:00", "category": "Review", "type": "Review", "responded": false, "responseCount": 0, "canRespond": true, "locationId": 1800289 }, "cursor": "SW50ZXJhY3Rpb246OWUyNmQyYTg=" } ], "totalCount": 1284 } }}401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
アカウント内の拠点を横断するインタラクションのビューを返します。拠点ごとのインタラクションの一覧取得エンドポイントと同じカーソルベースのページネーション(first、last、after、before)とフィルターをサポートします。コネクションはdata.rollupInteractionsにあり、各nodeにはlocationIdが含まれるため、インタラクションがどの店舗に属するかを特定できます。
totalCountは、対象範囲内のすべての拠点でフィルターに一致するインタラクションの件数であり、このページで返される件数ではありません。firstを省略すると20件のレコードが返されるため、1回の呼び出しでアカウントの全履歴が返ることはありません。totalCount件のレコードを取得するまでafterを使用してページを順に取得してください。
注意点:集約の対象は常にアカウント全体です
このエンドポイントには拠点ごとのパラメーターはありません。デフォルトのtag=allでは、APIキーで参照できるすべての拠点を集約し、対象範囲を絞り込めるのは拠点のtagのみです。locationFilters引数もlocationIds引数もなく、送信しても拒否されずに無視されます。利用可能なフィルター(siteUrls、responseStatus、sortOrder、startDate/endDate、searchString)で結果を絞り込むか、各ノードのlocationIdに基づいて結果をクライアント側でグループ化してください。
ユースケース:アカウント全体の「返信が必要」な項目のキュー
すべての拠点でオーナーからの返信をまだ待っているレビューをすべて一覧表示するには、GET /rollup_interactions?responseStatus=["PENDING"]&sortOrder=["NEWEST_FIRST"]&first=50を呼び出してから、after = pageInfo.endCursor(最後のエッジのcursorと同等)を指定してページを順に取得し、hasNextPageがfalseになった場合、またはページが空のedges配列を返した場合に停止します。これにより、拠点ごとに繰り返し処理する必要がなくなります。ページネーションとレート制限が適用されるため、429が返された場合はRetry-Afterヘッダーに従い、定期的な同期では日付範囲を指定した実行(startDate/endDate)を優先してください。
curl -X GET 'https://listingsapi.com/api/v4/rollup_interactions' \ -H "Authorization: API $LISTINGSAPI_KEY"