NATS4 API Get Affiliate Loginids
From TMM Wiki
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
NATS4 supports an API function to get a list of affiliate IDs based on a list of affiliate usernames.
get_affiliate_loginids accepts the following parameters:
- usernames - An array containing all the usernames.
NuSOAP Example
This example continues from the main article NuSOAP Example):
$params = Array( 'usernames' => Array( 'TMMMikeS', 'NewAffiliate', 'DoesNotExist', ), ); $result = $client->call('get_affiliate_loginids', $params, 'natsapiadmin_wsdl'); print_r($result);
Affiliate Loginids Data Output
The output will be an array of affiliate usernames and affiliate IDs. loginid will be -1 if the affiliate cannot be found within NATS.
Array ( [0] => Array ( [username] => TMMMikeS [loginid] => 2 ) [1] => Array ( [username] => NewAffiliate [loginid] => 1429730 ) [2] => Array ( [username] => DoesNotExist [loginid] => -1 ) )