GET
/api/v4/social/brandsブランド一覧の取得
アカウント内のソーシャルブランドをページ分割した一覧として返します。各ブランドのプロフィール、タイムゾーン、接続済みチャネル数が含まれます。
パラメーター
クエリ
| 名前 | 型 | 必須 | 説明 | デフォルト |
|---|---|---|---|---|
| filters | string | 任意 | JSON-encoded filter object with two fields. `statuses` (array of strings, **required inside the object**) selects which brand states to return: `ACTIVE` or `ARCHIVED`. `profileName` (string, optional) is a case-insensitive substring match on the brand name. Omit the parameter entirely to return active brands. | — |
| page | integer | 任意 | 1-based page number. Defaults to 1. | — |
| size | integer | 任意 | Rows per page. Defaults to 20. | — |
レスポンス
200A page of brands plus `pageInfo` for paging.
{ "data": { "listSocialProfiles": { "profiles": [ { "id": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home", "archived": false, "logo": null, "profileLogo": null, "siteUrl": "https://jennyhome.example", "countryIso": "US", "bio": "Handmade furniture for real homes.", "businessIntent": "A family-run home furnishings store selling handmade furniture and textiles.", "categories": ["Furniture Store", "Home Goods"], "brandHashtags": ["jennyhome", "handmadefurniture"], "competitorHashtags": [], "connectedChannelCount": 3, "timezone": { "label": "(GMT-05:00) Eastern Time", "tzCode": "America/New_York", "name": "Eastern Standard Time", "utc": "-05:00" }, "contentPreferredLanguage": "en" }, { "id": "a90f7c22-5db1-4e83-9f40-2b7c6a1e5d33", "profileName": "Jenny Home Eastside", "archived": false, "logo": null, "profileLogo": null, "siteUrl": null, "countryIso": "US", "bio": null, "businessIntent": "general", "categories": [], "brandHashtags": [], "competitorHashtags": [], "connectedChannelCount": 0, "timezone": { "label": "(GMT-06:00) Central Time", "tzCode": "America/Chicago", "name": "Central Standard Time", "utc": "-06:00" }, "contentPreferredLanguage": "en" } ], "pageInfo": { "total": 11, "hasNextPage": true, "totalEngagementPosts": 0, "totalPublishedPosts": 0 } } }}401Unauthenticated, missing or invalid API key.
アカウント内のブランドを1ページずつ一覧表示します。各行は、GET /social/brands/{brandId} が単一のブランドに対して返すものと同じブランドオブジェクトなので、通常はこの一覧だけでブランド選択UIを表示でき、追加のリクエストは不要です。
ユースケース:独自のUIでのブランド選択。 ユーザーが投稿画面を開いたときに1回呼び出し、各行に profileName と logo を表示します。connectedChannelCount が 0 のブランドにはソーシャルアカウントがまだ紐付けられておらず、投稿できないため、バッジを表示してユーザーを接続リンクに誘導します。pageInfo.hasNextPage が true の間は、page と size を使ってページを取得します。
ユースケース:保存済みレコードとの照合。 毎晩すべてのページを巡回し、id を作成時に保存したブランドIDと照合します。デフォルトの一覧から消えたブランドはアーカイブされているため、表示するには filters={"statuses":["ARCHIVED"]} を渡します。
注意事項。
idは通常のUUIDで、Social APIの他の箇所ではパス内のbrandIdトークンとして、リクエストボディではsocialProfileIdとして使用されます。- フィルターは個別のパラメーターではなく、
filtersクエリパラメーター内の1つのJSONエンコードされた文字列として送信します。この文字列をURLエンコードしてください。filtersを送信する場合は、必ずstatusesを含める必要があり、profileNameはそれと併せて任意で指定できます。 - ページ分割はオフセット方式(
page/size)で、LocationsおよびReviewsエンドポイントのようなカーソル方式ではありません。pageInfo.totalは条件に一致するブランドの総数であり、このページ内の件数ではありません。pageInfo.totalEngagementPostsとtotalPublishedPostsは投稿一覧と共通の投稿カウンターで、ここでは0になります。 connectedChannelCountはアクティブな接続のみを数え、切断されたチャネルは即座に集計対象から除外されます。チャネル自体を取得するには、GET /social/brands/{brandId}/connectionsを呼び出します。timezone.tzCodeは、そのブランドのすべてのスケジュールを解釈する際の基準となるIANA識別子で、他の3つのタイムゾーンフィールドは表示用ラベルです。- ブランド数には上限がないため、上限と照合する必要はありません。 APIプランではブランド数が無制限なので、この一覧の件数は参考情報です。上限があるのは接続数で、その値は
GET /social/limitsから取得します。ブランドをアーカイブすると接続は即座にオフラインになりますが、接続枠は請求期間が終了するまで引き続きmaxConnectionsに算入されます。そのため、この一覧から消えたブランドも、更新時まで接続枠を保持している場合があります。
Request
curl -X GET 'https://listingsapi.com/api/v4/social/brands' \ -H "Authorization: API $LISTINGSAPI_KEY"