Difference between revisions of "NATS4 API Get Affiliate Loginids"
From TMM Wiki
Jump to navigationJump to searchTmmStephen (talk | contribs) |
TmmStephen (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
[[NATS4]] supports an API function to get a list of affiliate IDs based on a list of affiliate usernames. | [[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: | get_affiliate_loginids accepts the following parameters: |
Latest revision as of 15:18, 28 March 2017
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 ) )