Difference between revisions of "Offerit API List Affiliate Subaffiliates"
From Offerit
OfferitJames (talk | contribs) (→Sample Output) |
OfferitRobC (talk | contribs) |
||
Line 110: | Line 110: | ||
</return></ns1:list_aff_subaffsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | </return></ns1:list_aff_subaffsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> | ||
</pre> | </pre> | ||
− | |||
− |
Revision as of 17:52, 23 December 2011
This function lists the sub affiliates under a specific affiliate. To use this function, you must make a SOAP call with the following parameters:
- loginid - The affiliate ID to get sub affiliates from
- start - (optional) The index to start on
- count - (optional) The amount of records to get
- order - (optional) The order of the records
NuSOAP Example
This example continues from the main article NuSOAP Example:
$values = Array( 'loginid' => 2, 'start' => 1, 'count' => 10, 'order' => 'aff_subaffs' ); $result = $client->call('list_aff_subaffs', $values, 'offeritapiadmin_wsdl');
Sample Output
Array ( [0] => Array ( [additional_trackingid] => 2 [aff_subid] => asdfsadf [aff_subid2] => asdf123423 [aff_subid3] => [aff_subid4] => [aff_subid5] => [loginid] => 2 ) [1] => Array ( [additional_trackingid] => 3 [aff_subid] => tester [aff_subid2] => hello [aff_subid3] => adam [aff_subid4] => [aff_subid5] => [loginid] => 2 ) [2] => Array ( [additional_trackingid] => 1 [aff_subid] => tmmadam [aff_subid2] => adamtest [aff_subid3] => [aff_subid4] => [aff_subid5] => [loginid] => 2 ) )
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:list_aff_subaffs xmlns:tns="urn:offeritapiadmin_wsdl"> <loginid xsi:type="xsd:int">2</loginid> <start xsi:type="xsd:int">1</start> <count xsi:type="xsd:int">10</count> <order xsi:type="xsd:string">aff_subid</order> </tns:list_aff_subaffs></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:list_aff_subaffsResponse xmlns:ns1="urn:offeritapiadmin_wsdl"> <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType=":[3]"> <item><additional_trackingid xsi:type="xsd:string">2</additional_trackingid> <aff_subid xsi:type="xsd:string">asdfsadf</aff_subid> <aff_subid2 xsi:type="xsd:string">asdf123423</aff_subid2> <aff_subid3 xsi:type="xsd:string"></aff_subid3> <aff_subid4 xsi:type="xsd:string"></aff_subid4> <aff_subid5 xsi:type="xsd:string"></aff_subid5> <loginid xsi:type="xsd:string">2</loginid></item> <item><additional_trackingid xsi:type="xsd:string">3</additional_trackingid> <aff_subid xsi:type="xsd:string">tester</aff_subid> <aff_subid2 xsi:type="xsd:string">hello</aff_subid2> <aff_subid3 xsi:type="xsd:string">adam</aff_subid3> <aff_subid4 xsi:type="xsd:string"></aff_subid4> <aff_subid5 xsi:type="xsd:string"></aff_subid5> <loginid xsi:type="xsd:string">2</loginid></item> <item><additional_trackingid xsi:type="xsd:string">1</additional_trackingid> <aff_subid xsi:type="xsd:string">tmmadam</aff_subid> <aff_subid2 xsi:type="xsd:string">adamtest</aff_subid2> <aff_subid3 xsi:type="xsd:string"></aff_subid3> <aff_subid4 xsi:type="xsd:string"></aff_subid4> <aff_subid5 xsi:type="xsd:string"></aff_subid5> <loginid xsi:type="xsd:string">2</loginid></item> </return></ns1:list_aff_subaffsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>