Skip to content

Edit Advertiser

PATCH /advertiser/edit_advertiser

Description URL Response Format Request Method Authentication
Edits an existing advertiser account https://domain/api/advertiser/edit_advertiser JSON PATCH 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
loginid Id of affiliate to edit integer yes
password Affiliate Password string no
email Email address for this advertiser (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
join_ip advertiser ip string no

Example Request

PATCH

http://domain/api/advertiser/edit_advertiser
loginid = 4002
password = apitest
firstname = hello
lastname = test
email = hello@trackfinity.com
company = Trackfinity
url = trackfinity.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

Response: [{"result":"Success","}]

Example Code

php

<?php
$curl = curl_init();

$url = 'http://domain/api/advertiser/edit_advertiser';

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

$data = array(
    'loginid' => 4002,
    'password' => 'apitest',
    'firstname' => 'hello',
    'lastname' => 'test',
    'email' => 'hello3@trackfinity.com',
    'company' => 'Trackfinity',
    'url' => 'trackfinity.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',
    'join_ip' => '192.168.1.1',
);

curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); 
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));    

$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);
?>