Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT Offer API Version 3 (DEPRECATED)

ADDEDIT Offer API Version 3

Updated on 2015-03-06
Current Version: Version 5
Deprecated Version: 1, 2
3
Requests Allowed: GET & SOAP

 

Summary:

Inserts new offers or edits existing offers.

 

Resource/WSDL Page:

http://<your_domain_here>/api/3/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
Required
Type: INTEGER
Length (Max/Min): N/A

 

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

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
Required
Type: BOOL_STRING
Length (Max/Min): N/A

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

 

Status of the offer as active, inactive or pending.Required on creation, 0 to skip on edit

Example Values: 1
 

offer_type_id
Required
Type: BYTE
Length (Max/Min): N/A

 

Type of offer as 3rd Party, Hosted or Host-n-Post. Required on creation, not used on edit

Example Values: 1
   

currency_id
Required
Type: BYTE
Length (Max/Min): N/A

 

Currency for the offer. Requered if currencies are enabled and creating an offer, not used on edit

Example Values: 1
 

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.

Example Values: off

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

Example Values: 30

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

Example Values: 30

redirect_offer_contract_id
Required
Type: INTEGER
Length (Max/Min): N/A

 

Select redirect offer contact for this offer. 0 to skip

Example Values: 123

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.

Example Values: off

enable_view_thru_conversions
Required
Type: BOOL_TYPE
Length (Max/Min): N/A

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 attribute conversion 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 deduplicate 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.

Example Values: off

 

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

 

postback_url_ms_delay
Required
Type: INTEGER
Length (Max/Min): N/A

 

Tine in ms before postback url pixel fires.

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
Required
Type: BOOL_TYPE
Length (Max/Min): N/A

 

Set option to fire global pixel for nonpaid conversions to on, off or no_change.

Example Values: off

 

static_suppression
Required
Type: SHORT
Length (Max/Min): N/A

 

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

 

Example Values: 1

conversion_behavior_on_redirect
Required
Type: BYTE
Length (Max/Min): N/A

 

Example Values: 1

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"

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

Example Values: change

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

Example Values: change1234

offer_contract_hidden
Required
Type: BOOL
Length (Max/Min): N/A

 

Hide offer contract.

Example Values: TRUE

price_format_id
Required
Type: BYTE
Length (Max/Min): N/A

Price format of the offer as CPA, CPC, CPM, Fixed or RevShare.

Example Values: 1

payout
Required
Type: DECIMAL
Length (Max/Min): N/A

Payout to affiliate on conversion.

Example Values: 20.05

received
Required
Type: DECIMAL
Length (Max/Min): N/A

Revenue received from advertiser on conversion.

Example Values: 20.05

received_percentage
Required
Type: BOOL
Length (Max/Min): N/A

Receive revenue as a percentage from advertiser.

Example Values: TRUE

offer_link
Required
Type: STRING
Length (Max/Min): 400

URL for offer landing page. Required on creation, NULL or empty on edit skips

Example Values: http://www.domain.com/a

thankyou_link
Required
Type: STRING
Length (Max/Min): 400

URL to sent traffic when user revisits after conversion. Required on creation, NULL sets it as NULL on edit, empty skips on edit

xample Values: http://www.domain.com/ty

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

Example Values: http://www.domain.com/a

thumbnail_file_import_url
Optional
Type: STRING
Length (Max/Min): 400

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

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

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

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

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

Example Values: TAG1, TAG2, TAG3

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.

Example Values: off

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

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: TRUE

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: 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/addedit.asmx/Offer?api_key=dNJFmId9rI&offer_id=55378222&advertiser_id=1&vertical_id=1&offer_name=Super+Sneakers&third_party_name=Sneak101&offer_status_id=1&offer_type_id=3&currency_id=1&ssl=off&click_cookie_days=30&impression_cookie_days=30&enable_view_thru_conversions=off&click_trumps_impression=off&disable_click_deduplication=off&last_touch=off&enable_transaction_id_deduplication=off&offer_contract_name=Offer+Contract+1&price_format_id=1&payout=3.25&received=4.35&received_percentage=off&offer_link=http://getCAKE.com&thankyou_link=http://getCAKE.com/thankyou&offer_contract_hidden=off&preview_link=http://getCAKE.com&offer_description=Hot+new+sneakers+for+you&restrictions=Only+for+sneakers,+not+sandals&advertiser_extended_terms=Must+be+a+human+to+run+Offer&testing_instructions=Use+a+fake+CC&tags=tagged&hidden=off&redirect_offer_contract_id=0&redirect_404=off&postbacks_only=off&pixel_html=&postback_url=&postback_url_ms_delay=0&fire_global_pixel=off&fire_pixel_on_non_paid_conversions=off&static_suppression=1&conversion_cap_behavior=0&conversion_behavior_on_redirect=0&expiration_date=12/31/2014 13:59:59&expiration_date_modification_type=do_not_change&thumbnail_file_import_url=&allow_affiliates_to_create_creatives=off&unsubscribe_link=&from_lines=&subject_lines=




Sample XML Response:

<offer_addedit_response>
  <success>true</success>
  <message>Offer 1001468 Created</message>
  <offer_id>1001468</offer_id>
</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

 

Did you find it helpful? Yes No

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