Skip to content

Update Offer

PS: You need to use Token to change the status, for more details, please check Token

Updating basic information of offer,such as promote time、target area and so on.

Request address

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

Request method

PUT

Request example

json
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"
}

Request Parameter

FieldsTypeExplanationsDefault ValueExamples
offer_idintUnique id for offer1234
offer_namestringUnique name for offer. Only alphabets, underscores and numbers are allowed. Length within 3~95."""offer_test"
promote_timezonenumberTimezone setting for promotion period,Enum value in [EUNM - Timezone]""5.5
start_timeintTimestamp of promotion start time. Must be earlier than end_time (if any).1578455012
end_time OptionalintTimestamp of promotion end time. Must be after start_time (if any).01578455169
target_geostringTarget geos for promotion. Set "ALL" for global promotion. Separate with commas for multiple geos."CN"
os_version_min OptionalstringMinimum OS version allowed in format of /^[0-9](\.[0-9]){0,2}$/ . "x" as in natural number. If set null, OS version requirement will be same as campaign by default."9.0"
custom_ad_schedule OptionaljsonPromotion schedule. Key means weekday (1-7) and value means hour (0-23). Set null to select all weekdays and all hours.{"1":"0,1,23","2":"3,4,5"}
custom_ad_schedule_timezone DeprecatednumberTimezone setting for promotion schedule.Enum value in [EUNM - Timezone]
This field has been deprecated, use the 'promote_timezone' field instead.
-5.5
network OptionalstringTarget for device network status. Enum value in [EUNM - Network]"2G,3G,4G,5G"
target_device OptionalstringTarget device type. ENUM value: "PHONE""TABLET""PHONE,TABLET""PHONE,TABLET"

Response

FieldsTypeExplanations
codeint200 code, is success. Others, are fail.
msgstringIf success, return "success". If fail, return to detailed wrong info.
datajsonIf success, return offer data. If fail, return to detailed wrong info.
offer_idintUnique id for offer
offer_namestringOffer name you set
promote_timezonenumberTimezone setting for promotion period, such as -5
start_timeintTimestamp of promotion start time.
end_timeintTimestamp of promotion end time.
target_geostringTarget geos for promotion.such as US,CN
os_version_minstringMinimum OS version
custom_ad_schedulestringPromotion schedule
custom_ad_schedule_timezonenumberTimezone setting for promotion schedule
This field has been deprecated, use the 'promote_timezone' field instead.
networkstringTarget for device network status
target_devicestringTarget device type

Response Example

json
{
  "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"
  }
}