EXPORT Campaigns API Version 7
Updated on 2014-03-26
Current Version: Version 7
Deprecated Version: V3, V5, V6
Requests Allowed: GET & SOAP
Summary:
Exports all campaigns potentially filtered by campaign, offer, affiliate, account status or media type.
You can also obtain this from within your CAKE instance by going to the campaigns tab in the offer or affiliate cards where you are allowed to export. Additionally, you can go to affiliates >> custom payouts grid >> export.
Resource/WSDL Page:
http://yourdomainhere.com/api/7/export.asmx?op=Campaigns
Parameters
api_key Required Type: STRING Length (Max/Min): 50 | This api_key will provide you with the ability to export Campaigns for your instance. You can obtain this api_key from within CAKE >> Setup >> Permissions in the API Key list. Example Value: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh |
campaign_id Required Type: INTEGER Length (Max/Min): N/A | This is the identifier for a unique campaign. Must be non-zero if offer_id and affiliate_id are both set to 0 Example Values: 1234 |
offer_id Required Type: INTEGER Length (Max/Min): N/A | This is the identifier for a unique Offer. This can be found on any Offer card. Must be non-zero if campaign_id and affiliate_id are both set to 0 Example Values: 1234 |
affiliate_id Required Type: INTEGER Length (Max/Min): N/A | This is the identifier for a unique Affiliate. This can be found on any Affiliate card. Must be non-zero if offer_id and campaign_id are both set to 0 Example Values: 1234 |
account_status_id Required Type: INTEGER Length (Max/Min): N/A | Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. Example Values: 3 |
media_type_id Required Type: INTEGER Length (Max/Min): N/A | Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. Example Values: 3 |
start_at_row Required Type: INTEGER Length (Max/Min): N/A | Must pass at least 0 as value, which means start at the beginning of the data set. Example Values: 3 |
row_limit Required Type: INTEGER Length (Max/Min): N/A | Must pass at least 0 as value, which means no limit. Example Values: 3 |
sort_field Required Type: INTEGER Length (Max/Min): N/A | Accepts "campaign_id","date_created" or 0 to ignore this filter. The value could be any integer in order to ignore this filter. Example Values: 3 |
sort_descending Required Type: BOOL Length (Max/Min): N/A | The following values can only be used for this parameter (TRUE or FALSE). Example Values: TRUE |
**Note all optional parameters still need to be passed through in the actual call. These parameters do not need a value (therefore you can use a null value).
Example Request
Sample XML Response:
<campaign_export_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/7/"> <success>true</success> <row_count>31</row_count> <campaigns> <campaign> <campaign_id>763184</campaign_id> <campaign_type> <campaign_type_id xmlns="API:id_name_store">1</campaign_type_id> <campaign_type_name xmlns="API:id_name_store">Standard</campaign_type_name> </campaign_type> <affiliate> <affiliate_id xmlns="API:id_name_store">1111665</affiliate_id> <affiliate_name xmlns="API:id_name_store">Tims Payoneer Enabled Affiliate</affiliate_name> </affiliate> <offer> <offer_id xmlns="API:id_name_store">55378718</offer_id> <offer_name xmlns="API:id_name_store">Tim's Offer A (Google.com)</offer_name> </offer> <offer_contract> <offer_contract_id>4789</offer_contract_id> <price_format> <price_format_id xmlns="API:id_name_store">1</price_format_id> <price_format_name xmlns="API:id_name_store">CPA</price_format_name> </price_format> </offer_contract> <original>false</original> <non_original> <original_campaign_id>30792</original_campaign_id> <use_original_campaign_pixel>true</use_original_campaign_pixel> </non_original> <exceptions> <allowed_sub_affiliates/> <allowed_creatives/> </exceptions> <account_status> <account_status_id xmlns="API:id_name_store">1</account_status_id> <account_status_name xmlns="API:id_name_store">Active</account_status_name> </account_status> <currency> <currency_id xmlns="API:id_name_store">1</currency_id> <currency_symbol xmlns="API:id_name_store">$</currency_symbol> <currency_name xmlns="API:id_name_store">US Dollar</currency_name> <currency_abbr xmlns="API:id_name_store">USD</currency_abbr> </currency> <media_type> <media_type_id xmlns="API:id_name_store">15</media_type_id> <media_type_name xmlns="API:id_name_store">Adware</media_type_name> </media_type> <display_link_type> <link_display_type_id xmlns="API:id_name_store">1</link_display_type_id> <link_display_type_name xmlns="API:id_name_store">Standard</link_display_type_name> </display_link_type> <event_overrides/> <deal_flow> <date_contacted xsi:nil="true"/> <date_io_sent xsi:nil="true"/> <date_io_signed xsi:nil="true"/> <date_creative_sent xsi:nil="true"/> <date_pixel_placed>2016-01-13T10:03:02.28</date_pixel_placed> </deal_flow> <payouts/> <paid>true</paid> <paid_redirects>true</paid_redirects> <disable_prepop_appending>false</disable_prepop_appending> <suppression_amount>11</suppression_amount> <click_cap> <limit xsi:nil="true"/> <cap_interval> <cap_interval_id xmlns="API:id_name_store">0</cap_interval_id> <cap_interval_name xmlns="API:id_name_store">None</cap_interval_name> </cap_interval> <start_date xsi:nil="true"/> <review_no_redirect>false</review_no_redirect> </click_cap> <conversion_cap> <limit xsi:nil="true"/> <cap_interval> <cap_interval_id xmlns="API:id_name_store">0</cap_interval_id> <cap_interval_name xmlns="API:id_name_store">None</cap_interval_name> </cap_interval> <start_date xsi:nil="true"/> <review_no_redirect>false</review_no_redirect> </conversion_cap> <upsell_info> <disable_upsells>false</disable_upsells> <paid_upsells>true</paid_upsells> <paid_upsells_same_session_only>false</paid_upsells_same_session_only> <clear_session_on_conversion>false</clear_session_on_conversion> </upsell_info> <voucher_codes/> <test_link>http://google.com</test_link> <redirect_404>false</redirect_404> <date_created>2016-01-13T10:03:01.64</date_created> <expiration_date>2000-01-01T00:00:00</expiration_date> <notes/> </campaign> </campaigns> </campaign_export_response>
Example Error Messages:
Error Message | Likely Cause |
Invalid API Key | API Key does not exist or is expired |
Invalid Affiliate ID | Affiliate ID does not exist |
Invalid Offer ID | Offer ID does not exist |
Invalid Campaign ID | Campaign ID does not exist |