ADDEDIT Creative API Version 1

Updated on 2014-5-1
Current Version: Version 1
Deprecated Version: N/A
Requests Allowed: GET/SOAP

 

Summary:

Allows you to create or update Creative details for an offer in CAKE.

 

Resource/WSDL Page:

http://<your_domain_here>/api/1/addedit.asmx?op=Creative 


Parameters

api_key
Required
Type: STRING
Length (Max): 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.

Example Values: Fo35NRAqvFLXoZxqB4aViaiYM7iVMhh

creative_id
Required
Type: INTEGER

Obtained via EXPORT Creatives API

Example Values: 1234
 
offer_id

Required
Type: INTEGER

Obtained via EXPORT Offers API

0 to skip on Edit

Example Values: 1234

creative_name
Required
Type: STRING

On Add or Edit, Creative Name is NOT required.
On Add, "null" or empty string skips Creative Name.
On Edit, "null" sets Creative Name == null, Empty String skips already implemented

Example Values: Image

third_party_name
Required
Type: STRING

Obtained via EXPORT Creatives API

NULL sets it as NULL on edit, empty skips on edit

Example Values: External Image Name

creative_type_id
Required
Type: INTEGER

1=Link, 2=Email, 3=Image, 4=Flash, 5=Text, 6=HTML, 7=Video

Required on creation, 0 to skip on edit

Example Values: 1

creative_status_id
Required
Type: INTEGER

1=Active, 2=Inactive, 3=Hidden, 

Required on creation, 0 to skip on edit

Example Values: 1

width
Required
Type: INTEGER

On Add, -1 and -2 sets both width/height == null (the equivalent of skipping on Add). Anything less than -2 fails validation. >= 0 will set
On Edit, -1 skips width/height , -2 clears width/height. >= 0 will set

Example Values: 11

height
Required
Type: INTEGER

On Add, -1 and -2 sets both width/height == null (the equivalent of skipping on Add). Anything less than -2 fails validation. >= 0 will set
On Edit, -1 skips width/height , -2 clears width/height. >= 0 will set

Example Values: 11

offer_link
Required
Type: STRING

NULL sets it as NULL on edit, empty skips on edit

Example Values: http://yourlink.com

allow_link_override
Required
Type: BOOL

Allow link overrides - "TRUE" or "FALSE"

Example Values: TRUE

notes
Required
Type: STRING

Notes associated with the creative.  

NULL sets it as NULL on edit, empty skips on edit

Example Values: My notes for this creative

 **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
https://demo-new.cakemarketing.com/api/1/addedit.asmx/Creative? api_key=3YmDJeT3VHTFhDqAjr2OlQ &creative_id=0 &offer_id=100 &creative_name=Added+via+API &third_party_name=N%2Fa &creative_type_id=6 &creative_status_id=3 &width=480 &height=1060 &offer_link=http%3A%2F%2Fbradsexample.com &allow_link_override=FALSE &notes=Noteshere

 


Sample XML Responses:


Create:

   

<creative_addedit_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/1/">
<success>true</success>
<message>Creative 1141054 Created</message>
<creative_id>1141054</creative_id>
</creative_addedit_response>

   

 

Edit:

 

<creative_addedit_response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://cakemarketing.com/api/1/">
<success>true</success>
<message>Creative 1141053 Updated</message>
<creative_id>1141053</creative_id>
</creative_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 equal 0 and does not match an offer in the system

Invalid Creative Name

creative_name is NULL or empty
Invalid Creative Type ID

creative_type_id does not match a creative type in the system

Invalid Creative Status ID

creative_status_id does not match a creative status in the system

Invalid Creative ID

creative_id does not match a creative in the system