POST/api/v4/social/brands/update

ブランドの更新

ソーシャルブランドの名前、タイムゾーン、ウェブサイト、カテゴリ、ハッシュタグ、または自己紹介を更新します。

API キーが必要です。ヘッダーの形式とキーのローテーションについては認証を参照してください。

パラメーター

ボディ

名前型必須説明
inputobject必須Wrapper object. Every field below is a property of `input`, the entire body must be nested under it.
input.profileIdstring必須UUID of the brand to update. This is the same value used as the `brandId` path token elsewhere.
input.profileNamestring任意New display name.
input.timezoneobject任意New timezone as `{ label, tzCode, name, utc }`. `tzCode` is the IANA identifier that schedules are resolved against.
input.businessIntentstring任意One or two sentences describing what the business does.
input.categoriesarray of strings任意Business categories. Replaces the stored list rather than merging into it.
input.siteUrlstring任意The brand's website. Changing it queues a fresh read of the site.
input.logostring任意Public https URL of the brand logo.
input.countryIsostring任意Two-letter ISO country code.
input.biostring任意Short brand bio.
input.brandHashtagsarray of strings任意Replaces the brand's hashtag list.
input.competitorHashtagsarray of strings任意Replaces the competitor hashtag list.
input.contentPreferredLanguagestring任意Preferred language for generated content, e.g. `en`.

リクエストの例

そのまま貼り付けられるボディです。プレースホルダーの ID と値をご自身のものに置き換えてください。

Request body
{  "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.
Response
{  "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`.
Response
{  "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"      ]    }  }'