NATS4 API Get Affiliate Loginids
From TMM Wiki
Revision as of 15:18, 28 March 2017 by TmmStephen (talk | contribs)
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 ) )