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

Geospatial Targeting Feature REST API

This API exposes operations to allow management of Geospatial 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 Geospatial Targeting feature domain objects:

Object

Supported operations

Geospatial Targeting feature list

GET

Geospatial Targeting feature

POST, GET, PUT and DELETE

Retrieving the list of Geospatial Targeting features saved against a Campaign or Ad

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

GET

Retrieve all of the Geospatial 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 Geospatial Targeting features stored against the Campaign and its Ads in a single response.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

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

 

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

<?xml version="1.0"?>
<cx:geospatialFeatures xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:geospatialFeature>
    <cx:updateDate>2015-07-02T05:57:17.615Z</cx:updateDate>
    <cx:featureId>0000000000000425</cx:featureId>
    <cx:templateId>0000000000000406</cx:templateId>
    <cx:rectangle>
      <cx:bottomLeft>
        <cx:latitude>-27.47949163503715</cx:latitude>
        <cx:longitude>153.01530495285988</cx:longitude>
      </cx:bottomLeft>
      <cx:topRight>
        <cx:latitude>-27.457787622273653</cx:latitude>
        <cx:longitude>153.05341377854347</cx:longitude>
      </cx:topRight>
    </cx:rectangle>
  </cx:geospatialFeature>
  <cx:geospatialFeature>
    <cx:updateDate>2015-07-02T05:56:47.126Z</cx:updateDate>
    <cx:featureId>0000000000000418</cx:featureId>
    <cx:templateId>0000000000000406</cx:templateId>
    <cx:rectangle>
      <cx:bottomLeft>
        <cx:latitude>-37.82185324692257</cx:latitude>
        <cx:longitude>144.95041877031326</cx:longitude>
      </cx:bottomLeft>
      <cx:topRight>
        <cx:latitude>-37.80666460115532</cx:latitude>
        <cx:longitude>144.97608214616776</cx:longitude>
      </cx:topRight>
    </cx:rectangle>
    <cx:rectangle>
      <cx:bottomLeft>
        <cx:latitude>-33.88096215402848</cx:latitude>
        <cx:longitude>151.20026618242264</cx:longitude>
      </cx:bottomLeft>
      <cx:topRight>
        <cx:latitude>-33.85359529879318</cx:latitude>
        <cx:longitude>151.21374160051346</cx:longitude>
      </cx:topRight>
    </cx:rectangle>
  </cx:geospatialFeature>
</cx:geospatialFeatures>


Individual Geospatial Targeting features

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

POST

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

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

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

 

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

<?xml version="1.0"?>
<cx:geospatialFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>0000000000000406</cx:templateId>
  <cx:rectangle>
    <cx:bottomLeft>
      <cx:latitude>-27.47949163503715</cx:latitude>
      <cx:longitude>153.01530495285988</cx:longitude>
    </cx:bottomLeft>
    <cx:topRight>
      <cx:latitude>-27.457787622273653</cx:latitude>
      <cx:longitude>153.05341377854347</cx:longitude>
    </cx:topRight>
  </cx:rectangle>
</cx:geospatialFeature>

 

Example command:

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

GET

Retrieve the Geospatial Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Geospatial 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/geospatial/00000000000353gg

 

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

<?xml version="1.0"?>
<cx:geospatialFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:updateDate>2015-07-02T05:57:17.615Z</cx:updateDate>
  <cx:featureId>0000000000000425</cx:featureId>
  <cx:templateId>0000000000000406</cx:templateId>
  <cx:rectangle>
    <cx:bottomLeft>
      <cx:latitude>-27.47949163503715</cx:latitude>
      <cx:longitude>153.01530495285988</cx:longitude>
    </cx:bottomLeft>
    <cx:topRight>
      <cx:latitude>-27.457787622273653</cx:latitude>
      <cx:longitude>153.05341377854347</cx:longitude>
    </cx:topRight>
  </cx:rectangle>
</cx:geospatialFeature>


PUT

Update the Geospatial Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Geospatial 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/geospatial/00000000000353gg -d @input.xml

 

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

<?xml version="1.0"?>
<cx:geospatialFeature xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>0000000000000406</cx:templateId>
  <cx:rectangle>
    <cx:bottomLeft>
      <cx:latitude>-27.47949163503715</cx:latitude>
      <cx:longitude>153.01530495285988</cx:longitude>
    </cx:bottomLeft>
    <cx:topRight>
      <cx:latitude>-27.457787622273653</cx:latitude>
      <cx:longitude>153.05341377854347</cx:longitude>
    </cx:topRight>
  </cx:rectangle>
</cx:geospatialFeature>

 

DELETE

Delete the Geospatial Targeting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Geospatial 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/geospatial/00000000000353gg


Last updated: