Offerit API Set Affiliate Status
From Offerit
Revision as of 13:55, 1 February 2013 by OfferitMegan (talk | contribs)
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