Submit a Ticket My Tickets
Welcome
Login  Sign up

ADDEDIT CreativeFiles API Version 1

ADDEDIT CreativeFiles API Version 1

Updated on 2014-05-01
Current Version: Version 1
Deprecated Version: n/a
Requests Allowed: GET & SOAP

 

Summary:

Allows you to create or update CreativeFiles in CAKE.


Resource/WSDL Page:

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


Parameters

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

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

Obtained via EXPORT Creatives API
Required to create new creative files

Example Values: 123
creative_file_id
Required
Type: INTEGER
Length (Max/Min): N/A

Obtained via EXPORT Creative API
0 to create, >0 to editExample Values: 0
creative_file_import_url
Required
Type: STRING
Length (Max/Min): N/A

URL where file is hosted

Example Values: domain.com/filename.jpg
is_preview_fileRequired
Type: BOOL
Length (Max/Min):N/A

Is this file going to be used for the preview?

Required  
Example Values: true/false

replace_all_filesRequired
Type:BOOL
Length (Max/Min):N/A

Do you want these files to replace existing creatives?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

GET
https://demo-new.cakemarketing.com/api/1/addedit.asmx/CreativeFiles?api_key=3YmDJeT3VHTFhDqAjr2OlQ&creative_id=1135048&creative_file_id=0&creative_file_import_url= https://www.dropbox.com/s/j4h7sxyfcmbakb7/Pensive%20Parakeet.jpg&is_preview_file= True&replace_all_files=TRUE 



Sample XML Response:


Create: 

<creativefiles_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 Files 11438 Created.</message>
<creative_files>
 <creative_file>
  <creative_file_id>11438</creative_file_id>
  <creative_file_name>Pensive_Parakeet.jpg</creative_file_name>
  <updated>false</updated>
</creative_file>
</creative_files>
</creativefiles_addedit_response>

  

 Edit:

 

<creativefiles_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 File 11438 Updated</message>
<creative_files>
<creative_file>
  <creative_file_id>11438</creative_file_id>
  <creative_file_name>Pensive_Parakeet.jpg</creative_file_name>
  <updated>true</updated>
</creative_file>
</creative_files>
</creativefiles_addedit_response>

 


Example Error Messages: 

Error Message
Likely Cause
Invalid API Key
API Key does not exist or is expired
Invalid Creative ID
creative_id did not match a valid creative in the system
Invalid Creative File ID
creative_file_id did not match a creative file in the system
Invalid Creative / Creative File ID
creative_file_id and/or creative_id are less than zero
Invalid Creative File Import URL
the creative_file_import_url is not  formatted correctly or is null or empty
Invalid Zip file
error when trying to read the zip file
Could not extract files from Zip file
error when trying to extract the zip file
Zip file cannot be read
the zip file was extracted but was NULL
Could not download file from link
error when trying to download the non-zip file from the creative_file_import_url
Creative File Name used by different Creative File
file that is being downloaded has a name that is already used for a different creative_file for the specified creative_id
Could not extract file from Zip file
error when trying to extract the zip file
Could not download file from url
error when trying to download the non-zip file from the creative_file_import_url when updating a specific creative file

 

 

Did you find it helpful? Yes No

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