ADDEDIT Campaign API Version 1
Updated on 2014-5-6
Current Version: Version 1
Deprecated Version: N/A
Requests Allowed: GET/SOAP
Summary:
Allows you to create or update campaign details in CAKE.
Resource/WSDL Page:
http://<your_domain_here>/api/1/addedit.asmx?op=Campaign
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 Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh |
campaign_id |
This is the identifier for a unique campaign. 0 adds a new campaign, any value >0 will edit the campaign with that ID. You can obtain the campaign ID from your CAKE instance on the campaign card. Example Values: 0 or 1234 |
affiliate_id |
This is the identifier for a unique Affiliate. This can be found on any Affiliate card. Example Values: 1234 |
offer_id |
This is the identifier for a unique Offer. This can be found on any Offer card. Either offer_id or offer_contract is required Example Values: 1234 |
offer_contract_id |
This is the identifier for a unique Offer Contract ID. Either offer_id or offer_contract is required Example Values: 1234 |
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: 1234 |
third_party_name |
Third party name associated with an offer. Empty sets to null in the database Example Values: Third Party
|
account_status_id |
Identifier for the status of the campaign. Required on creation, 0 to skip on edit
|
currency_id |
Identifier for the currency used on the campaign, only used if currencies are enabled. 0 to skip Example Values: 1 |
payout |
Payout for the campaign Example Values: 1.40
|
paid_redirects |
Are paid redirects used? Example Values: TRUE |
clear_session_on_conversion |
Clear the session (or not) when an conversion occurs. Example Values: TRUE |
postback_url |
URL to be used for the postback for the campaign. Example Values: http://postbackurl.com |
postback_delay_ms |
Delay to be used for triggering the postback call (in milliseconds). Required on creation, < 0 to skip on edit Example Values: 30 |
pixel_html |
Sets affiliate's pixel for campaign.
|
test_link |
Allows affiliates to send test clicks through their own link and then redirects to their unique CAKE link. |
**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:
<campaign_addedit_response> <success>true</success> <message>Campaign Updated</message> <success_info> <campaign_id>3571</campaign_id> <affiliate_id>-1</affiliate_id> <offer_id>1000042</offer_id> <offer_contract_id>647</offer_contract_id> <media_type_id>15</media_type_id> <original>true</original> </success_info> </campaign_addedit_response> |
Example Error Messages:
Error Message |
Likely Cause |
Invalid API Key |
API key does not exist or is expired. |
Invalid Affiliate |
no affiliates were found in the database for the specified affiliate_id |
Offer or Offer Contract Required |
offer_id and offer_contract_id is less than or equal to 0 |
Invalid Offer |
no offer found for the specified offer_id that has a default offer contract |
Invalid Currency |
currencies is enabled for the client and no curreny was found for the currency_id |
Invalid Campaign ID |
no campaign found for the specified campaign_id |
Invalid Offer Contract |
offer_contract_id doesn't match an offer contract in the database for the specified price_format_id or the specified offer_id |
Invalid Media Type |
media_type_id doesn't match a media type in the database |
Invalid Account Status |
account_status_id doesn't match an account status in the database |