Difference between revisions of "NATS4 API Get Member Upsell String"
TMMStephenY (talk | contribs) (Created page with '{{NATS4 Manual | show_api_admin_section = true }} The Get Member Upsell String API function is a feature in NATS4 that allows you to perform upsells for [[Ct#Member|members]…') |
TMMStephenY (talk | contribs) m |
||
(One intermediate revision by the same user not shown) | |||
Line 84: | Line 84: | ||
<SOAP-ENV:Body> | <SOAP-ENV:Body> | ||
<ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl"> | <ns1:get_member_upsell_stringResponse xmlns:ns1="urn:natsapiadmin_wsdl"> | ||
− | <return xsi:type="tns:string"> | + | <return xsi:type="tns:string"></return> |
</ns1:get_member_upsell_stringResponse> | </ns1:get_member_upsell_stringResponse> | ||
</SOAP-ENV:Body> | </SOAP-ENV:Body> | ||
Line 124: | Line 124: | ||
$result = $client->call('get_member_upsell_string', $values, 'natsapiadmin_wsdl'); | $result = $client->call('get_member_upsell_string', $values, 'natsapiadmin_wsdl'); | ||
</pre> | </pre> | ||
+ | |||
+ | [[Category:NATS4 API Articles]] |
Latest revision as of 11:46, 18 May 2011
The Get Member Upsell String API function is a feature in NATS4 that allows you to perform upsells for 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_upsell_string xmlns:tns="urn:natsapiadmin_wsdl"> <memberid xsi:type="xsd:int">544</memberid> <session xsi:type="xsd:string">797e62f8f1dfbe20f7c6c37754e0b880</session> </tns:get_member_upsell_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_upsell_string xmlns:tns="urn:natsapiadmin_wsdl"> <username xsi:type="xsd:string">testuser</username> <siteid xsi:type="xsd:int">1</siteid> </tns:get_member_upsell_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_upsell_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_upsell_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"></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_upsell_string', $values, 'natsapiadmin_wsdl');
username and siteid
$values = array( 'username' => testuser, 'siteid' => '1' ); $result = $client->call('get_member_upsell_string', $values, 'natsapiadmin_wsdl');
username and siteids
$values = array( 'username' => testuser, 'siteids' => '1,2,3,4' ); $result = $client->call('get_member_upsell_string', $values, 'natsapiadmin_wsdl');