请输入
菜单

更新预算

需要携带 Token,详情看Token

更新广告单元预算。

1、支持针对广告单元或者广告单元里的不同地区设置预算,一个广告单元里只能选择一种预算设置类型

2、针对广告单元设置预算,将 country_code 设置为"ALL"即可,表示广告单元里所有地区共享一个预算

3、针对广告单元里不同地区设置预算,需要将 country_code 设置为特定地区的缩写,如"CN,US",共享同一预算的地区写在一组 country_code 里即可。(注:仅能针对广告单元的投放地区设置预算,所有投放地区均需设置预算,另,不同预算组之间的 country_code 必须互斥,不可存在交集)

请求地址

https://ss-api.mintegral.com/api/open/v1/offer/budget

请求方法

PUT

请求示例

json 复制代码
PUT /api/open/v1/offer/budget
HTTP/1.1 Host: ss-api.mintegral.com
Content-Type: application/json
{
  "offer_id": 123,
  "budget": [
    {
      "country_code": "US",
      "daily_cap_type": "BUDGET",
      "daily_cap": 0,
      "total_budget": "OPEN"
    },
    {
      "country_code": "CN",
      "daily_cap_type": "BUDGET",
      "daily_cap": 0,
      "total_budget": "OPEN"
    }
  ]
}

请求参数

字段 类型 说明 默认值 例子
offer_id int 广告单元 ID 123
budget array 预算配置
country_code string 设置预算的地区,多个用,隔开 "CN,EN"
daily_cap_type string 每日预算类型,可选值:
"BUDGET""CONVERSION"
"BUDGET"
daily_cap int 每日预算,最小值 50
total_budget string / int 指定时间范围内可消耗的总预算."OPEN"表示不设预算。 "OPEN"
total_budget_effective_time 已弃用 string 预算生效时间,格式:年-月-日 "2019-05-09"
total_budget_effective_timezone 已弃用 number 时区,可选值:
【枚举值 - 时区】
5.5

响应结果

字段 类型 说明
code int 200 表示成功 其他表示失败
msg string 成功,返回"success",失败返回相应的错误信息
data json 如果失败,返回具体的错误信息

应答示例

json 复制代码
{
  "msg": "success",
  "code": 200,
  "data": {}
}

错误码信息

注:错误信息格式如下:

json 复制代码
{
  "code": 10000,
  "msg": "error",
  "data": {
    "budget": "The budget field is required."
  }
}

错误码列表如下:

code msg data 说明
10000 error
{
    "budget": "The budget field is required."
}
budget字段不能为空
10000 error
{
    "budget": "budget is not json string!"
}
budget字段必须为Json字符串
11423 budget is error!
{
    "country_code": "you can only set ALL budget
    or special budget!"
}
设置广告单元预算时,预算类型仅能选择all(广告单元中的所有地区共享一个预算)、specifical budget(针对不同地区设置不同预算)中的任一,不可同时设置。
11423 budget is error!
{
    "country_code": "KB cannot set budget, you can only 
    set budget on ALL or special country(AD,AE,AF,CN)!"
}
设置special budget时,仅可以设置location范围内的国家。
11423 budget is error!
{
    "budget": "these (AD,AE,AF,CN) not set budget!"
}
设置special budget时,location范围内的国家必须全部设置,并且每个国家只能设置一次。
11423 budget is error!
{
    "daily_cap_type": "daily_cap_type must be
    BUDGET or CONVERSION!"
}
daily_cap_type字段必须为"BUDGET"或者"CONVERSION"
11423 budget is error!
{
    "daily_cap": "daily_cap is empty!"
}
daily_cap字段不能为空
11423 budget is error!
{
    "total_budget": "total_budget is empty!"
}
total_budget字段不能为空
11423 budget is error!
{
    "daily_cap": "daily_cap cannot less than 50!"
}
daily_cap不能小于50
当daily_cap非"OPEN"或者小于50报错
上一个
更新出价
下一个
更新广告单元状态
最近修改: 2025-06-23