Tags

AI Tools

Overview

Davinci Commerce Programmable Personalization API allows users to generate and manage tags which are then placed on websites. These tags fetch ads served by the Davinci Commerce Server. Tags can also be bundled with various trackers and DSP macros.

Method Name

Method Type

Description

Get Tags

GET

Gets tags for a given media plan under a particular user account.

List Media Plans

GET

Gets media plans for a given user account.

Generate Tags

POST

Creates tags for a given media plan.

Get Trackers

GET

Gets trackers for a particular media plan.

Update Trackers

PUT

Updates trackers for a particular media plan used in a given campaign.

Create Media Plans

POST

Creates media plans for a given user account

Update Media Plans

PUT

Updates media plan for a given user account

Get Tag Details

GET

Gets details of a particular tag for a given user account.

Get Latest Tag

GET

Gets the latest tag generated for a given user account.

Get List of Campaigns for a Media Plan

GET

Get list of campaigns associated with a given media plan.

Get Media Plan Details

GET

Get details of a particular media plan.

Get Tags

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/media-plans/241/tags/

Since this API needs an additional parameter, the path should be one of the following:

1. GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/tags/ALL 2. GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/tags/LATEST 3. GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/tags/:createTagsId
Info

Note that based on the above 1, 2 and 3 scripts given:

API 1 will return all tags ever generated for that mediaPlan

API 2 will return the latest tag generated for each combo of site and placement in the mediaPlan

API 3 will return all the tags generated for a specific generation request (this request should have returned a tagId that should be passed here).

Sample Response

{ "tags": ["<script type=\"text/javascript\" src=\"https://as.jivox.com/unit/unit_renderer.php?creativeUnitType=20&bDim=600x500&bUnitId=2000&siteId=83ffe27b1cfb465&campaignId=17755&es_pId=3b829ec&isDyn amic=1&ap_DataSignal1=${AGE}&ap_DataSignal2=${CP_ID}&jvxVer=2\"> </script>" ], "previous": "", "next": "" }

List Media Plans

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/media-plans/

Sample Response

{ "mediaPlans": [ { "mediaPlanName": "created via api", "mediaPlanId": 258 }, { "mediaPlanName": "created via api-csv", "mediaPlanId": 259 }, { "mediaPlanName": "mediaplan-api", "mediaPlanId": 260 }, . . . ], "previous": "", "next": "" }

Generate Tags

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/1234/media-plans/241/tags/

Request Body

{ "campaignId":"17753", "mediaPlanId":"294", "adUnitId":"2000", "adServerId":"AppNexus", "dataSignalMap":[{"dataSignalName": "dataSignal1", "macroName": "User Age"}, {"dataSignalName": "dataSignal2", "macroName": "Campaign ID"} ] }

Sample Response

{ "tagId": "15", "msg": "Tags generated successfully" }

Get Trackers

To get list of trackers for the selected campaignId.

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account

campaignId

string

Mandatory

path

ID of the campaign created under a given user account on the platform.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/trackers/:campaignId

Sample Response

{ mediaPlanId integer mediaPlanName string sites [{ siteId string siteName string placements [{ placementId string placementName string primaryClickTracker [string] bannerImpressionTrackers [string] }] }] }

Update Trackers

To update trackers for the selected campaignId. PUT call replaces all trackers, while PATCH call appends trackers (ignoring duplicates).

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account

campaignId

string

Mandatory

path

ID of the campaign created under a given user account on the platform.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/trackers/:campaignId
PATCH http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/trackers/:campaignId

Request Body

{ mediaPlanDetails [{ siteName string placementName string primaryClickTracker string secondaryClickTracker1 string secondaryClickTracker2 string }] mediaPlanUrl string type string }

Sample Response

{ siteUpdatedCount integer siteAppendedCount integer placementUpdatedCount integer placementAppendedCount integer trackerAppendedCount integer updatedCampaignId boolean updatedMediaPlanName boolean }

Create Media Plan

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans

Request Body Type 1

{ "mediaPlanName": "testmediaplan", "mediaPlanUrl":"www.jivox.com", "type": "url", }

Request Body Type 2

{ "mediaPlanName": "testmediaplan", "type": "inline", "mediaPlanDetails": [ { "siteName": "www.jivox.com", "placementName": "Placement1", “externalSiteId”: “Site ID”, “externalPlacementId”: “Placement ID” } ] }
Info

The “ externalSiteId ” and “externalPlacementId” fields are optional parameters.

Sample Response

{ "mediaPlanId": 121, "msg": "Media Plan created successfully" }

Update Media Plan

Parameters

Name

Data Type

Requirement

Parameter Type

Description

groupId

string

Mandatory

path

ID of the media plan created under a given user account.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId

Request Body Type 1

{ "mediaPlanName": "testmediaplan", "mediaPlanUrl":"www.jivox.com", "type": "url", }

Request Body Type 2

{ "mediaPlanName": "testmediaplan", "type": "inline", "mediaPlanDetails": [ { "siteName": "www.jivox.com", "placementName": "Placement1", “externalSiteId”: “Site ID”, “externalPlacementId”: “Placement ID” } ] }
Info

The “ externalSiteId ” and “externalPlacementId” fields are optional parameters.

Sample Response

{ "siteUpdatedCount": 0, "siteAppendedCount": 0, "placementUpdatedCount": 0, "placementAppendedCount": 0, "trackerAppendedCount": 0, "updatedCampaignId": true, "updatedMediaPlanName": true }

Get All Tags

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/media-plans/:mediaPlanId/tags/ALL
Info

This api will return all tags that have been generated for this mediaPlan.

Sample Response

{ "tags": [ "<script type=\"text/javascript\ " src=\"https://as.jivox.com/unit/unit_renderer.php?creativeUnitType=22&bDim=300x600&bUnitId=2200&siteId=5feddaf019e1449&campaignId=9439&es_pId=2a8270f&isDynamic=1&ap_DataSignal1=${CP_ID}&ap_DataSignal2=${CP_CODE}&jvxVer=2\"> </script>", . . . ], "previous": "", "next": "" }

Get Latest Tag

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/mediaplans/241/tags/LATEST/
Info

This API will return the latest tag that has been generated for every combination of site & placement in this mediaPlan.

Sample Response

{ "tags": [ "<script type=\"text/javascript\" src=\"https://as.jivox.com/unit/unit_renderer.php?creativeUnitType=22&bDim=300x600&bUnitId=2200&siteId=5feddaf019e1449&campaignId=9439&es_pId=2a8270f&isDynamic=1&ap_DataSignal1=${CP_ID}&ap_DataSignal2=${CP_CODE}&jvxVer=2\"> </script>" ], "previous": "", "next": "" }

Get List of Campaigns for a Media Plan

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/media-plans/241/trackers

Sample Response

[ "113087", "113087", "113087", "113087", "113087", "113087", "d02hndkd", . . . ]

Get Media Plan Details

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

mediaPlanId

string

Mandatory

path

ID of the media plan associated with a given user account.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/media-plans/241

Sample Response

{ "mediaPlanId": 294, "mediaPlanName": "duplicate-testing=2", "sites": [ { "siteId": 1465, "siteName": "site1", "placements": [ { "placementName": "placement1", "secondaryClickTrackers": [ "http://ad.atdmt.com/e/img?p=11147200794734&a=11147200794918;ev.t=v1_075;21", . . . ], "primaryClickTracker": [ "http://ad.atdmt.com/c/go;p=11147200794734&a=11147200794918;ev=11147200794910; 15" ], "bannerImpressionTrackers": [ "http://ad.atdmt.com/e/img?p=11147200794734&a=11147200794918;ev.t=v1_000;18", . . . ], "placementId": "3b829ec" . . . }