offers を管理するには、Mintegral token を使用する必要があります。詳細は Token を確認してください。
Mintegral API を使用して、offers の budget を管理・変更できます。
- offer が promotion しているすべての regions に budget を追加することも、region ごとに異なる budget を追加することもできます。
- offer 内のすべての target regions に budget を追加したい場合は、country_code を "ALL" のままにしてください。
- offer 内の異なる regions に budget を追加する必要がある場合は、field "country_code" に該当 region の country code を追加してください。また、同じ "country_code" に複数の region code を追加した場合、その region group は budget を共有します。
Notes:
A) offer で targeting している regions に対してのみ budget を追加できます。
B) region ごとに budget を管理する場合、当該 offer が targeting しているすべての regions に budget を設定していることを必ず確認してください。同じ region に対して複数の異なる budgets を追加することはできません。
https://ss-api.mintegral.com/api/open/v1/offer/budget
PUT
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"
}
]
}
| Fields | Type | Explanations | Default Value | Examples |
|---|---|---|---|---|
| offer_id | int | offer の一意の id | — | 123 |
| budget | array | offer の Budget | — | — |
| country_code | string | budget を個別に追加した region | — | "CN,EN" |
| daily_cap_type | string | daily budget の type。offer の spend によって budget を管理する場合は "BUDGET" を選択できます。それ以外の場合、conversion の amount によって budget を制御するには "CONVERSION" を選択できます。 |
— | "BUDGET" |
| daily_cap | int | 最小値は 50 です。 | — | — |
| total_budget | string / int | 一定期間の offer budget を追加します。"OPEN" は budget なしを意味します。 |
— | "OPEN" |
total_budget_effective_time Deprecated |
string | total budget の effective time。 例: YYYY-MM-DD |
— | "2019-05-09" |
total_budget_effective_timezone Deprecated |
number | total budget の effective time の timezone。 以下を確認してください: [ENUM-Timezone] |
— | 5.5 |
| Fields | Type | Explanations |
|---|---|---|
| code | int | 200 code は成功を示します。それ以外は失敗です。 |
| msg | string | 成功時は "success" を返します。失敗時は詳細なエラー情報を返します。 |
| data | json | 成功時は plain object を返します。失敗時は詳細なエラー情報を返します。 |
{
"msg": "success",
"code": 200,
"data": {}
}
例:
{
"code": 10000,
"msg": "error",
"data": {
"budget": "The budget field is required."
}
}
error code の詳細は以下を確認してください。
| code | msg | data | Explanations |
|---|---|---|---|
| 10000 | error |
{
"budget": "The budget field is required."
}
|
Budget Fields は null にできません。 |
| 10000 | error |
{
"budget": "budget is not json string!"
}
|
Budget Fields は Json である必要があります。 |
| 11423 | budget is error! |
{
"country_code": "you can only set ALL budget
or special budget!"
}
|
1 offer 内のすべての targeting region に budget を追加したい場合は、country_code を "ALL" のままにします。 2 offer 内の異なる region に budget を追加する必要がある場合は、“country_code” field に area の country code を追加します。また、同じ “country_code” に複数の region code を追加した場合、この area group は budget を共有します。 3 同じ offer で budget の country_code として “All” と specific region を同時に設定することは禁止されています。 |
| 11423 | budget is error! |
{
"country_code": "KB cannot set budget, you can only
set budget on ALL or special country(AD,AE,AF,CN)!"
}
|
offer で targeting している area に対してのみ budget を追加できます。 |
| 11423 | budget is error! |
{
"budget": "these (AD,AE,AF,CN) not set budget!"
}
|
area ごとに budget を管理する場合、offer が targeting しているすべての area に budget を設定していることを必ず確認する必要があります。また、同じ area に異なる budget を追加することは禁止されています。 |
| 11423 | budget is error! |
{
"daily_cap_type": "daily_cap_type must be
BUDGET or CONVERSION!"
}
|
daily_cap_type Fields は "BUDGET" または "CONVERSION" に設定する必要があります。 |
| 11423 | budget is error! |
{
"daily_cap": "daily_cap is empty!"
}
|
daily_cap Fields は null にできません。 |
| 11423 | budget is error! |
{
"total_budget": "total_budget is empty!"
}
|
total_budget Fields は null にできません。 |
| 11423 | budget is error! |
{
"daily_cap": "daily_cap cannot less than 50!"
}
|
Minimum daily_cap は 50 です。 |