Difference between revisions of "Offerit API Set Affiliate Status"
From Offerit
OfferitJames (talk | contribs) (→Sample Output) |
OfferitRobC (talk | contribs) |
||
Line 59: | Line 59: | ||
<return xsi:type="xsd:string">Invalid Affiliate/No Change</return></ns1:set_aff_statusResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | <return xsi:type="xsd:string">Invalid Affiliate/No Change</return></ns1:set_aff_statusResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
</pre> | </pre> | ||
− | |||
− |
Revision as of 17:52, 23 December 2011
This function allows you to add a sale data for a specfic affiliate. To use this function, you must make a SOAP call with the following parameters:
- affid - The ID of the affiliate.
- status - The status to which you want the affiliate changed. Can pass in 'approved' or 0, 'disabled' or 1, 'terminated' or 2, 'waitonverify' or 3, 'pending' or 4, 'denied' or 5
- auto_pending - set to either 0 or 1, affiliates with auto_pending set to 1 will have transactions come in as pending. If 0, transactions will be processed as continuity.
- public_reason - (optional) The public reason why the affiliates status is being changed.
- internal_reason - (optional) The private reason why the affiliates status is being changed.
NuSOAP Example
This example continues from the main article NuSOAP Example:
$values = Array( 'affid' => 5, // The ID of the affiliate 'status' => 2, // The status you want the affiliate to change to 'auto_pending' => 1, //set to either 0 or 1, affiliates with auto_pending set to 1 will have transactions come in as pending. If 0, transactions will be processed as continuity. 'public_reason' => 'test public', // (optional) The public reason why the affiliates status is being changed 'internal_reason' => 'test internal',// (optional) The private reason why the affiliates status is being changed ); $result = $client->call('set_aff_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_status xmlns:tns="urn:offeritapiadmin_wsdl"> <affid xsi:type="xsd:int">5</affid><status xsi:type="xsd:string">2</status> <auto_pending xsi:type="xsd:int">1</auto_pending> <public_reason xsi:type="xsd:string">test public</public_reason> <internal_reason xsi:type="xsd:string">test internal</internal_reason> </tns:set_aff_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_statusResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="xsd:string">Invalid Affiliate/No Change</return></ns1:set_aff_statusResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>