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

Day Parting Feature REST API

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

Object

Supported operations

Day Parting feature list

GET

Day Parting feature

POST, GET, PUT and DELETE

Retrieving the list of Day Parting features saved against a Campaign or Ad

The GET operation is supported for listing existing Day Parting features.

GET

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

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • parentId the id of either a Campaign or Ad for which the Day Parting 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/dayPartings/0000000000039306

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

<?xml version="1.0"?>
<cx:dayPartings xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:dayParting>
    <cx:featureId>0000000000004a5e</cx:featureId>
    <cx:templateId>0000000000004a46</cx:templateId>
    <cx:activeTimes>
      <cx:dayPart>
        <cx:start>06:00:00</cx:start>
        <cx:end>10:00:00</cx:end>
      </cx:dayPart>
      <cx:dayPart>
        <cx:start>16:00:00</cx:start>
        <cx:end>19:00:00</cx:end>
      </cx:dayPart>
    </cx:activeTimes>
    <cx:dayParts></cx:dayParts>
  </cx:dayParting>
  <cx:dayParting>
    <cx:featureId>0000000000004a76</cx:featureId>
    <cx:templateId>0000000000004a46</cx:templateId>
    <cx:activeTimes></cx:activeTimes>
    <cx:dayParts>     
      <cx:MONDAY>
        <cx:dayPart>
          <cx:start>09:00:00</cx:start>
          <cx:end>18:00:00</cx:end>
        </cx:dayPart>
      </cx:MONDAY>     
      <cx:TUESDAY>
        <cx:dayPart>
          <cx:start>09:00:00</cx:start>
          <cx:end>18:00:00</cx:end>
        </cx:dayPart>
      </cx:TUESDAY>
      <cx:WEDNESDAY>
        <cx:dayPart>
          <cx:start>09:00:00</cx:start>
          <cx:end>18:00:00</cx:end>
        </cx:dayPart>
      </cx:WEDNESDAY>
      <cx:THURSDAY>
        <cx:dayPart>
          <cx:start>09:00:00</cx:start>
          <cx:end>18:00:00</cx:end>
        </cx:dayPart>
      </cx:THURSDAY>
      <cx:FRIDAY>
        <cx:dayPart>
          <cx:start>09:00:00</cx:start>
          <cx:end>18:00:00</cx:end>
        </cx:dayPart>
      </cx:FRIDAY>
      <cx:SATURDAY></cx:SATURDAY>
      <cx:SUNDAY></cx:SUNDAY>
    </cx:dayParts>
  </cx:dayParting>
</cx:dayPartings>

Individual Day Parting features

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

POST

Create a new Day Parting feature under the Campaign or Ad with the given parentId.

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

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

Example command:

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

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

<?xml version="1.0"?>
<cx:dayParting xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:templateId>0000000000004a46</cx:templateId>
  <cx:activeTimes>
    <cx:dayPart>
      <cx:start>06:00:00</cx:start>
      <cx:end>10:00:00</cx:end>
    </cx:dayPart>
    <cx:dayPart>
      <cx:start>16:00:00</cx:start>
      <cx:end>19:00:00</cx:end>
    </cx:dayPart>
  </cx:activeTimes>
  <cx:dayParts></cx:dayParts>
</cx:dayParting>

GET

Retrieve the Day Parting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Day Parting feature to be retrieved

Example command:

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

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

<?xml version="1.0"?>
<cx:dayParting xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:featureId>0000000000004a76</cx:featureId>
  <cx:templateId>0000000000004a46</cx:templateId>
  <cx:activeTimes></cx:activeTimes>
  <cx:dayParts>
    <cx:MONDAY>
      <cx:dayPart>
        <cx:start>09:00:00</cx:start>
        <cx:end>18:00:00</cx:end>
      </cx:dayPart>
    </cx:MONDAY>
    <cx:TUESDAY>
      <cx:dayPart>
        <cx:start>09:00:00</cx:start>
        <cx:end>18:00:00</cx:end>
      </cx:dayPart>
    </cx:TUESDAY>
    <cx:WEDNESDAY>
      <cx:dayPart>
        <cx:start>09:00:00</cx:start>
        <cx:end>18:00:00</cx:end>
      </cx:dayPart>
    </cx:WEDNESDAY>
    <cx:THURSDAY>
      <cx:dayPart>
        <cx:start>09:00:00</cx:start>
        <cx:end>18:00:00</cx:end>
      </cx:dayPart>
    </cx:THURSDAY>
    <cx:FRIDAY>
      <cx:dayPart>
        <cx:start>09:00:00</cx:start>
        <cx:end>18:00:00</cx:end>
      </cx:dayPart>
    </cx:FRIDAY>
    <cx:SATURDAY></cx:SATURDAY>
    <cx:SUNDAY></cx:SUNDAY>
  </cx:dayParts>
</cx:dayParting>

PUT

Update the Day Parting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Day Parting feature to be updated

Example command:

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

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

<?xml version="1.0"?>
<cx:dayParting xmlns:cx="http://cxense.com/cxad/api/cxad">
  <cx:featureId>0000000000004a5e</cx:featureId>
  <cx:templateId>0000000000004a46</cx:templateId>
  <cx:activeTimes>
    <cx:dayPart>
      <cx:start>06:00:00</cx:start>
      <cx:end>10:00:00</cx:end>
    </cx:dayPart>
    <cx:dayPart>
      <cx:start>16:00:00</cx:start>
      <cx:end>19:00:00</cx:end>
    </cx:dayPart>
  </cx:activeTimes>
  <cx:dayParts></cx:dayParts>
</cx:dayParting>

DELETE

Delete the Day Parting feature with the given featureId

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

Parameters:

  • cxadbaseurl the base URL of the Cxense Advertising system

  • featureId the id of the Day Parting feature to be deleted

Example command:

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


Last updated: