Campaign Setup

How to do a Campaign Setup

Davinci Commerce Programmable Personalization API supports dynamic campaigns that would make use of the ads created using the Ad APIs and would allow users to define different rules (using Decision Map, Decision Graphs) to define audience segments as per marketing strategy. Creative variations for every audience set can then be defined to be dynamically generated, based on the assets uploaded into the platform’s Content Management System.

Methods

Method Name

Method Type

Description

Create Campaign

POST

Creates a campaign with provided asset map, decision map and decision graph details for a particular account

List Campaigns

GET

Returns a list of campaigns under a particular account

List Data Signals

GET

Returns a list of data signals for a particular account.

Delete Campaign

DELETE

Deletes a campaign under a particular account

List Asset Sources

GET

Returns a list of asset sources under a particular account

Get Asset Sources Detail

GET

Returns details of asset sources under a particular account

Get Asset Sources Data

GET

Returns data for a given asset source under a particular account

Get Campaign Data

GET

Returns data for a given campaign under a particular account

Get Asset Source Label

GET

Returns labels for a given asset source.

Create Asset Source Labels

POST

Creates a label for a given asset source

Delete Asset Source Labels

DELETE

Deletes a label for a given asset source

Create Feed Asset Source- /feed/process Create Feed Asset Source- /feed

POST

Creates an asset source from feed for the given user account

Create Asset Source from Adobe After Effects Assets

POST

Creates an asset source from Adobe After Effects assets for the given user account.

Create Inline Asset Source

POST

Creates an inline asset source for the given user account

Create Recommendation Asset Source

POST

Creates a recommendation asset source for the given user account

Create Remote Asset Source

POST

Creates a remote asset source for the given user account

Update Feed Asset Source

PUT

Updates an asset source from feed for the given user account.

Update Asset Source from Adobe After Effects Assets

PUT

Updates an asset source from Adobe After Effects assets for the given user account.

Update Inline Asset Source

PUT

Updates an inline asset source for the given user account.

Update Recommendation Asset Source

PUT

Updates a recommendation asset source for the given user account.

Update Remote Asset Source

PUT

Updates a remote asset source for the given user account.

Create Campaign

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/1234/campaigns/

Request Body

