EXPORT Offers API Version 3 (DEPRECATED)
Updated on 2014-03-27
Current Version: 3
Latest Version: Version 6
Deprecated Version: V1, V5
Requests Allowed: GET & SOAP
Summary:
Returns an array of buyer contracts and its properties.
You can also obtain this from within your CAKE instance by going to the advertiser tab >> offers >> export.
Resource/WSDL Page:
http://<your_domain_here>/api/3/export.asmx?op=Offers
Parameters
api_key |
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 |
offer_name |
Used to filter records matching the value or will return all records if blank. Not required and can accept blank value. Example Values: ACME Offer |
offer_id |
This is the identifier for a unique Offer. This can be found on any Offer card. Example Values: 1234 |
advertiser_id |
If passing anything <= 0 the result will include all advertisers. If the advertiser ID does not exist, it will return an empty array instead of an error. You can obtain the advertiser ID from within your CAKE instance under the Advertiser tab >> ID Example Values: 1234 |
vertical_id |
Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. You can obtain the vertical id from within your CAKE by going to the setup tab >> verticals >> export. Example Values: 3 |
offer_type_id |
Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. Example Values: 3 |
offer_status_id |
Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. ["1" = Public, "2" = Private, "3" = Apply To Run, "4" = Inactive, "0" = ALL Offer Statuses] Example Values: 3 |
media_type_id |
Must pass at least >= 0 as value. Used to filter records matching the value or will return all records if <=0. Example Values: 3 |
tag_id |
Passing a zero (0) value will return all records. Passing an actual value will filter records matching the value. {See get.asmx > AffiliateTags} Example Values: 3 |
start_at_row |
Must pass at least 0 as value, which means start at the beginning of the data set. Example Values: 3 |
row_limit |
Must pass at least 0 as value, which means no limit. Example Values: 3 |
sort_field |
Accepts "offer_id","offer_name", "date_created", "expiration_date" or 0 to ignore this filter. The value could be any integer in order to ignore this filter. Example Values: 3 |
sort_descending |
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/Offers?api_key=dNJFmId9rI&offer_id=10&offer_name=&advertiser_id=1&vertical_id=0&offer_type_id=0&media_type_id=15&offer_status_id=0&tag_id=0&start_at_row=1&row_limit=3&sort_field=offer_id&sort_descending=FALSE |
Sample XML Response:
<offer_export_response> <success>true</success> <row_count>1</row_count> <offers> <offer> <offer_id>10</offer_id> <offer_name>Rename Offer</offer_name> <advertiser> <advertiser_id>1</advertiser_id> <advertiser_name>Rename Advertiser</advertiser_name> </advertiser> <vertical> <vertical_id>1</vertical_id> <vertical_name>Fast Food</vertical_name> </vertical> <offer_type> <offer_type_id>1</offer_type_id> <offer_type_name>Hosted</offer_type_name> </offer_type> <offer_status> <offer_status_id>2</offer_status_id> <offer_status_name>Private</offer_status_name> </offer_status> <hidden>false</hidden> <offer_image_link/> <default_offer_contract_id>158</default_offer_contract_id> <offer_contracts> <offer_contract> <offer_contract_id>158</offer_contract_id> <offer_contract_name>WEbsite</offer_contract_name> <price_format> <price_format_id>1</price_format_id> <price_format_name>CPA</price_format_name> </price_format> <payout> <is_percentage>false</is_percentage> <amount>14.0000</amount> <formatted_amount>$14.00</formatted_amount> </payout> <received> <is_percentage>false</is_percentage> <amount>0.0000</amount> <formatted_amount>$0.00</formatted_amount> </received> <offer_link>http://getCAKE.com</offer_link> <thankyou_link>http://getCAKE.com</thankyou_link> <hidden>false</hidden> <submission_payment_options> <pay_on_available_buyers_only>false</pay_on_available_buyers_only> <host_post> <pay_on_post>false</pay_on_post> </host_post> </submission_payment_options> </offer_contract> <offer_contract> <offer_contract_id>1159</offer_contract_id> <offer_contract_name>Call center</offer_contract_name> <price_format> <price_format_id>1</price_format_id> <price_format_name>CPA</price_format_name> </price_format> <payout> <is_percentage>false</is_percentage> <amount>14.0000</amount> <formatted_amount>$14.00</formatted_amount> </payout> <received> <is_percentage>false</is_percentage> <amount>0.0000</amount> <formatted_amount>$0.00</formatted_amount> </received> <offer_link>http://www.cakemarketing.com</offer_link> <thankyou_link/> <hidden>false</hidden> <submission_payment_options> <pay_on_available_buyers_only>false</pay_on_available_buyers_only> <host_post> <pay_on_post>false</pay_on_post> </host_post> </submission_payment_options> </offer_contract> </offer_contracts> <tiers/> <tags/> <allowed_media_types/> <currency> <currency_id>1</currency_id> <currency_symbol>$</currency_symbol> <currency_name>US Dollar</currency_name> <currency_abbr>USD</currency_abbr> </currency> <ssl>false</ssl> <suppression_amount xsi:nil="true"/> <click_cap> <limit>0</limit> <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>true</review_no_redirect> </click_cap> <conversion_cap> <limit>0</limit> <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>true</review_no_redirect> </conversion_cap> <click_cookie_days>30</click_cookie_days> <impression_cookie_days>30</impression_cookie_days> <enable_view_thru_conversions>false</enable_view_thru_conversions> <click_trumps_impression>true</click_trumps_impression> <disable_prepop_appending>false</disable_prepop_appending> <redirect_404>false</redirect_404> <session_regeneration_seconds xsi:nil="true"/> <suppression_list> <suppression_list_id>73</suppression_list_id> <suppression_list_name>Suppression List 73</suppression_list_name> <suppression_list_type> <suppression_list_type_id>3</suppression_list_type_id> <suppression_list_type_name>Optizmo</suppression_list_type_name> </suppression_list_type> <md5_only>false</md5_only> <date_created>2012-07-01T09:58:28.25</date_created> </suppression_list> <unsubscribe_link/> <preview_link/> <offer_description/> <restrictions/> <advertiser_extended_terms/> <testing_instructions/> <from_lines/> <subject_lines/> <upsells/> <thankyou_html/> <submission_options> <sell_only_to_listed_buyers>false</sell_only_to_listed_buyers> <ping_first>false</ping_first> <asynchronous_ping>false</asynchronous_ping> <sell_exclusive_only>false</sell_exclusive_only> </submission_options> <date_created>2010-02-06T00:00:00</date_created> <expiration_date xsi:nil="true"/> <notes>booya!</notes> </offer> </offers> </offer_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. |