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

Category Targeting API

This API exposes operations to allow management of Category Targeting features on Campaigns and Ads within the Cxense Advertising platform.

This API can be accessed by Advertisers and supports the following combination of operations on Category Targeting feature domain objects:

Object

Supported operations

Category Targeting feature list

GET

Category Targeting feature

POST, GET, PUT and DELETE

Retrieving list of Category Targeting features for a Campaign or Ad

The GET operation is supported for listing existing Category Targeting features.

GET

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

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad for which the Category Targeting 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/categoryFeatures/0000000000039355

 

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

<?xml version="1.0" encoding="UTF-8"?>
<cx:categoryFeatures xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:categoryFeature>
        <cx:featureId>0000000000002dc8</cx:featureId>
        <cx:templateId>0000000000002db9</cx:templateId>
        <cx:category>group:parent/child</cx:category>
        <cx:category>group:parent/child2</cx:category>
    </cx:categoryFeature>
    <cx:categoryFeature>
        <cx:featureId>0000000000004ed9</cx:featureId>
        <cx:templateId>0000000000003ec0</cx:templateId>
        <cx:category>group:parent</cx:category>
        <cx:category>group:parent1/child</cx:category>
    </cx:categoryFeature>
</cx:categoryFeatures>

 

Individual Category Targeting features

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

POST

Create a new Category Targeting feature under the Campaign or Ad with the given parentId.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

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

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

 

<?xml version="1.0" encoding="UTF-8"?>
<cx:categoryFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:templateId>0000000000002db9</cx:templateId>
    <cx:category>group:parent/child1</cx:category>
    <cx:category>group:parent/child2</cx:category>
</cx:categoryFeature>

Categories passed to Cxad via this API need to match a required format of {group}:[{parent}/{child}].  A group followed by a colon is mandatory, followed by a optional number of categories separated by the '/' character.

Example command:

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

GET

Retrieve the Category Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Category Targeting feature to be retrieved

Example command:

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

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

 

<?xml version="1.0" encoding="UTF-8"?>
<cx:categoryFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:featureId>0000000000002dc8</cx:featureId>
    <cx:templateId>0000000000002db9</cx:templateId>
    <cx:category>group:parent/child1</cx:category>
    <cx:category>group:parent/child2</cx:category>
</cx:categoryFeature>

 

PUT

Update the Category Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Category Targeting feature to be updated

Example command:

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

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

<?xml version="1.0" encoding="UTF-8"?>
<cx:categoryFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
    <cx:category>group:parent/child1</cx:category>
    <cx:category>group:parent/child2</cx:category>
</cx:categoryFeature>

Categories passed to Cxad via this API need to match a required format of {group}:[{parent}/{child}].  A group followed by a colon is mandatory, followed by a optional number of categories separated by the '/' character.

DELETE

Delete the Category Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Category Targeting feature to be deleted

Example command:

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


Last updated: