Difference between revisions of "Offerit API Set Subaffiliate Status"
From Offerit
OfferitJames (talk | contribs) |
OfferitJames (talk | contribs) |
||
Line 10: | Line 10: | ||
== NuSOAP Example == | == NuSOAP Example == | ||
− | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]] | + | This example continues from the [[Offerit_API#Example|main article NuSOAP Example]]: |
<pre> | <pre> | ||
Line 19: | Line 19: | ||
); | ); | ||
− | $result = $client->call('set_aff_sub_status', | + | $result = $client->call('set_aff_sub_status', $values, 'offeritapiadmin_wsdl'); |
</pre> | </pre> | ||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
− | ==Server Request== | + | ==Server Request/Response== |
− | + | '''Request''' | |
<pre> | <pre> | ||
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | ||
Line 47: | Line 47: | ||
</pre> | </pre> | ||
− | + | '''Response:''' | |
− | |||
<pre> | <pre> | ||
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" | <?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" |
Revision as of 13:51, 9 December 2011
This function allows you to set the status for a specfic affiliate. To use this function, you must make a SOAP call with the following parameters:
- affid - (required) The ID of the affiliate.
- aff_subid - (required) The status to which you want the sub affiliate changed.
- status - (required) Can pass in values 0 or 'pending', 1 or 'approved' or 'active', 2 or 'banned'
NuSOAP Example
This example continues from the main article NuSOAP Example:
$values = Array( 'affid' => 1, 'aff_subid' => 1, 'status' => 'active' ); $result = $client->call('set_aff_sub_status', $values, 'offeritapiadmin_wsdl');
Sample Output
on success: Status: SUCCESS on failure: error message or Status: FAILURE
Server Request/Response
Request
<?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:offeritapiadmin_wsdl"><SOAP-ENV:Body><tns:set_aff_sub_status xmlns:tns="urn:offeritapiadmin_wsdl"> <affid xsi:type="xsd:int">1</affid> <aff_subid xsi:type="xsd:string">1</aff_subid> <status xsi:type="xsd:string">active</status> </tns:set_aff_sub_status></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response:
<?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/"> <SOAP-ENV:Body><ns1:set_aff_sub_statusResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="xsd:string">Invalid Sub Affiliate/No Change</return> </ns1:set_aff_sub_statusResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>