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 物件中。
  • 請檢查 success,而非 HTTP 狀態。更新遭拒時會傳回 HTTP 200,並包含 success: false,原因則位於 error。
  • 只有 profileId 為必填欄位。其他所有欄位皆為選填,因此支援部分更新:只需傳送您要變更的欄位,其餘欄位會保持不變。此處用來識別品牌的欄位是 profileId,而非 brandId;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"      ]    }  }'