跳转至

恢复回收站账户

恢复回收站中的单个广告主或子代理账户。

请求地址

https://openapi.aiclk.com/openapi/v1/adaccount/account-recycle/update

所属权限

ads_write

请求方式

POST

请求参数

字段名 类型 是否必须 描述
account_id int 是 代理商 ID

Post body(json)

字段名 类型 是否必须 描述
recycle_id uint64 是 回收站记录 ID
sub_agent_id uint64/null 否 恢复广告主时指定绑定的有效子代理;传 null 或不传时使用删除前绑定的子代理。恢复子代理时不传

广告主恢复后状态为 PENDING,并重新送审;删除前绑定的子代理已删除时,必须指定当前代理商名下有效的子代理。子代理恢复为删除前状态,不自动恢复广告主绑定关系。

Body 示例

{
  "recycle_id": 90001,
  "sub_agent_id": null
}

请求示例

curl --location 'https://openapi.aiclk.com/openapi/v1/adaccount/account-recycle/update?account_id=1000003' \
--header 'Content-Type: application/json' \
--header 'OGW_ACCESS_TOKEN: your_access_token' \
--data '{"recycle_id":90001,"sub_agent_id":null}'

返回字段释义

字段名 类型 描述
code int 返回码
message string 返回信息
data json 返回值
- recycle_id int 回收站记录 ID
- account_id int 恢复的账户 ID
- status string RESTORED 表示恢复成功
- sub_agent_id int 广告主恢复后绑定的子代理 ID
trace_id string trace ID

返回示例

{
  "code": 200,
  "message": "success",
  "data": {
    "recycle_id": 90001,
    "account_id": 1000001,
    "status": "RESTORED",
    "sub_agent_id": 1507987
  },
  "trace_id": "56161c89ed743bff"
}

恢复子代理时请求体只需传 {"recycle_id":90002}。