POST
/api/v4/social/brands/updateブランドの更新
ソーシャルブランドの名前、タイムゾーン、ウェブサイト、カテゴリ、ハッシュタグ、または自己紹介を更新します。
パラメーター
ボディ
| 名前 | 型 | 必須 | 説明 |
|---|---|---|---|
| input | object | 必須 | Wrapper object. Every field below is a property of `input`, the entire body must be nested under it. |
| input.profileId | string | 必須 | UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere. |
| input.profileName | string | 任意 | New display name. |
| input.timezone | object | 任意 | New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against. |
| input.businessIntent | string | 任意 | One or two sentences describing what the business does. |
| input.categories | array of strings | 任意 | Business categories. Replaces the stored list rather than merging into it. |
| input.siteUrl | string | 任意 | The brand's website. Changing it queues a fresh read of the site. |
| input.logo | string | 任意 | Public https URL of the brand logo. |
| input.countryIso | string | 任意 | Two-letter ISO country code. |
| input.bio | string | 任意 | Short brand bio. |
| input.brandHashtags | array of strings | 任意 | Replaces the brand's hashtag list. |
| input.competitorHashtags | array of strings | 任意 | Replaces the competitor hashtag list. |
| input.contentPreferredLanguage | string | 任意 | Preferred language for generated content, e.g. `en`. |
リクエストの例
そのまま貼り付けられるボディです。プレースホルダーの ID と値をご自身のものに置き換えてください。
{ "input": { "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "siteUrl": "https://jennyhomeandco.example", "brandHashtags": ["jennyhome", "handmadefurniture", "shoplocal"] }}レスポンス
200Brand updated. The full brand is returned.
{ "data": { "updateSocialProfile": { "success": true, "error": null, "socialProfile": { "id": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "archived": false, "logo": null, "profileLogo": null, "siteUrl": "https://jennyhomeandco.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", "shoplocal"], "competitorHashtags": [], "connectedChannelCount": 3, "timezone": { "label": "(GMT-05:00) Eastern Time", "tzCode": "America/New_York", "name": "Eastern Standard Time", "utc": "-05:00" }, "contentPreferredLanguage": "en" } } }}200Validation failed. The status is still 200: read `success`.
{ "data": { "updateSocialProfile": { "success": false, "error": { "message": "SY95046: Unknown timezone", "code": "SY95046", "contextInfo": null }, "socialProfile": null } }}401Unauthenticated, missing or invalid API key.
404No brand with that ID on this account (`SY95043`).
既存のブランドを編集します。ブランドはパスパラメーターではなく、リクエストボディ内の input.profileId で指定するため、ルートはフラットな POST /social/brands/update になっています。
ユースケース:ブランドを自社のCRMと同期させる。 顧客がビジネス名を変更したり、サイトを移転したりした場合は、ここにも変更を反映して、ブランドヘッダーと投稿作成画面の提案を正確に保ちます。siteUrl を変更すると、サイトの再読み込みもキューに登録されるため、追加の呼び出しを行わなくても、新しい文章が提案に反映されます。
注記。
- リクエストボディは、
inputオブジェクトでラップする必要があります。 - HTTPステータスではなく、
successを確認してください。 更新が拒否された場合は、success: falseと、errorに格納された理由を伴うHTTP 200が返されます。 - 必須なのは
profileIdのみです。 それ以外のフィールドはすべて省略可能なので、部分更新ができます。変更するフィールドだけを送信すれば、残りのフィールドはそのまま保持されます。ここで識別に使用するフィールドはbrandIdではなくprofileIdです。brandIdは常にURLパスのトークンとしてのみ使用されます。 categories、brandHashtags、competitorHashtagsを送信すると、マージされるのではなく置き換えられます。[]を送信すると、リストが空になります。timezoneを変更すると、今後のscheduleDate/scheduleTimeの値の解釈方法が変わります。すでに予約されている投稿は、確定済みの実行時刻を維持し、時刻が再設定されることはありません。GET /social/brands/{brandId}でブランドを再取得して確認してください。
書き込み操作:実際のアカウントに対しては実行していません。ここに示すリクエストとレスポンスは、APIスキーマに基づいて作成しています。
Request
curl -X POST 'https://listingsapi.com/api/v4/social/brands/update' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "profileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "profileName": "Jenny Home & Co.", "siteUrl": "https://jennyhomeandco.example", "brandHashtags": [ "jennyhome", "handmadefurniture", "shoplocal" ] } }'