Difference between revisions of "Offerit API List Affiliate Subaffiliates"
From Offerit
OfferitRob (talk | contribs) |
OfferitRob (talk | contribs) |
||
Line 19: | Line 19: | ||
'start' => 1, | 'start' => 1, | ||
'count' => 10, | 'count' => 10, | ||
− | 'order' => ' | + | 'order' => 'subaff' |
); | ); | ||
$result = $client->call('list_aff_subaffs', $values, 'offeritapiadmin_wsdl'); | $result = $client->call('list_aff_subaffs', $values, 'offeritapiadmin_wsdl'); |
Revision as of 12:38, 19 September 2012
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' => 'subaff' ); $result = $client->call('list_aff_subaffs', $values, 'offeritapiadmin_wsdl');
Sample Output
Array ( [0] => Array ( [additional_trackingid] => 2 [subaff] => asdfsadf [subaff2] => asdf123423 [subaff3] => [subaff4] => [subaff5] => [loginid] => 2 ) [1] => Array ( [additional_trackingid] => 3 [subaff] => tester [subaff2] => hello [subaff3] => adam [subaff4] => [subaff5] => [loginid] => 2 ) [2] => Array ( [additional_trackingid] => 1 [subaff] => tmmadam [subaff2] => adamtest [subaff3] => [subaff4] => [subaff5] => [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">subaff</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> <subaff xsi:type="xsd:string">asdfsadf</subaff> <subaff2 xsi:type="xsd:string">asdf123423</subaff2> <subaff3 xsi:type="xsd:string"></subaff3> <subaff4 xsi:type="xsd:string"></subaff4> <subaff5 xsi:type="xsd:string"></subaff5> <loginid xsi:type="xsd:string">2</loginid></item> <item><additional_trackingid xsi:type="xsd:string">3</additional_trackingid> <subaff xsi:type="xsd:string">tester</subaff> <subaff2 xsi:type="xsd:string">hello</subaff2> <subaff3 xsi:type="xsd:string">adam</subaff3> <subaff4 xsi:type="xsd:string"></subaff4> <subaff5 xsi:type="xsd:string"></subaff5> <loginid xsi:type="xsd:string">2</loginid></item> <item><additional_trackingid xsi:type="xsd:string">1</additional_trackingid> <subaff xsi:type="xsd:string">tmmadam</subaff> <subaff2 xsi:type="xsd:string">adamtest</subaff2> <subaff3 xsi:type="xsd:string"></subaff3> <subaff4 xsi:type="xsd:string"></subaff4> <subaff5 xsi:type="xsd:string"></subaff5> <loginid xsi:type="xsd:string">2</loginid></item> </return></ns1:list_aff_subaffsResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>