Difference between revisions of "NATS4 API Get Affiliate Loginids"
From TMM Wiki
Jump to navigationJump to searchTMMMikeSopko (talk | contribs) (Created page with "{{NATS4 Manual | show_api_admin_section = true }} NATS4 supports an API function to get a list of affiliate IDs based on a list of affiliate usernames. get_affiliate_lo...") |
TmmStephen (talk | contribs) |
(2 intermediate revisions by the same user not shown) | |
(No difference)
|
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 ) )