إضافة فئة

يقرأ 1 دقيقة

category/add

المعلمات:

  • token - المصادقة (سلسلة)
  • name - اسم الفئة (سلسلة)
  • uniq_ips - عناوين IP الفريدة لجميع مواقع التسويق التابعة في الفئة (عدد صحيح)

مثال على استدعاء الطريقة:

<?php
    $post = array(
        'token' => $token,
        'name' => 'mysite.ru-new',
        'uniq_ips' => 1
    );
    if( $curl = curl_init() ) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/category/add');
        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);
    }

// Результат:

{
    "status": "ok",
    "error_code": 0
}
Categories of Advertising Campaigns 26 - less than 2 characters in category name
27 - a category with this name already exists
28 - the category is not found
29 - error setting unique ip for the category
IPweb

Rate the material:

Rating: 0 out of 5. Total ratings: 0.
Last modified

I don't understand anything! Help :-(