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对象中。 - 检查
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" ] } }'