{
"assetMap": [
{
"assetId": "asset101.lib_bg_trusted_care",
"assetSourceId": "2014708",
"assetSourceColumn": "Image"
},
. . .
],
"decisionMap": [
{
"assetSourceId": "2014708",
"dataSignalService": "DSP Data Signal",
"dataSignalProperty": "DataSignal1"
},
. . .
],
"decisionGraph": {
"defaultCreativeMaster": "fri",
"rulePriority": "EQUAL_ROTATION",
"segments": [
{
"name": "rule1",
"creativeMasters": [
"sat"
],
"condition": {
"operator": "and",

Sample Response

{
"campaignId": "124590",
"msg": "Campaign created successfully"
}

List Campaigns

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/campaigns/

Sample Response

{
"campaigns": [
{
"lastUpdate": "2018-03-24 12:51:50.0",
"defaultURL": "http://givox.com",
"campaignName": "Ad to create campaign via api-1",
"creationDate": "2018-02-23 12:52:09.0",
"campaignId": 17610
},
{
"lastUpdate": "2018-02-27 05:19:30.0",
"defaultURL": "http://givox.com",
"campaignName": "Image and text",
"creationDate": "2018-02-27 05:19:30.0",
"campaignId": 17611
}
. . .
],
"previous": "",
"next": ""
}

List Data Signals

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/data-signals

Sample Response

{
"dataSignals": [
{
"dataSignalId": 1,
"dataSignalName": "Geography",
"dataSignalProperties": [
{
"propertyId": "city",
"propertyName": "City",
"operators": [
"EQUALS",
"IN"
]
},
{
"propertyId": "state",
"propertyName": "State",
"operators": [
"EQUALS",
"IN"
]
},
. . .
],
"previous": "",

Delete Campaign

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

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/1234/campaigns/124590

Sample Response

HTTP status code as 200 OK with no response body is returned.

List Asset Sources

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/asset-sources/

Sample Response

{
"assetSources": [
{
"assetSourceId": 2014708,
"assetSourceName": "browser-db-defau"
},
],
. . .
"previous": "",
"next": ""
}

Get Asset Sources Detail

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/asset-sources/2014252

Sample Response

{
"assetKeyColumn": "Key",
"rotationWeightColumn": null,
"assetGroupColumn": null,
"assetVariantColumn": "Asset",
"assetSourceColumns": [
"Key",
"File URL",
"Text",
"Asset"
],
"assetSourceId": "2014710",
"reportingColumn": null,
"assetSourceType": "uploaded",
"assetSourceName": "noprotocol"
}

Get Asset Sources Data

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

GEThttp://demo.stub.api.jivox.com/v2/accounts/1234/asset-sources/2014252/data

Sample Response

{
"assetKeyColumn": "Key",
"rotationWeightColumn": null,
"assetGroupColumn": null,
"assetVariantColumn": "Asset",
"assetSourceColumns": [
"Key",
"File URL",
"Text",
"Asset"
],
"assetSourceId": "2014710",
"data": [
{
"File URL": "//jivoxdevuploads.s3.amazonaws.com/qaslate/files/2309/protocol/cr1.png",
"Asset": "One",
"Text": "Image 1",
"Key": "1"
},
"prev": "",
"reportingColumn": null,
"assetSourceType": "uploaded",
"next": "",
"assetSourceName": "noprotocol"
}

Get Campaign Data

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

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/1234/campaigns/113087

Sample Response

{
"lastUpdate": "2018-04-19 10:51:38.0",
"assetMap": [
{
"assetId": "asset101.lib_bg_trusted_care",
"assetSourceId": 2014708,
"assetSourceColumn": "image"
}
],
"decisionMap": [
{
"assetSourceId": "2014708",
"dataSignalService": "tagVarService",
"dataSignalProperty": "DataSignal1"
},
. . .
],
"decisionGraph": {
"defaultCreativeMaster": null,
"rulePriority": null,
"segments": []
},
"defaultURL": "http://kleenex.com",
"campaignName": "Ad to create campaign via api-1",
"creationDate": "2018-02-27 22:37:49.0",

Get Asset Source Label

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

objId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/1234/asset-sources/2014252/labels

Sample Response

{
"labels": [
"label15",
"label16",
. . .
],
"previous": "",
"next": ""
}

Create Asset Source Labels

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

objId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/791/asset-sources/13/labels/

Request Body

{
"label": "newlabel2"
}

Sample Response

{
"msg": "Label created successfully."
}

Delete Asset Source Labels

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

objId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

DELETE http://demo.stub.api.jivox.com/v2/accounts/791/asset-sources/13/labels/

Request Body

{
"label": "newlabel2"
}

Sample Response

HTTP status code as 200 OK with no response body is returned.

Feed Asset Source

Feed asset sources are created in two steps.

Step1 - /feed/process has to be called first. It generates and returns the metadata which is required for creating the feed asset source.

Step 2 -/feed will expect metadata generated by the first endpoint to create the actual asset source.

Create Feed Asset Source - /feed/process

To create a feed-based asset source

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/asset-sources/feed/process

Request Body

{
url string
urlConfig {
description:
See request model for feed POST.

}
customCode string
firstRowIsHeader boolean
urlType string
Enum:
[ https, http, s3, ftp, sftp ]
characterEncoding string
Enum:
[ UTF_8, iso_8859_1, CP1252, utf_16le ]
csvSeparator string
Enum:
[ comma, tab, pipe, auto ]
contentType string
Enum:
[ xml, json, csv ]
cdp boolean
fileId string
}

Sample Response

{
config {
rootIsObject boolean
rowXPath string
xpathMap {
}
csvColumns {
}
memPerRow integer
estRowsPerChunk integer
oneRowPerObject boolean
rootIsArray boolean
cdp boolean
fileId string
cdpXpathMap {
}
}
sample {
description:
Sample feed data in the format:

(col1 -> [val1, val2, val3],
col2 -> [val4, val5, val6])
}
cdpLogs [string]
}

Create Feed Asset Source - /feed

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/asset-sources/feed

Request Body

{
url string
urlConfig {
oneOf ->
{
description:
For urlType http/https

additionalParams string
httpMethod string
Enum:
[ GET, POST ]
username string
password string
}
{
description:
For urlType ftp

username string
password string
}
{
description:
For urlType s3

accessKey string
secretKey string
}
{
description:
For urlType sftp

portNumber integer
privateKey string
username string
password string
}
}
customCode string
firstRowIsHeader boolean
urlType string
Enum:
[ https, http, s3, ftp, sftp ]

Sample Response

{
id string
msg string
}

AssetSource Creation API

Feed creation API

Feed Asset Source

Create Feed Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

Sample Request

POST https://jivox-apis.api.jivox.com/v2/accounts/{account-id}/asset-sources/feed/create

Request Body

{
"url": "", //String
"urlType": "s3", // Enum: [ https, http, s3, ftp, sftp ]
"urlConfig": {
"accessKey": "xxxxxx",
"secretKey": "xxxxxx"
},
"contentType": "csv", // Enum:[ xml, json, csv ]
"characterEncoding": "UTF_8", // Enum:[ UTF_8, iso_8859_1, CP1252, utf_16le ]
"firstRowIsHeader": true, // boolean
"csvSeparator": "comma", // Enum: [comma, tab, pipe, auto]
"assetKeyColumn": "asset_key",
"assetVariantColumn": "asset_variant",
"assetGroupColumn": "asset_group",
"reportingColumn": "reporting_id",
"rotationWeightColumn": "rotation_weight",
"assetSourceName": "ProductFeed_Main2_SAPI_8",
"startTime": "03:55", // EDT time- Better to add next minute to process it atleast once immediately
"endDate": "2026-12-31", // Must be of format yyyy-mm-dd

Sample Response

{
"id": "100007149",
"msg": "AssetSource created successfully. Feed processing has been queued.",
"queueId": "31b097b05d5c4a26b6b00339392eb72f"
}

Create Asset Source from Adobe After Effects Assets

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

destAssetSourceId

string

Mandatory

path

ID of the destination asset source. It updates details for the asset-source referenced by destAssetSourceId

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/asset-sources/:destAssetSourceId/after-effects

Request Body

{
campaignId string
destinationAssetSourceName string
assetSourceMap [{
assetId string
assetSourceColumn string
}]
}

Sample Response

{
destinationAssetSourceId string
}

Create Inline Asset Source

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/asset-sources/inline

Request Body

{
assetVariantColumn string
assetSourceName string
reportingColumn string
rotationWeightColumn string
assetKeyColumn string
assetGroupColumn string
columnNames [string]
contentType string
data [{
}]
}

Sample Response

{
id string
msg string
}

Create Recommendation Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

sourceAssetSourceId

string

Mandatory

path

ID of the source asset source. It updates details for the asset-source referenced by sourceAssetSourceId

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/asset-sources/:sourceAssetSourceId/recommendation

Request Body

{
updateFrequency integer
recommendationConfig {
type string
Enum:
[ content, collaborative, hybrid ]
maxRecommendations integer
cookieGroup string

Applicable only for type collaborative or hybrid

recommendationMap [
Applicable only for type content or hybrid

{
assetSourceColumn string
dataType string
Enum:
[ string, numeric ]
priority integer

An integer between 1 and 10. Applicable only for dataType string

acceptedRange integer

Applicable only for dataType numeric

}]
}
}

Sample Response

{
id string
msg string
}

Create Remote Asset Source

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/asset-sources/remote

Request Body

{
url string
additionalParams string
assetVariantColumn string
assetSourceName string
httpMethod string
reportingColumn string
rotationWeightColumn string
assetKeyColumn string
cacheTime integer
assetGroupColumn string
columnNames [string]
contentType string
}

Sample Response

{
id string
msg string
}

Update Feed Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

PUT https://jivox-apis.api.jivox.com/v2/accounts/:accountId/asset-sources/feed/:assetSourceId

Request Body

{
"contentType": "csv", // Enum:[ xml, json, csv ]
"characterEncoding": "UTF_8", // Enum:[ UTF_8, iso_8859_1, CP1252, utf_16le ]
"firstRowIsHeader": true, // boolean
"csvSeparator": "comma", //Enum: [comma, tab, pipe, auto]
"assetVariantColumn": "sku",
"reportingColumn": "sku",
"rotationWeightColumn": "sku",
"assetSourceName": "Product Catalog Feed",
"startTime": "07:46", // EDT time- Better to add next minute to process it atleast once immediately
"endDate": "2027-04-31", // Must be of format yyyy-mm-dd
"isScheduled": false, // Boolean
"frequency": "DAILY", // String
"customCode": "", // Shouldn't be empty in CDP true case
"cdp": false, // Boolean
"feedConfig": {
"csvColumns": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],

Sample Response

{
msg string
id string
queueId string (optional)
}

Update Inline Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/asset-sources/inline/:assetSourceId

Request Body

{
assetVariantColumn string
assetSourceName string
reportingColumn string
rotationWeightColumn string
assetKeyColumn string
assetGroupColumn string
columnNames [string]
contentType string
data [{
}]
}

Sample Response

{
msg string
id string
}

Update Recommendation Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

sourceAssetSourceId

string

Mandatory


ID of the source asset source. It updates details for the asset-source referenced by *sourceAssetSourceId *

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/asset-sources/:sourceAssetSourceId/recommendation/:assetSourceId

Request Body

{
updateFrequency integer
recommendationConfig {
type string
Enum:
[ content, collaborative, hybrid ]
maxRecommendations integer
cookieGroup string

Applicable only for type collaborative or hybrid

recommendationMap [
Applicable only for type content or hybrid

{
assetSourceColumn string
dataType string
Enum:
[ string, numeric ]
priority integer

An integer between 1 and 10. Applicable only for dataType string

acceptedRange integer

Applicable only for dataType numeric

}]
}
}

Sample Response

{
id string
msg string
}

Update Remote Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

assetSourceId

string

Mandatory

path

ID of the asset source under a given user account on the platform.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/asset-sources/remote/:assetSourceId

Request Body

{
url string
additionalParams string
assetVariantColumn string
assetSourceName string
httpMethod string
reportingColumn string
rotationWeightColumn string
assetKeyColumn string
cacheTime integer
assetGroupColumn string
columnNames [string]
contentType string
}

Sample Response

{
id string
msg string
}

Update Asset Source from Adobe After Effects Assets

Update Asset Source from Adobe After Effects Assets