Submit a Ticket My Tickets
Welcome
Login  Sign up

REPORTS LeadsByAffiliateExport API Version 2

REPORTS LeadsbyAffiliateExport API Version 2

Updated on 2018-01/17
Current Version: Version 2
Deprecated Version: 1
Requests Allowed: GET&SOAP
 


Summary:

Returns an array of leads, potentially filtered by an Affiliate ID similarly to the data returned in the Lead By Affiliate report in the CAKE UI. In version 2 we have added the ability to filter by Offer, Vertical, Affiliate Manager, Lead tier IDs and upsells.


Note: This API does not support JSON requests.


Resource/WSDL Page:

http://yourdomainhere.com/api/2/reports.asmx?op=LeadsByAffiliateExport

 

Parameters

api_key
Required
Type: STRING
Length (Max/Min): 50

Must be a valid API key (existing and NOT expired)
Example Values: Fo35NRAqvFLXoZxqB4aVMhh
start_date
Required
Type: DATE
Length (Max/Min): NA
Allowed formats: "YYYY-mm-dd", "dd-mm-YYYY", "mm-dd-YYYY", "mm-dd-YYYY hh:mm:ss"
Example Values: 2014-04-24, 24-04-2014
end_date
Required
Type: DATE
Length (Max/Min): NA
Allowed formats: "YYYY-mm-dd", "dd-mm-YYYY", "mm-dd-YYYY", "mm-dd-YYYY hh:mm:ss"
When time stamp is excluded 00:00:00 is assumed, and data on end date will not be included.
Example Values: 2014-04-24, 24-04-2014
source_affiliate_id
Required
Type: INT
Length (Max/Min): NA
If passing anything <= 0 the result will include all affiliates.
Example Values: 123456
vertical_id
Required
Type: Short
Length (Max/Min): NA
Vertical ID found on the Vertical Card. enter 0 will extract all Verticals.
Use GET Verticals API: 
https://support.getcake.com/solution/articles/13000005375-get-verticals-api-version-2
Example Values: 0, 1, 155
site_offer_id
Required
Type: INT
Length (Max/Min): NA
Offer ID found on Offer Card, This is the identifier for a unique Offer, enter 0 will extract all Offers.
Use EXPORT Offer API
https://support.getcake.com/solution/articles/5000655203-export-offers-api-version-6
Example Values: 3, 6, 15
source_affiliate_manager_id
Required
Type: INT
Length (Max/Min): NA
Affiliate manager ID overseeing affiliate source
Enter 0 to include all

Example Values: 1, 36, 154
upsell
Required
Type: Short
Length (Max/Min): NA
Will return leads that were upsold.


Example Values: upsells or non_upsells or upsells_and_non_upsells
lead_tier_id
Required
Type: INT
Length (Max/Min): NA
Use EXPORT LeadTiers API:
https://support.getcake.com/solution/articles/13000003617-export-leadtiers-api-version-1
Enter 0 to include all
Example Values: 2, 56
start_at_row
Required
Type: INT
Length (Max/Min): NA
Must pass at least 0 as value, which means start at the beginning of the dataset.


Example Values: 1
row_limit
Required
Type: INT
Length (Max/Min): NA
Max Rows Returned - 50,000.


Example Values: 5000



Example Request

GET https://staging.cakemarketing.com/api/2/reports.asmx/LeadsByAffiliateExport?api_key=dNJFmId9rI&start_date=01/01/2018&end_date=1/15/2018&vertical_id=0&source_affiliate_id=0&site_offer_id=0&source_affiliate_manager_id=0&upsell=upsells_and_non_upsells&lead_tier_id=0&start_at_row=1&row_limit=500



Sample XML Response:

