Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT Offer API Version 2 (DEPRECATED)

ADDEDIT Offer API Version 2

Updated on 2014-04-24
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/2/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

 

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

 

Secure pixel required for the offer.

Example Values: TRUE

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

Cookie set in days for the offer.

Example Values: 30

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

Impression set in days for the offer.

Example Values: 30

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

See conversion generated though impressions.

Example Values: TRUE

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

Clicks override impressions for conversions.

Example Values: TRUE

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

Allow duplicate clicks

Example Values: TRUE

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

Attribute conversion to last touch.

Example Values: TRUE

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

Deduplicate conversions based on transaction ID.

Example Values: TRUE

offer_contract_name
Required
Type: STRING
Length (Max/Min): 50

Name of the offer contract. NULL or empty skips on creation, NULL sets it as NULL on edit, empty skips on edit

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

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

Hide offer contract.

Example Values: TRUE

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

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

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/1/addedit.asmx/Offer?api_key=dNJFmId9rI&offer_id=0&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=TRUE&click_cookie_days=30&impression_cookie_days=30&enable_view_thru_conversions=TRUE&click_trumps_impression=FALSE&disable_click_deduplication=FALSE&last_touch=FALSE&enable_transaction_id_deduplication=FALSE&offer_contract_name=Offer+Contract+1&price_format_id=1&payout=3.25&received=4.35&received_percentage=false&offer_link=http://getCAKE.com&thankyou_link=http://getCAKE.com/thankyou&offer_contract_hidden=FALSE&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

 

Sample XML Response:


  true
  Offer 1001468 Created
  1001468

 

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 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.