ADDEDIT Offer API Version 5
Updated on 2015-03-06
Current Version: Version 5
Deprecated Version: 1, 2, 3, 4
Requests Allowed: GET & SOAP
Summary:
Creates new offers or edits existing offers.
Resource/WSDL Page:
http://<your_domain_here>/api/5/addedit.asmx?op=Offer
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. Must be a valid API key (existing and not expired) Example Value: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh |
offer_id | 0 creates a new offer. Values greater than 1 edits the offer. Example Values: 0 or 123 |
advertiser_id Required Type: INTEGER Length (Max/Min): N/A | 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 Required Type: SHORT Length (Max/Min): N/A | Vertical associated with the offer. 0 to skip on edit Example Values: 12 |
offer_name Required Type: STRING Length (Max/Min): 200 | Name of the offer. Required on creation, NULL or empty on edit skips Example Values: Offer_Name |
third_party_name Required Type: STRING Length (Max/Min): 200 | Alternate name of the offer. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: Alt_Offer_Name |
hidden | Set offer hidden status to on, off or no_change. Cannot use no_change on creation. Example Values: off |
offer_status_id Required Type: BYTE Length (Max/Min): N/A | Use GET OfferStatuses API: https://support.getcake.com/solution/categories/5000109264/folders/5000173057/articles/5000546184-get-offerstatuses-api-version-1 Set status of the offer as active, inactive or pending.Required on creation, 0 to skip on edit |
offer_type_id Required Type: BYTE Length (Max/Min): N/A | Use GET OfferTypes API: https://support.getcake.com/solution/categories/5000109264/folders/5000173057/articles/5000546197-get-offertypes-api-version-1 Type of offer as 3rd Party, Hosted or Host-n-Post. Required on creation, not used on edit |
currency_id Required Type: BYTE Length (Max/Min): N/A | Use Get CurrencyIDs API: https://support.getcake.com/solution/categories/5000109264/folders/5000173057/articles/5000546043-get-currencies-api-version-1 Currency for the offer. Required if currencies are enabled and creating an offer, not used on edit |
ssl Required Type: BOOL_TYPE Length (Max/Min): N/A | Set offer pixel status to on, off or no_change. Cannot use no_change on creation. |
click_cookie_days Required Type: SHORT Length (Max/Min): N/A | Cookie set in days for the offer. Required on creation, negative number on edit to skip |
impression_cookie_days Required Type: SHORT Length (Max/Min): N/A | Impression set in days for the offer. Required on creation, negative number on edit to skip |
redirect_offer_contract_id Required Type: INTEGER Length (Max/Min): N/A | Select redirect offer contact for this offer. 0 to skip |
redirect_404 Required Type: BOOL_TYPE Length (Max/Min): N/A | Set 404 page for offer redirect to on, off or no_change. Cannot use no_change on creation. |
enable_view_thru_conversions | Set conversion generated though impressions to on, off or no_change. Example Values: off |
click_trumps_impression Required Type: BOOL_TYPE Length (Max/Min): N/A | Set clicks override impressions for conversions to on, off or no_change. Example Values: off |
disable_click_deduplication Required Type: BOOL_TYPE Length (Max/Min): N/A | Set allow duplicate clicks to on, off or no_change. Example Values: off |
last_touch Required Type: BOOL_TYPE Length (Max/Min): N/A | Set conversion attribution to last touch to on, off or no_change. Example Values: off |
enable_transaction_id_deduplication Required Type: BOOL_TYPE Length (Max/Min): N/A | Set deduplication of conversions based on transaction ID to on, off or no_change. Example Values: off |
postbacks_only Required Type: BOOL_TYPE Length (Max/Min): N/A | Set postback only to on, off or no_change. |
pixel_html Required Type: STRING Length (Max/Min): N/A | 3rd party pixel. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit |
postback_url Required Type: STRING Length (Max/Min): 400 | 3rd party Postback URL. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: http://demotrk.cakemarketing.com/p.ashx?o=55378734&f=pb&r=REQUEST_SESSION_ID&t=TRANSACTION_ID |
postback_url_ms_delay | Time (in ms) before 3rd party postback url pixel fires. -1 to skip on Edit. Example Values: 100 |
fire_global_pixel Required Type: BOOL_TYPE Length (Max/Min): N/A | Set option to fire global pixel to on, off or no_change. Example Values: off |
fire_pixel_on_nonpaid_conversions | Set option to fire global pixel for nonpaid conversions to on, off or no_change. Example Values: off |
static_suppression | This should be limited to a %, 0-100. -1 to skip, -2 to null. |
conversion_cap_behavior Required Type: BYTE Length (Max/Min): N/A | How incoming conversions are dealt with when a conversion cap has already been hit. -1 to skip Example Values: 0 (Default to Global), 1 (Advertiser Payment, Affiliate Payment), 2 (Advertiser Payment, No affiliate Payment), 3 (Ignore Conversion), 4 (No advertiser payment, Affiliate Payment), 5 (No advertiser payment, No affiliate payment) |
conversion_behavior_on_redirect Required Type: BYTE Length (Max/Min): N/A | How incoming conversions are dealt with when any redirect criteria is met. -1 to skip. Example Values: 0 (Default to Global), 1 (Advertiser Payment, Affiliate Payment), 2 (Advertiser Payment, No affiliate Payment), 3 (Ignore Conversion), 4 (No advertiser payment, Affiliate Payment), 5 (No advertiser payment, No affiliate payment) |
expiration_date Required Type: DATETIME Length (Max/Min): N/A | Date when the offer will expire. Required even if no expiration is needed. To ignore this field use the "expiration_date_modification_type=do_not_change" field below Example Values: 12/31/2014 13:59:59 |
expiration_date_modification_type Required Type: MODIFICATION_TYPES Length (Max/Min): N/A | Set expiration date modification to do_not_change, change, remove |
offer_contract_name Required Type: STRING Length (Max/Min): 50 | NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit |
offer_contract_hidden Required Type: BOOL Length (Max/Min): N/A | Hide offer contract. no_change to skip on Edit. |
price_format_id Required Type: BYTE Length (Max/Min): N/A | Price format of the offer as CPA, CPC, CPM, Fixed or RevShare. https://getcake.freshdesk.com/support/solutions/articles/5000546239-get-priceformats-api-version-1 |
payout Required Type: DECIMAL Length (Max/Min): N/A | Default payout to affiliate on conversion. Can be overridden on the campaign level. |
received Required Type: DECIMAL Length (Max/Min): N/A | Revenue received from advertiser on conversion. |
received_percentage Required Type: BOOL Length (Max/Min): N/A | Receive revenue as a percentage from advertiser. no_change to skip on Edit. |
offer_link Required Type: STRING Length (Max/Min): 400 | URL for offer landing page. Required on creation, NULL or empty on edit skips |
thankyou_link Required Type: STRING Length (Max/Min): 400 | *Now Called Confirmation Page Link in the UI. Where CAKE will send returning traffic that is still cookied from a conversion. Required on creation, NULL sets it as NULL on edit, empty skips on edit |
preview_link Optional Type: STRING Length (Max/Min): 400 | Non-tracking URL. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit |
thumbnail_file_import_url Optional Type: STRING Length (Max/Min): 400 | URL where image to be used as preview is hosted NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit |
offer_description Optional Type: STRING Length (Max/Min): N/A | Description of the offer for affiliates. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: This_Is_a_descroption |
restrictions Optional Type: STRING Length (Max/Min): N/A | Restrictions for running the offer to affiliates. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: description_description |
advertiser_extended_terms Optional Type: STRING Length (Max/Min): N/A | Additional conditions required to run offer to affiliates. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: extended_terms |
testing_instructions Optional Type: STRING Length (Max/Min): N/A | Testing information for affiliates. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: testing_instructions |
tags Optional Type: STRING Length (Max/Min): N/A | This should be a comma separated list of tag names, each tag name cannot exceed 50 characters |
allow_affiliates_to_create_creatives Optional Type: BOOL_TYPES Length (Max/Min): N/A | Set option to allow affiliates to add own creatives to on, off or no_change. |
unsubscribe_link Optional Type: STRING Length (Max/Min): 255 | Email unsubscribe link. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit Example Values: http://www.unsubscribe.com |
from_lines Required Type: STRING Length (Max/Min): N/A | Approved email from senders. Required on creation, NULL or empty on edit skips Example Values: EXAMPLE_FROM_LINE |
subject_lines Required Type: STRING Length (Max/Min): N/A | Approved email subject lines.Required on creation, NULL or empty on edit skips Example Values: EXAMPLE_SUBJECT_LINE |
conversions_from_whitelist_only Required Type: ENUM Length (Max/Min): 50 | Denotes whether pixels for this offer can only come from pixels whitelisted under Advertiser tab >> Pixel Whitelist |
allowed_media_type_modification_type Required Type: ENUM Length (Max/Min): N/A | Example Values: do_not_change, add, replace, remove, remove_all |
allowed_media_type_ids Required Type: STRING Length (Max/Min): N/A | Allowed media types for the offer. https://getcake.freshdesk.com/support/solutions/articles/5000546170-get-mediatypes-api-version-1 Example Values: 2 |
redirect_domain Required Type: STRING Length (Max/Min): N/A | Denotes offer level redirect domain. **Must have alternate redirect domains enabled. |
cookie_domain Required Type: STRING Length (Max/Min): 200 | Denotes offer level cookie domain. **Must have alternate cookie domains enabled. Example Values: http://www.domain.com |
track_search_terms_from_non_supported_search_engines Required Type: ENUM Length (Max/Min): 200 | Only for CAKE for Advertisers. This allows a specific offer to request that CAKE look for search terms from "non-supported" search engines Example Values: on, off, no_change |
auto_disposition_type Required Type: ENUM Length (Max/Min): N/A | The default disposition (if auto disposition delay hours are used) once time threshold his met |
auto_disposition_delay_hours Required Type: INT Length (Max/Min): N/A | Time before a conversion is automatically updated with default disposition Example Values: 3, 10 |
session_regeneration_seconds Required Type: INT Length (Max/Min): N/A | Time (in seconds) that CAKE will look back to attribute a conversion to a click outside of the cookie. Pass -1 to skip and -2 to clear. Max value 2592000 Max value of 86400 if choosing session_regeneration_type_id in the following list (1, 2, 3, 4, 5, 6, 12, 15) |
session_regeneration_type_id Required Type: INT Length (Max/Min): N/A | Pass 0 to skip and -1 to clear. Example Values: |
payout_modification_type Required Type: ENUM Length (Max/Min): N/A | Must be 'change' when creating new offer Example Values: do_not_change, change, remove |
recieved_modification_type Required Type: ENUM Length (Max/Min): N/A | Must be 'change' when creating new offer Example Values: do_not_change, change, remove |
tags_modification_type Required Type: ENUM Length (Max/Min): N/A | Example Values: do_not_change, add, replace, remove, remove_all |
**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 Requests
Sample XML Responses
<offer_addedit_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/5/"> <success>true</success> <message>Offer 55382100 Created</message> <success_info> <offer_id>55382100</offer_id> <offer_contract_id>9208</offer_contract_id> <campaign_id>765320</campaign_id> <creative_id>1141216</creative_id> </success_info> </offer_addedit_response>
<offer_addedit_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/5/"> <success>true</success> <message>Offer 55378222 Updated</message> <success_info> <offer_id>55378222</offer_id> <offer_contract_id>4111</offer_contract_id> <campaign_id xsi:nil="true"/> <creative_id xsi:nil="true"/> </success_info> </offer_addedit_response>
Example Error Messages:
Error Message | Likely Cause |
Invalid API Key | API Key does not exist or is expired |
cupCAKE Offer Limit Reached | cupCAKE client already has 100 offers when creating an offer |
Invalid Advertiser | advertiser_id doesn't correspond to an advertiser in the system when creating an of |
Invalid Vertical | vertical_id doesn't correspond to a vertical in the system when creating an offer |
Invalid Offer Name | offer_name is NULL or empty when creating an offer |
Invalid Offer Status | offer_status equals 0 when creating an offer |
Invalid Currency ID | currencies are enabled and currency_id doesn't correspond to a currency in the system when creating an offer |
Invalid Offer Link | offer_link is NULL or empty when creating an offer |
Invalid Thankyou Link | thankyou_link is NULL or empty when creating an offer |
Invalid SSL | ssl equals no_change when creating an offer |
Invalid Enable View Thru Conversions | enable_view_thru_conversions equals no_change when creating an offer |
Invalid Click Trumps Impression | click_trumps_impression equals no_change when creating an offer |
Invalid Disable Click Deduplication | disable_click_deduplication equals no_change when creating an offer |
Invalid Last Touch | last_touch equals no_change when creating an offer |
Invalid Enable Transaction ID Deduplication | enable_transaction_id_deduplication equals no_change when creating an offer |
Invalid Received Percentage | received_percentage equals no_change when creating an offer |
Invalid Offer Contract Hidden | offer_contract_hidden equals no_change when creating an offer |
Invalid Postbacks Only | postbacks_only equals no_change when creating an offer |
No Offer Contracts Found For ID ### | redirect_offer_contract is greater than 0, but no offer contracts are found for that id |
Invalid Redirect 404 | redirect_404 equals no_change when creating an offer |
Invalid Creative File Import URL | general error when the offer thumbnail offer fails |
Invalid Offer ID | offer_id doesn't correspond to an offer in the system |