We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

Image Creative Feature REST API

This API exposes operations to allow management of Image Creative features within the Cxense Advertising platform.

This API can be accessed by users with the appropriate permissions to manage Image Creative features and supports the following combination of operations on Image Creative feature domain objects:

Object

Supported operations

Image Creative feature list

GET

Image Creative feature

POST, GET, PUT and DELETE

Retrieving the list of Image Creative features saved against a Campaign or Ad

The GET operation is supported for listing existing Image Creative features.

GET

Retrieve all of the Image Creative features saved at or below the Campaign or Ad with the given parentId. One call using the id of a Campaign will return all of the Image Creative features stored against the Campaign and all of Ads in a single response.

https://{cxadbaseurl}/api/secure/imageCreatives/{parentId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad for which the Image Creative features are to be retrieved

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X GET https://cxad.cxense.com/api/secure/imageCreatives/0000000000039306

This XML example shows the contents returned from a typical GET call:

<?xml version="1.0"?>
<cx:imageCreatives xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:imageCreative>
    <cx:featureId>000000000000285b</cx:featureId>
    <cx:templateId>0000000000003968</cx:templateId>
    <cx:description>Test Image Creative Feature</cx:description>
    <cx:destinationUrl>http://www.test.com/destination</cx:destinationUrl>
    <cx:image fileName="300x250.png" contentType="image/png">
      <cx:resourceUrl>http://cdn.example.com/a962fdcf71cbcaf319a196f7a239a783adba43dd8022c3df975974311c9a53a0.png</cx:resourceUrl>
    </cx:image>
  </cx:imageCreative>
  <cx:imageCreative>
    <cx:featureId>000000000000396c</cx:featureId>
    <cx:templateId>0000000000003968</cx:templateId>
    <cx:description>Another Image Creative Feature</cx:description>
    <cx:destinationUrl>http://www.example.com/dest</cx:destinationUrl>
    <cx:image fileName="300x250.gif" contentType="image/gif">
      <cx:resourceUrl>http://cdn.example.com/13a6d17125ee9dcaccb69216881301a89a6fdb45b32263078070f8fbce6501c7.gif</cx:resourceUrl>
    </cx:image>
  </cx:imageCreative>
</cx:imageCreatives>

Individual Image Creative features

The POST, GET, PUT and DELETE operations are supported for management of individual Image Creative features.

POST

Create a new Image Creative feature under the Campaign or Ad with the given parentId.

https://{cxadbaseurl}/api/secure/imageCreative/{parentId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad under which the new Image Creative feature is to be created

This XML example shows the contents required to be supplied for a POST call:

<?xml version="1.0"?>
<cx:createImageCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>000000000000c220</cx:templateId>
  <cx:description>New Image Creative feature</cx:description>
  <cx:destinationUrl>http://new-destination-url.com/testing</cx:destinationUrl>
  <cx:image fileName="300x250.jpg" contentType="image/jpeg">
    <cx:imageData>
      [Base64 encoded image file contents]
    </cx:imageData>
  </cx:image>
</cx:createImageCreative>

Please refer to the example-image-creative-post.xml file below for an XML example containing Base64 encoded image file contents.

example-image-creative-post.xml

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X POST https://cxad.cxense.com/api/secure/imageCreative/0000000000039306 -d @input.xml

This XML example shows the contents returned from a typical POST call:

<?xml version="1.0"?>
<cx:imageCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:featureId>0000000000005dd2</cx:featureId>
  <cx:templateId>000000000000c220</cx:templateId>
  <cx:description>New Image Creative feature</cx:description>
  <cx:destinationUrl>http://new-destination-url.com/testing</cx:destinationUrl>
  <cx:status>LIVE</cx:status>
  <cx:image fileName="300x250.jpg" contentType="image/jpeg">
    <cx:resourceUrl>http://cdn.example.com/13a6d17125ee9dcaccb69216881301a89a6fdb45b32263078070f8fbce6501c7.jpg</cx:resourceUrl>
  </cx:image>
</cx:imageCreative>

In the event that creation of this creative will cause the Campaign or Ad to become valid this will not occur until after the sync task to propagate the uploaded binary data to the CDN has successfully run. The sysc task currently executes on the taskserver every second and can take anywhere in the order of seconds up to a couple of minutes to complete. Until such time as it has completed the Campaign/Ad will potentially continue to be considered invalid.

GET

Retrieve the Image Creative feature with the given featureId

https://{cxadbaseurl}/api/secure/imageCreative/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Image Creative feature to be retrieved

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X GET https://cxad.cxense.com/api/secure/imageCreative/0000000000039307

This XML example shows the contents returned from a typical GET call:

<?xml version="1.0"?>
<cx:imageCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:featureId>000000000000396c</cx:featureId>
  <cx:templateId>0000000000003968</cx:templateId>
  <cx:description>Test Image Creative Feature</cx:description>
  <cx:destinationUrl>http://www.test.com/destination</cx:destinationUrl>
  <cx:image fileName="300x250.png" contentType="image/png">
    <cx:resourceUrl>http://cdn.example.com/a962fdcf71cbcaf319a196f7a239a783adba43dd8022c3df975974311c9a53a0.png</cx:resourceUrl>
  </cx:image>
</cx:imageCreative>

 

PUT

Update the Image Creative feature with the given featureId

https://{cxadbaseurl}/api/secure/imageCreative/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Image Creative feature to be updated

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X PUT https://cxad.cxense.com/api/secure/imageCreative/0000000000039307 -d @input.xml

This XML example shows the contents required to be supplied for a PUT call:

<?xml version="1.0"?>
<cx:updateImageCreative xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:description>Updated Description</cx:description>
  <cx:destinationUrl>http://updated-destination-url.com/</cx:destinationUrl>
  <cx:image fileName="300x250.gif" contentType="image/gif">
    <cx:imageData>
      [Base64 encoded image file contents]
    </cx:imageData>
  </cx:image>
</cx:updateImageCreative>

 

DELETE

Delete the Image Creative feature with the given featureId

https://{cxadbaseurl}/api/secure/imageCreative/{featureId}

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Image Creative feature to be deleted

Example command:

curl -s -H "Content-type: text/xml" -u jsmith123:password1 -X DELETE https://cxad.cxense.com/api/secure/imageCreative/0000000000039307


Last updated: