跳转至

批量恢复回收站账户

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

请求地址

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

所属权限

ads_write

请求方式

POST

请求参数

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

Post body(json)

字段名 类型 是否必须 描述
items object[] 是 恢复项,最多 100 项
items[].recycle_id uint64 是 回收站记录 ID
items[].sub_agent_id uint64/null 广告主必填;子代理不传 广告主恢复时指定当前代理商名下有效子代理 ID;子代理恢复时传 null 或省略

每项结果在 data.items 中返回,RESTORED 表示恢复成功,FAILED 表示该项失败。广告主恢复后进入 PENDING 并重新送审。

Body 示例

{
  "items": [
    {"recycle_id": 90001, "sub_agent_id": 1507987},
    {"recycle_id": 90002, "sub_agent_id": null}
  ]
}

请求示例

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

返回字段释义

字段名 类型 描述
code int 返回码
message string 返回信息
data json 返回值
- items array 每项恢复结果
-- recycle_id int 回收站记录 ID
-- account_id int 恢复的账户 ID
-- status string RESTORED 恢复成功,FAILED 恢复失败
-- sub_agent_id int 广告主恢复后绑定的子代理 ID
-- error_code string 失败原因编码
-- message string 单项处理信息
trace_id string trace ID

返回示例

{
  "code": 200,
  "message": "success",
  "data": {
    "items": [
      {
        "recycle_id": 90001,
        "account_id": 1000001,
        "status": "RESTORED",
        "sub_agent_id": 1507987,
        "message": "操作成功"
      },
      {
        "recycle_id": 90002,
        "account_id": 1507987,
        "status": "RESTORED",
        "message": "操作成功"
      }
    ]
  },
  "trace_id": "56161c89ed743bff"
}