Difference between revisions of "NATS4 API Get Member Instant Upgrade String"
TMMStephenY (talk | contribs) (Created page with '{{NATS4 Manual | show_api_admin_section = true }} The Get Member Instant Upgrade API function is a feature in NATS4 that allows you to perform an instant upgrade for your [[…') |
TMMStephenY (talk | contribs) |
||
Line 8: | Line 8: | ||
These are parameters used to specify which member you're looking for. This function will only return one member; use these filters to choose which one. | These are parameters used to specify which member you're looking for. This function will only return one member; use these filters to choose which one. | ||
* memberid | * memberid | ||
+ | * session | ||
* siteid | * siteid | ||
* siteids | * siteids | ||
Line 43: | Line 44: | ||
<SOAP-ENV:Body> | <SOAP-ENV:Body> | ||
<tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> | <tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> | ||
− | <username xsi:type="xsd:string"> | + | <username xsi:type="xsd:string">testuser</username> |
− | <siteid xsi:type="xsd:int"> | + | <siteid xsi:type="xsd:int">1</siteid> |
</tns:get_member_instant_upgrade_string> | </tns:get_member_instant_upgrade_string> | ||
</SOAP-ENV:Body> | </SOAP-ENV:Body> | ||
Line 56: | Line 57: | ||
<SOAP-ENV:Body> | <SOAP-ENV:Body> | ||
<tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> | <tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> | ||
− | <username xsi:type="xsd:string"> | + | <username xsi:type="xsd:string">testuser</username> |
<siteids xsi:type="xsd:string">1,2,3,4</siteids> | <siteids xsi:type="xsd:string">1,2,3,4</siteids> | ||
</tns:get_member_instant_upgrade_string> | </tns:get_member_instant_upgrade_string> | ||
Line 76: | Line 77: | ||
</SOAP-ENV:Envelope> | </SOAP-ENV:Envelope> | ||
</pre> | </pre> | ||
+ | |||
+ | If you make an incorrect request, your response will be similar to: | ||
+ | <pre> | ||
+ | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
+ | <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> | ||
+ | <SOAP-ENV:Body> | ||
+ | <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl"> | ||
+ | <return xsi:type="tns:string">cb7a4e50fbab656832aa30b5e2d8dea9</return> | ||
+ | </ns1:get_member_upsell_stringResponse> | ||
+ | </SOAP-ENV:Body> | ||
+ | </SOAP-ENV:Envelope> | ||
+ | </pre> | ||
+ | |||
+ | In the 'bad' response output, the get_member_upsell_string will be returned as blank. | ||
=== NuSOAP Example === | === NuSOAP Example === | ||
Line 83: | Line 98: | ||
<pre> | <pre> | ||
$values = array( | $values = array( | ||
− | 'memberid' => | + | 'memberid' => 544, |
− | 'session' => ' | + | 'session' => '797e62f8f1dfbe20f7c6c37754e0b880' |
); | ); | ||
Line 94: | Line 109: | ||
$values = array( | $values = array( | ||
'username' => testuser, | 'username' => testuser, | ||
− | 'siteid' => ' | + | 'siteid' => '1' |
); | ); | ||
Revision as of 16:27, 5 April 2011
The Get Member Instant Upgrade API function is a feature in NATS4 that allows you to perform an instant upgrade for your members using an API call.
Filters
These are parameters used to specify which member you're looking for. This function will only return one member; use these filters to choose which one.
- memberid
- session
- siteid
- siteids
- username
In order to get a return from this function, you must use a combination of these filters when requesting information. The possible combinations here are:
- memberid and session
- username and siteid
- username and siteids
Examples
Requests
The following are examples of the requests you can make with this API function:
Note: This API function will only look up active members. Looking up an inactive or expired member will cause a blank return.
Member ID and Session
<?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> <SOAP-ENV:Body> <tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> <memberid xsi:type="xsd:int">544</memberid> <session xsi:type="xsd:string">797e62f8f1dfbe20f7c6c37754e0b880</session> </tns:get_member_instant_upgrade_string> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Username and Site ID
<?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> <SOAP-ENV:Body> <tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> <username xsi:type="xsd:string">testuser</username> <siteid xsi:type="xsd:int">1</siteid> </tns:get_member_instant_upgrade_string> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Username and Site IDs
<?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> <SOAP-ENV:Body> <tns:get_member_instant_upgrade_string xmlns:tns="urn:natsapiadmin_wsdl"> <username xsi:type="xsd:string">testuser</username> <siteids xsi:type="xsd:string">1,2,3,4</siteids> </tns:get_member_instant_upgrade_string> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Responses
You will get a response similar to:
<?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> <SOAP-ENV:Body> <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl"> <return xsi:type="tns:string">cb7a4e50fbab656832aa30b5e2d8dea9</return> </ns1:get_member_upsell_stringResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
If you make an incorrect request, your response will be similar to:
<?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:natsapiadmin_wsdl"> <SOAP-ENV:Body> <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl"> <return xsi:type="tns:string">cb7a4e50fbab656832aa30b5e2d8dea9</return> </ns1:get_member_upsell_stringResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
In the 'bad' response output, the get_member_upsell_string will be returned as blank.
NuSOAP Example
(continuing from main article NuSOAP Example):
memberid and session
$values = array( 'memberid' => 544, 'session' => '797e62f8f1dfbe20f7c6c37754e0b880' ); $result = $client->call('get_member_instant_upgrade_string', $values, 'natsapiadmin_wsdl');
username and siteid
$values = array( 'username' => testuser, 'siteid' => '1' ); $result = $client->call('get_member_instant_upgrade_string', $values, 'natsapiadmin_wsdl');
username and siteids
$values = array( 'username' => testuser, 'siteids' => '1,2,3,4' ); $result = $client->call('get_member_instant_upgrade_string', $values, 'natsapiadmin_wsdl');