Submit a Ticket My Tickets
Welcome
Login  Sign up

EXPORT Campaigns API Version 3 (DEPRECATED)

EXPORT Campaigns API

Updated on 2014-03-27
Current Version: Version 3
Latest Version: Version 4
Deprecated Version: 3
Requests Allowed: GET & SOAP

 

Summary:

Returns an array of campaigns potentially filtered by campaign_id, offer_id, affilite_id,account_status_id, or media_type_id.

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://<your_domain_here>/api/3/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. You can obtain the campaign ID from your CAKE instance on the campaign card. To get there, go to the advertiser tab >> offers >> choose an offer to open the offer card >> campaign tab >> choose a campaign >> ID. 

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.

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.

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

GET

http://demo.cakemarketing.com/api/3/export.asmx/Campaigns?api_key=dNJFmId9rI&campaign_id=0&offer_id=0&affiliate_id=6066&account_status_id=1&
media_type_id=15&start_at_row=1&row_limit=1&sort_field=campaign_id&
sort_descending=FALSE

 

Sample XML Response:

<campaign_export_response>
  <success>true</success>
  <row_count>9</row_count>
  <campaigns>
    <campaign>
      <campaign_id>14972</campaign_id>
      <affiliate>
        <affiliate_id>6066</affiliate_id>
        <affiliate_name>#1 Affiliate</affiliate_name>
      </affiliate>
      <offer>
        <offer_id>1001330</offer_id>
        <offer_name>Ramon Test Offer</offer_name>
      </offer>
      <offer_contract>
        <offer_contract_id>2427</offer_contract_id>
      </offer_contract>
      <original>true</original>
      <exceptions>
        <blocked_sub_affiliates/>
        <blocked_creatives/>
      </exceptions>
      <account_status>
        <account_status_id>1</account_status_id>
        <account_status_name>Active</account_status_name>
      </account_status>
      <payout>
        <is_percentage>false</is_percentage>
        <amount>50.0000</amount>
        <formatted_amount>$50.00</formatted_amount>
      </payout>
      <currency>
        <currency_id>1</currency_id>
        <currency_symbol>$</currency_symbol>
        <currency_name>US Dollar</currency_name>
        <currency_abbr>USD</currency_abbr>
      </currency>
      <media_type>
        <media_type_id>15</media_type_id>
        <media_type_name>Adware</media_type_name>
      </media_type>
      <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 xsi:nil="true"/>
      </deal_flow>
      <paid>true</paid>
      <paid_redirects>true</paid_redirects>
      <disable_prepop_appending>false</disable_prepop_appending>
      <suppression_amount xsi:nil="true"/>
      <click_cap>
        <limit xsi:nil="true"/>
        <cap_interval>
          <cap_interval_id>0</cap_interval_id>
          <cap_interval_name>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>0</cap_interval_id>
          <cap_interval_name>None</cap_interval_name>
        </cap_interval>
        <start_date xsi:nil="true"/>
        <review_no_redirect>false</review_no_redirect>
      </conversion_cap>
      <pixel_info>
        <pixel_status>Pending</pixel_status>
        <pixel_html/>
        <postback_url/>
        <postback_delay_ms xsi:nil="true"/>
      </pixel_info>
      <upsell_info>
        <disable_upsells>false</disable_upsells>
        <clear_session_on_conversion>false</clear_session_on_conversion>
      </upsell_info>
      <test_link/>
      <date_created>2013-03-20T09:37:38.203</date_created>
      <expiration_date xsi:nil="true"/>
      <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 Offer ID Offer ID does not exist

Did you find it helpful? Yes No

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