<LeadsByAffiliateExportResponses xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/2/">
<success>true</success>
<row_count>5</row_count>
<leads_by_affiliate>
<LeadsByAffiliate>
<unique_id>D7D4CEA0</unique_id>
<internal_lead_id>993387</internal_lead_id>
<vertical>
<vertical_id xmlns="API:id_name_store">1328</vertical_id>
<vertical_name xmlns="API:id_name_store">Aldo's Sole Repair - Traning</vertical_name>
</vertical>
<visitor_id>5695396</visitor_id>
<tracking_id>1637915</tracking_id>
<lead_date>2018-01-03T17:27:32.277</lead_date>
<source_date>2018-01-03T17:27:32.277</source_date>
<source_affiliate>
<source_affiliate_id xmlns="API:id_name_store">1115519</source_affiliate_id>
<source_affiliate_name xmlns="API:id_name_store">Aldo AFF training</source_affiliate_name>
</source_affiliate>
<brand_advertiser>
<brand_advertiser_id xmlns="API:id_name_store">902109</brand_advertiser_id>
<brand_advertiser_name xmlns="API:id_name_store">Aldo's Insoles Training</brand_advertiser_name>
</brand_advertiser>
<site_offer>
<site_offer_id xmlns="API:id_name_store">1000001451</site_offer_id>
<site_offer_name xmlns="API:id_name_store">Aldo H &amp;amp; P</site_offer_name>
</site_offer>
<site_offer_contract>
<site_offer_contract_id xmlns="API:id_name_store">12588</site_offer_contract_id>
</site_offer_contract>
<channel>
<channel_id xmlns="API:id_name_store">1</channel_id>
<channel_name xmlns="API:id_name_store">Affiliate</channel_name>
</channel>
<campaign>
<campaign_id xmlns="API:leadbyaffiliate_id_name_store">1201696</campaign_id>
<campaign_type xmlns="API:leadbyaffiliate_id_name_store">Standard</campaign_type>
</campaign>
<creative>
<creative_id xmlns="API:id_name_store">1145572</creative_id>
<creative_name xmlns="API:id_name_store">1145572</creative_name>
</creative>
<subid_1/>
<user_agent>
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
</user_agent>
<last_name>ALDO</last_name>
<email_address/>
<ip_address>12.9.20.2</ip_address>
<opt_in>false</opt_in>
<vertical_data>{}</vertical_data>
<test>false</test>
<upsell>false</upsell>
<paid>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">5.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$5.0000</formatted_amount>
</paid>
<received>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">15.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$15.0000</formatted_amount>
</received>
<lead_score>50</lead_score>
<pixel_dropped>false</pixel_dropped>
<suppressed>false</suppressed>
<approved>false</approved>
<rejected>false</rejected>
<thrownout>false</thrownout>
<returned>false</returned>
</LeadsByAffiliate>
<LeadsByAffiliate>
<unique_id>11A52EB5</unique_id>
<internal_lead_id>993388</internal_lead_id>
<vertical>
<vertical_id xmlns="API:id_name_store">2250</vertical_id>
<vertical_name xmlns="API:id_name_store">[Auto] FB-990 624</vertical_name>
</vertical>
<visitor_id>5695427</visitor_id>
<tracking_id>1637952</tracking_id>
<lead_date>2018-01-09T11:15:51.533</lead_date>
<source_date>2018-01-09T11:15:16.43</source_date>
<source_affiliate>
<source_affiliate_id xmlns="API:id_name_store">1000001621</source_affiliate_id>
<source_affiliate_name xmlns="API:id_name_store">[Auto] Jan 09 110105977</source_affiliate_name>
</source_affiliate>
<brand_advertiser>
<brand_advertiser_id xmlns="API:id_name_store">1298903</brand_advertiser_id>
<brand_advertiser_name xmlns="API:id_name_store">LC - New Advertiser</brand_advertiser_name>
</brand_advertiser>
<site_offer>
<site_offer_id xmlns="API:id_name_store">1000002443</site_offer_id>
<site_offer_name xmlns="API:id_name_store">[Auto] Jan 09 110101796</site_offer_name>
</site_offer>
<site_offer_contract>
<site_offer_contract_id xmlns="API:id_name_store">13662</site_offer_contract_id>
<site_offer_contract_name xmlns="API:id_name_store">Generic Offer Contract Name: 1/9</site_offer_contract_name>
</site_offer_contract>
<channel>
<channel_id xmlns="API:id_name_store">1</channel_id>
<channel_name xmlns="API:id_name_store">Affiliate</channel_name>
</channel>
<campaign>
<campaign_id xmlns="API:leadbyaffiliate_id_name_store">1223007</campaign_id>
<campaign_type xmlns="API:leadbyaffiliate_id_name_store">Standard</campaign_type>
</campaign>
<creative>
<creative_id xmlns="API:id_name_store">1231231371</creative_id>
<creative_name xmlns="API:id_name_store">1231231371</creative_name>
</creative>
<landing_page>
<landing_page_id xmlns="API:id_name_store">17437</landing_page_id>
<landing_page_name xmlns="API:id_name_store">
http://www.bing.com/search?q=[Auto] Jan 09 110101796landing_page
</landing_page_name>
</landing_page>
<subid_1/>
<user_agent>
Mozilla/5.0 (Windows NT 6.2; rv:36.0) Gecko/20100101 Firefox/36.0
</user_agent>
<first_name>MAX</first_name>
<last_name>HOWEN</last_name>
<email_address>[email protected]</email_address>
<phone_work>1232343456</phone_work>
<ip_address>12.9.20.2</ip_address>
<opt_in>false</opt_in>
<vertical_data>{}</vertical_data>
<test>false</test>
<upsell>false</upsell>
<paid>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">0.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$0.0000</formatted_amount>
</paid>
<received>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">0.2000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$0.2000</formatted_amount>
</received>
<lead_score>50</lead_score>
<pixel_dropped>true</pixel_dropped>
<suppressed>false</suppressed>
<approved>false</approved>
<rejected>false</rejected>
<thrownout>false</thrownout>
<returned>false</returned>
</LeadsByAffiliate>
<LeadsByAffiliate>
<unique_id>14663FF0</unique_id>
<internal_lead_id>993389</internal_lead_id>
<vertical>
<vertical_id xmlns="API:id_name_store">1367</vertical_id>
<vertical_name xmlns="API:id_name_store">LC Test vert</vertical_name>
</vertical>
<visitor_id>5695267</visitor_id>
<tracking_id>1637958</tracking_id>
<lead_date>2018-01-10T07:54:15.42</lead_date>
<source_date>2018-01-10T07:52:55.653</source_date>
<source_affiliate>
<source_affiliate_id xmlns="API:id_name_store">-1</source_affiliate_id>
<source_affiliate_name xmlns="API:id_name_store">Affiliate -1</source_affiliate_name>
</source_affiliate>
<brand_advertiser>
<brand_advertiser_id xmlns="API:id_name_store">902159</brand_advertiser_id>
<brand_advertiser_name xmlns="API:id_name_store">Advertiser-LC</brand_advertiser_name>
</brand_advertiser>
<site_offer>
<site_offer_id xmlns="API:id_name_store">55382304</site_offer_id>
<site_offer_name xmlns="API:id_name_store">LC-LeadGen</site_offer_name>
</site_offer>
<site_offer_contract>
<site_offer_contract_id xmlns="API:id_name_store">9481</site_offer_contract_id>
</site_offer_contract>
<channel>
<channel_id xmlns="API:id_name_store">1</channel_id>
<channel_name xmlns="API:id_name_store">Affiliate</channel_name>
</channel>
<campaign>
<campaign_id xmlns="API:leadbyaffiliate_id_name_store">766063</campaign_id>
<campaign_type xmlns="API:leadbyaffiliate_id_name_store">Standard</campaign_type>
</campaign>
<creative>
<creative_id xmlns="API:id_name_store">1141518</creative_id>
<creative_name xmlns="API:id_name_store">1141518</creative_name>
</creative>
<landing_page>
<landing_page_id xmlns="API:id_name_store">6556</landing_page_id>
<landing_page_name xmlns="API:id_name_store">http://www.google.com</landing_page_name>
</landing_page>
<subid_1>Test</subid_1>
<subid_2>profanitytest</subid_2>
<subid_3>fuck</subid_3>
<user_agent>
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
</user_agent>
<first_name>LUIS</first_name>
<email_address/>
<ip_address>64.60.178.90</ip_address>
<opt_in>false</opt_in>
<vertical_data>{}</vertical_data>
<test>true</test>
<upsell>false</upsell>
<paid>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">0.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$0.0000</formatted_amount>
</paid>
<received>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">0.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$0.0000</formatted_amount>
</received>
<lead_score>50</lead_score>
<pixel_dropped>false</pixel_dropped>
<suppressed>false</suppressed>
<approved>false</approved>
<rejected>false</rejected>
<thrownout>false</thrownout>
<returned>false</returned>
</LeadsByAffiliate>
<LeadsByAffiliate>
<unique_id>5CC2DF40</unique_id>
<internal_lead_id>993390</internal_lead_id>
<vertical>
<vertical_id xmlns="API:id_name_store">845</vertical_id>
<vertical_name xmlns="API:id_name_store">!!!!!!!!!!!!!Supplements</vertical_name>
</vertical>
<visitor_id>PurpleshserbetTrackingID</visitor_id>
<tracking_id>1638002</tracking_id>
<lead_date>2018-01-10T14:29:42.043</lead_date>
<source_date>2018-01-10T14:28:32.073</source_date>
<source_affiliate>
<source_affiliate_id xmlns="API:id_name_store">1118860</source_affiliate_id>
<source_affiliate_name xmlns="API:id_name_store">maheenAffTest</source_affiliate_name>
</source_affiliate>
<brand_advertiser>
<brand_advertiser_id xmlns="API:id_name_store">900280</brand_advertiser_id>
<brand_advertiser_name xmlns="API:id_name_store">!!! Eddy &amp;amp; Dylan</brand_advertiser_name>
</brand_advertiser>
<site_offer>
<site_offer_id xmlns="API:id_name_store">1000001818</site_offer_id>
<site_offer_name xmlns="API:id_name_store">testingCP</site_offer_name>
</site_offer>
<site_offer_contract>
<site_offer_contract_id xmlns="API:id_name_store">12964</site_offer_contract_id>
</site_offer_contract>
<channel>
<channel_id xmlns="API:id_name_store">1</channel_id>
<channel_name xmlns="API:id_name_store">Affiliate</channel_name>
</channel>
<campaign>
<campaign_id xmlns="API:leadbyaffiliate_id_name_store">1132928</campaign_id>
<campaign_type xmlns="API:leadbyaffiliate_id_name_store">Standard</campaign_type>
</campaign>
<creative>
<creative_id xmlns="API:id_name_store">1145959</creative_id>
<creative_name xmlns="API:id_name_store">1145959</creative_name>
</creative>
<landing_page>
<landing_page_id xmlns="API:id_name_store">17696</landing_page_id>
<landing_page_name xmlns="API:id_name_store">test</landing_page_name>
</landing_page>
<subid_1/>
<url_referrer>
http://staging.cakemarketing.com/test.aspx?c=1132928
</url_referrer>
<user_agent>
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
</user_agent>
<email_address/>
<ip_address>12.9.20.2</ip_address>
<opt_in>false</opt_in>
<vertical_data>{}</vertical_data>
<test>false</test>
<upsell>false</upsell>
<paid>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">50.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$50.0000</formatted_amount>
</paid>
<received>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">111.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$111.0000</formatted_amount>
</received>
<lead_score>50</lead_score>
<pixel_dropped>false</pixel_dropped>
<suppressed>false</suppressed>
<approved>false</approved>
<rejected>false</rejected>
<thrownout>false</thrownout>
<returned>false</returned>
</LeadsByAffiliate>
<LeadsByAffiliate>
<unique_id>25BC1B51</unique_id>
<internal_lead_id>993391</internal_lead_id>
<vertical>
<vertical_id xmlns="API:id_name_store">845</vertical_id>
<vertical_name xmlns="API:id_name_store">!!!!!!!!!!!!!Supplements</vertical_name>
</vertical>
<visitor_id>PurpleshserbetTrackingID</visitor_id>
<tracking_id>1638003</tracking_id>
<lead_date>2018-01-10T14:30:25.243</lead_date>
<source_date>2018-01-10T14:30:23.387</source_date>
<source_affiliate>
<source_affiliate_id xmlns="API:id_name_store">1118860</source_affiliate_id>
<source_affiliate_name xmlns="API:id_name_store">maheenAffTest</source_affiliate_name>
</source_affiliate>
<brand_advertiser>
<brand_advertiser_id xmlns="API:id_name_store">900280</brand_advertiser_id>
<brand_advertiser_name xmlns="API:id_name_store">!!! Eddy &amp;amp; Dylan</brand_advertiser_name>
</brand_advertiser>
<site_offer>
<site_offer_id xmlns="API:id_name_store">1000001818</site_offer_id>
<site_offer_name xmlns="API:id_name_store">testingCP</site_offer_name>
</site_offer>
<site_offer_contract>
<site_offer_contract_id xmlns="API:id_name_store">12964</site_offer_contract_id>
</site_offer_contract>
<channel>
<channel_id xmlns="API:id_name_store">1</channel_id>
<channel_name xmlns="API:id_name_store">Affiliate</channel_name>
</channel>
<campaign>
<campaign_id xmlns="API:leadbyaffiliate_id_name_store">1132928</campaign_id>
<campaign_type xmlns="API:leadbyaffiliate_id_name_store">Standard</campaign_type>
</campaign>
<creative>
<creative_id xmlns="API:id_name_store">1145959</creative_id>
<creative_name xmlns="API:id_name_store">1145959</creative_name>
</creative>
<landing_page>
<landing_page_id xmlns="API:id_name_store">17696</landing_page_id>
<landing_page_name xmlns="API:id_name_store">test</landing_page_name>
</landing_page>
<subid_1/>
<url_referrer>
http://staging.cakemarketing.com/test.aspx?c=1132928
</url_referrer>
<user_agent>
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
</user_agent>
<email_address/>
<ip_address>12.9.20.2</ip_address>
<opt_in>false</opt_in>
<vertical_data>{}</vertical_data>
<test>false</test>
<upsell>false</upsell>
<paid>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">50.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$50.0000</formatted_amount>
</paid>
<received>
<currency_id xmlns="API:leadbyaffiliate_id_name_store">1</currency_id>
<amount xmlns="API:leadbyaffiliate_id_name_store">111.0000</amount>
<formatted_amount xmlns="API:leadbyaffiliate_id_name_store">$111.0000</formatted_amount>
</received>
<lead_score>50</lead_score>
<pixel_dropped>false</pixel_dropped>
<suppressed>false</suppressed>
<approved>false</approved>
<rejected>false</rejected>
<thrownout>false</thrownout>
<returned>false</returned>
</LeadsByAffiliate>
</leads_by_affiliate>
</LeadsByAffiliateExportResponses>


Example Error Messages:  

Error Message
Likely Cause
Invalid API Key
API key does not exist or is expired

 


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.