Additional Ad Campaigns Settings

Viewing

campaign/prefs

Parameters:

  • token — authorization (string)
  • id — id of the ad campaign (int)

Example of the method request:

 $token,
        'id' => 999999
    );
    if( $curl = curl_init() ) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/prefs');
        curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
        $out = curl_exec($curl);
        echo $out;
        curl_close($curl);
    }

// Result:

{
    "ip_limit": "1_30", // IP execution limit
    "auto_add_visits": 0, // automatically add visits
    "auto_add_limit": 0, // if the remainder is less than
    "timezone": "Europe/Moscow", // time zone
    "scheduled_start": 0, // scheduled launch of the campaign
    "scheduled_stop": 0, // scheduled stop of the campaign
    "sex": "any", // gender of performers
    "age_min": 0, // minimum age of performers
    "age_max": 0, // maximum age of performers
    "hours_limits": { // execution limits by hours per day
        "0": "33",
        "1": "22",
        "2": "15",
        "3": "8",
        "4": "4",
        "5": "8",
        "6": "15",
        "7": "26",
        "8": "37",
        "9": "51",
        "10": "62",
        "11": "62",
        "12": "66",
        "13": "66",
        "14": "70",
        "15": "73",
        "16": "70",
        "17": "66",
        "18": "55",
        "19": "44",
        "20": "44",
        "21": "40",
        "22": "40",
        "23": "33"
    },
    "days_limits": { // execution limits by days of the week
        "monday": "1000",
        "tuesday": "1000",
        "thursday": "1000",
        "wednesday": "1000",
        "friday": "1000",
        "saturday": "1000",
        "sunday": "1000"
    },
    "days_hours": { // hours per days, when execution is allowed
        "monday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "tuesday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "thursday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "wednesday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "friday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "saturday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23",
        "sunday": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23"
    },
    "error_code": 0
}

Editing

campaign/prefs_set

Parameters:

  • token — authorization (string)
  • id — id of the ad campaign (int)
  • ip_limit — IP executions limit (string). Values:
    • 50 — 50 times a day
    • 20 — 20 times a day
    • 10 — 10 times a day
    • 5 — 5 times a day
    • 4 — 4 times a day
    • 3 — 3 times a day
    • 2 — 2 times a day
    • 1 — 1 time per day
    • 1_2 — 1 time in 2 days
    • 1_3 — 1 time in 3 days
    • 1_5 — 1 time in 5 days
    • 1_7 — 1 time in 7 days
    • 1_15 — 1 time in 15 days
    • 1_30 — 1 time in 30 days
    • 1_0 — 1 time for all time
  • auto_add_visits — the number of automatically added executions to the campaign account from the main balance when the remainder of the executions on the campaign account is less than auto_add_limit (int)
  • auto_add_limit — limit of executions on the campaign account, when executions will be automatically added (int)
  • timezone — time zone (string)
  • scheduled_start — the time of the scheduled start of the campaign (unix timestamp)
  • scheduled_stop — the time of the scheduled stop of the campaign (unix timestamp)
  • sex — gender of performers (string). Values: male, female, any
  • age_min — minimum age of performers (unix timestamp)
  • age_max — maximum age of performers (unix timestamp)

Example of the method request:

 $token,
        'id' => 999999,
        'scheduled_start' => 1575222535
        'scheduled_stop' => 1545722535
    );
    if( $curl = curl_init() ) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/prefs_set');
        curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
        $out = curl_exec($curl);
        echo $out;
        curl_close($curl);
    }

// Result:

{
    "status": "ok",
    "error_code": 0
}
IPweb

Rate the material:

Rating: 2.38 out of 5. Total ratings: 4.