offers を管理するには、Mintegral token を使用する必要があります。詳細は Token を確認してください。
promotion time、target geo など、offer の基本情報を管理する方法は以下のとおりです。
https://ss-api.mintegral.com/api/open/v1/offer
PUT
PUT /api/open/v1/offer
HTTP/1.1 Host: ss-api.mintegral.com
Content-Type: application/json
{
"offer_id": "18490",
"offer_name": "cqf_testtttt",
"promote_timezone": 7,
"start_time": 1578455012,
"target_geo": "ALL",
"os_version_min": "8.8",
"custom_ad_schedule": {"1":"0,1,23","2":"3,4,5","3":"3,6,5"},
"custom_ad_schedule_timezone": 0,
"network": "WIFI",
"target_device": "PHONE"
}
| Fields | Type | Explanations | Default Value | Examples |
|---|---|---|---|---|
| offer_id | int | offer の一意の id | — | 1234 |
| offer_name | string | offer の一意の名前。使用できるのは alphabets、underscores、numbers のみです。長さは 3〜95。 | "" | "offer_test" |
| promote_timezone | number | promotion period の timezone setting。Enum value: [ENUM-Timezone] |
"" | 5.5 |
| start_time | int | promotion start time の timestamp。end_time がある場合は、それより前である必要があります。 | — | 1578455012 |
end_time Optional |
int | promotion end time の timestamp。start_time がある場合は、それより後である必要があります。 | 0 | 1578455169 |
| target_geo | string | promotion の target geos。global promotion の場合は "ALL" を設定します。複数 geos はカンマで区切ります。 | — | "CN" |
os_version_min Optional |
string | /^[0-9](\.[0-9]){0,2}$/ 形式の minimum OS version。"x" は自然数です。null に設定した場合、OS version requirement はデフォルトで campaign と同じになります。 |
— | "9.0" |
custom_ad_schedule Optional |
json | Promotion schedule。Key は weekday(1-7)、value は hour(0-23)を意味します。null に設定するとすべての weekdays と all hours が選択されます。 | — | {"1":"0,1,23","2":"3,4,5"} |
custom_ad_schedule_timezone Deprecated |
number | promotion schedule の timezone setting。Enum value: [ENUM-Timezone] This field has been deprecated, use the 'promote_timezone' field instead. |
— | -5.5 |
network Optional |
string | device network status の target。Enum value: [ENUM-Network] |
— | "2G,3G,4G,5G" |
target_device Optional |
string | Target device type。ENUM value: "PHONE" 、"TABLET"。 |
"PHONE,TABLET" | "PHONE,TABLET" |
| Fields | Type | Explanations |
|---|---|---|
| code | int | 200 code は成功を示します。それ以外は失敗です。 |
| msg | string | 成功時は "success" を返します。失敗時は詳細なエラー情報を返します。 |
| data | json | 成功時は offer data を返します。失敗時は詳細なエラー情報を返します。 |
| offer_id | int | offer の一意の id |
| offer_name | string | 設定した Offer name |
| promote_timezone | number | promotion period の timezone setting(例: -5) |
| start_time | int | promotion start time の timestamp。 |
| end_time | int | promotion end time の timestamp。 |
| target_geo | string | promotion の Target geos(例: US,CN) |
| os_version_min | string | Minimum OS version |
| custom_ad_schedule | string | Promotion schedule |
| custom_ad_schedule_timezone | number | promotion schedule の timezone settingThis field has been deprecated, use the 'promote_timezone' field instead. |
| network | string | device network status の target |
| target_device | string | Target device type |
{
"code": 200,
"msg": "success",
"data": {
"offer_id": 18496,
"offer_name": "cqf_testtttt",
"promote_timezone": 7,
"start_time": "1578455012",
"end_time": "1578458012",
"target_geo": "ALL",
"os_version_min": "8.8",
"custom_ad_schedule": "{\"1\":\"0,1,23\",\"2\":\"3,4,5\",\"3\":\"3,6,5\"}",
"custom_ad_schedule_timezone": 0,
"network": "WIFI",
"target_device": "PHONE"
}
}