ADDEDIT OfferContract API
Updated on 2014-05-01
Current Version: Version 1
Deprecated Version: NA
Requests Allowed: GET&SOAP 
Summary:
Allows you to create or update OfferContract in CAKE.
Resource/WSDL Page:
http://yourdomainhere.com/api/1/addedit.asmx?op=OfferContract
Parameters
api_key  | Must be a valid API Key (existing and NOT expired) Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh  | 
offer_id  | Required Example Values:  | 
offer_contract_id  | Required Example Values: 0 to create, > 0 to edit  | 
offer_contract_name  | Required Example Values:  | 
price_format_id  | Required Example Values:  | 
payout  | Required Example Values:  | 
received  | Required Example Values: | 
received_percentage  | Required Example Values: True, False | 
offer_link  | Required Example Values: | 
thankyou_link  | Required Example Values: | 
offer_contract_hidden  | Required Example Values: True, False | 
offer_contract_is_default  | Required Example Values: True, False | 
use_fallback_targeting  | Required Example Values: True, False | 
**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
Sample XML Response:
<offercontract_addedit_response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/1/">
 <success>true</success>
 <message>Offer Contract 3630 Created</message>
 <offer_contract_id>3630</offer_contract_id>
</offercontract_addedit_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 correspond to an offer in the system  | ||||
Invalid Offer Name  | offer_contract_name is NULL or empty  | ||||
Invalid Payout Amount  | payout is less than 0  | ||||
Invalid Received Amount  | received is less than 0 or received is greater than 0 and the offer has an offer type of Hosted  | ||||
Invalid Offer Link  | offer_link is NULL or empty  | ||||
Invalid Thankyou Link  | thankyou_link is NULL or empty  | ||||
Invalid Offer Contract ID  | offer_contract_id does not correspond to an offer_contract in the system  | ||||