Skip to content

Add Advertiser

POST /advertiser/add_advertiser

Description URL Response Format Request Method Authentication
Adds a new advertiser https://domain/api/advertiser/add_advertiser JSON POST HTTP headers

Parameters

Paremeters must be sent with the request body. The examples below show the parameters sent as x-www-form-urlencoded

Name Description Type Required
username Id of affiliate to edit (unique) string yes
password Affiliate Password string yes
email Email address for this affiliate (unique) string yes
firstname advertiser first name string no
lastname advertiser last name string no
company advertiser company name string no
url advertiser url string no
tel advertiser tel string no
icq advertiser icq string no
aim advertiser aim string no
msn advertiser msn string no
address1 advertiser address line 1 string no
address2 advertiser address line 2 string no
city advertiser city string no
state advertiser state string no
country advertiser country string no
zip_code advertiser zip code string no
ref Tracking code to identifier who referred this affiliate string no
join_ip advertiser ip string no

Example Request

POST

http://domain/api/affiliate/add_advertiser
username = hello
password = apitest
firstname = hello
lastname = test
email = hello@advertiserit.com
company = Trackfinity
url = advertiserit.com
tel = 666-666-6666
icq = 666666666
aim = sixsixsix
msn = sixsixtysix
address1 = 666 666 st
address2 = 
city = My City
state = My State
country = USA
zip_code = 12345
ref = asdasd

Response: [{ "result":"Success","message":{"loginid":"4003"}}]

Example Code

php

<?php
$curl = curl_init();

$url = 'http://domain/api/affiliate/add_advertiser';

$headers = array(
    'api-key: 44b5498dbcb481a0d00b404c0169af62',
    'api-username: productsupport'
);

$data = array(
    'username' => 'hello3',
    'password' => 'apitest',
    'firstname' => 'hello',
    'lastname' => 'test',
    'email' => 'hello3@advertiserit.com',
    'company' => 'Trackfinity',
    'url' => 'advertiserit.com',
    'tel' => '666-666-6666',
    'icq' => '666666666',
    'aim' => 'sixsixsix',
    'msn' => 'sixsixtysix',
    'address1' => '666 666 st',
    'address2' => '',
    'city' => 'My City',
    'state' => 'My State',
    'country' => 'USA',
    'zip_code' => '12345',
    'ref' => 'asdasd',
    'join_ip' => '192.168.1.1',
);


$resp = curl_exec($curl);
//dumps an associative array representation of the json response
$output = json_decode($resp, true);
if($output !== NULL) {
    //json was valid. Dump the decoded array
    print_r($output);
}
else {
    //invalid json, just dump the raw response
    print_r($resp);
}
// Close request to clear up some resources
curl_close($curl);
?>