Topics
Support
Advertiser Edit
Advertiser Edit
Description
This function is intended to provides you ability to edit advertiser info.
API function Information
| Info |
|---|
| API Function Name: advertiser_edit |
| API Function Call: http://[your_system_domain_name]/api/advertiser_edit/ |
POST Parameters
| Parameter | Option | Value Type | Example | Description |
|---|---|---|---|---|
| User_ID | required | string | 1 | User ID. |
| API_Key | required | string | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | API key. |
| id | required | numeric | 1 | Advertiser ID. |
| login |
required | string | login | Login. |
| password |
required | string | pass | New password. |
| password_conf | required |
string | pass | Password confirm. |
| name | required |
string | Name | Company Name. |
| sites | required |
string | http://google.com | Site URL. |
| status | required |
numeric | 1 | Status. Рossible values |
| country_id | optional | numeric | 1 | Country. Рossible values |
| state_id | optional | numeric | 1 | State. Рossible values |
| address | required |
string | some adress | Address. |
| city | required | string | Tokyo | City. |
| postal | required | string | 40000 | Postal code |
| fname | required | string | first Name | First Name. |
| lname | required | string | last Name | Last Name. |
| required | string | some@mail.com | Email. | |
| phone | required | string | 1-700-000-000 | Phone. |
| fax | optional | string | 1-700-000-000 | Fax. |
| im_type | optional | numeric | 1 | IM type. Рossible values |
| im | optional | string | 0000000000 | IM number. |
| title | optional | string | some Title | Professional Title. |
| tech_name | optional | string | some Name | Technical Contact. |
| tech_phone |
optional | string | 1-700-000-000 | Contact Phone. |
| tech_email |
optional | string | some@mail.com | Contact E-mail. |
| bill_name | optional | string | some Name | Billing Contact. |
| bill_phone | optional | string | 1-700-000-000 | Contact Phone. |
| bill_email | optional | string | some@mail.com | Contact E-mail. |
| tax_id | required | string | 000000000 | Tax ID / SSN. |
| tax_class | optional | numeric | 1 | Tax Classification. Рossible values |
| payment_terms | optional | numeric | 1 | Payment terms . Рossible values |
| payment_details_2 | optional | string | 0000000000 | Advance Payment. |
| managers[] | optional | array | array(1, 2, 3) | Managers list. |
| notes | optional | string | some notes | Notes. |
| image | optional | file | Logo image. | |
| remove | optional | numeric | 1 | Remove logo image. |
| notifications | optional | numeric | 1 | E-mail Notifications. |
Request example
<?php
// API Function URL
$api_function_call = 'http://[your_system_domain_name]/api/advertiser_edit/';
// POST parameters array
$post_params = array(
'User_ID' => '0000000000',
'API_Key' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'id' => 1,
'login' => 'Login',
'name' => 1,
'sites' => 1,
'status' => 1,
'country_id ' => 1,
'state_id' => 1,
'address' => 'Some adress',
'city' => 1,
'postal' => 1,
'fname' => 'First Name',
'lname' => 'Last Name',
'email' => 'some@mail.come',
'phone' => '1-700-000-000',
'fax' => '1-700-000-000',
'im_type' => 1,
'im' => 00000000,
'title' => 'Some title',
'tech_name' => 'Some name',
'tech_phone' => '1-700-000-000',
'tech_email' => 'some@mail.com',
'bill_name' => 'Some Name',
'bill_phone' => '1-700-000-000',
'bill_email' => 'some@mail.com',
'tax_id' => 1,
'tax_class' => 1,
'payment_type' => 1,
'payment_terms' => 1,
'payment_details_2' => 'Some details',
'ref_id' => 1,
'ref_share' => 1,
'notes' => 'Some notes',
'notifications ' => 1,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_function_call);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);
$aResult = curl_exec($ch);
curl_close($ch);
echo '
';
var_dump( $aResult );
echo '
';
?>
Response example
The user account has been successfully updated.