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 schema 构建。

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"      ]    }  }'