POST/api/v4/social/brands/archive

归档品牌

在品牌满足 90 天存续时长要求后,归档该社交品牌并立即使其连接离线;连接名额将保留至计费周期结束。

需要 API 密钥。请求头格式和密钥轮换请参阅身份验证。

参数

请求体

名称类型必填描述
inputobject必填Wrapper object. The entire request body must be nested under `input`.
input.socialProfileIdstring必填UUID of the brand to archive. Same value as the `brandId` path token used elsewhere.

请求示例

可直接粘贴的请求体。请将占位 ID 和值替换为您自己的。

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