POST
/api/v4/social/brands/archive归档品牌
在品牌满足 90 天存续时长要求后,归档该社交品牌并立即使其连接离线;连接名额将保留至计费周期结束。
参数
请求体
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| input | object | 必填 | Wrapper object. The entire request body must be nested under `input`. |
| input.socialProfileId | string | 必填 | UUID of the brand to archive. Same value as the `brandId` path token used elsewhere. |
请求示例
可直接粘贴的请求体。请将占位 ID 和值替换为您自己的。
{ "input": { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902" }}响应
200Brand archived. Its connections are archived with it and go offline at once, but their slots stay counted against `maxConnections` until the billing period ends.
{ "data": { "archiveSocialProfile": { "success": true, "error": null, "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "status": "ARCHIVED" } }}200The brand is less than 90 days old and cannot be archived yet. `success` is `false` and `status` is `TENURE_NOT_MET`.
{ "data": { "archiveSocialProfile": { "success": false, "error": { "message": "SY95051: Brand must be at least 90 days old before it can be archived", "code": "SY95051", "contextInfo": null }, "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902", "status": "TENURE_NOT_MET" } }}401Unauthenticated, missing or invalid API key.
404No brand with that ID on this account (`SY95043`).
归档品牌。归档会立即生效:品牌在账户中存续至少 90 天后,此调用会在同一请求中归档该品牌及其连接的所有社交账号,这些账号会立即停止发布。
使用场景:规划下一周期的容量。品牌本身没有数量限制,也不按用量计费,因此归档关系到的不是品牌数量,而是连接。如果客户已流失,归档其品牌会在当天使其渠道离线,并将其名额安排为在续费时恢复可用,这正是 GET /social/limits 中的 usage.connectionsReleased 所报告的情况。如果您在此之前就需要容量,请购买连接包,这是唯一会立即生效的变更。
响应中的状态值:
ARCHIVED:品牌及其连接已归档。这是唯一的成功结果。TENURE_NOT_MET:品牌存续尚未满 90 天,暂时无法归档。success为false,error.code为SY95051,品牌保持不变。
注意事项。
- 请求体必须封装在
input对象中,且字段为socialProfileId,而非brandId。 - 请检查
success,而非 HTTP 状态。未满足存续时长要求时,返回的是HTTP 200,其中包含success: false、status: "TENURE_NOT_MET",error中为SY95051。 - 品牌必须存续至少 90 天才能归档。地点也遵循相同规则;请参阅套餐和附加项。请在品牌存续的第 90 天之后重试;无法通过 API 豁免此要求。
- 归档品牌会归档其连接。关联到该品牌的所有社交账号都会在同一操作中断开连接,而
GET /social/limits会在下次读取时通过较低的usage.connectionsActive和较高的usage.connectionsReleased反映这一变化。计费用的usage.connections在进入下一周期之前保持不变。 - 品牌归档无需取消。归档本身不会等到计费周期结束才生效,因此没有“已安排”状态,也没有对应的取消调用。会延后生效的是计费变化:释放的连接名额与已取消的附加项一样,会在周期结束时恢复可用。
写入操作:未在实际账户中执行。所示请求和响应根据 API schema 构建。
Request
curl -X POST 'https://listingsapi.com/api/v4/social/brands/archive' \ -H "Authorization: API $LISTINGSAPI_KEY" \ -H 'Content-Type: application/json' \ -d '{ "input": { "socialProfileId": "6f2c9a41-7b0e-4d55-9a2f-3c8e1d47b902" } }'