Map Segments to a Destination map-segments-to-a-destination
Map segments to destinations with these RESTful API methods.
Supported Destination Types: URL and Cookie Only
The available POST
methods let you map segments to URL and cookie destinations only. Currently, you cannot map segments to server-to-server destinations with these REST API methods. Use the user interface instead. However, the related destination GET
methods let you retrieve information about server-to-server destinations created in the user interface.
Map a Segment to a Non-Serialized URL Destination map-segment-non-serial
A POST
method that lets you map a segment to a non-serial URL destination.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/mappings/
Sample Request
All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"url":"https://adobe.com",
"startDate":"2012-07-04"
}
Response
{
"mappingId":65334,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":4033,
"elementName":"Sample games",
"elementDescription":"Sample games pixel",
"elementStatus":"active",
"createTime":1338940094000,
"updateTime":1338940094000,
"crUID":694,
"upUID":694,
"sid":87723,
"startDate":"2012-07-03",
"endDate":null,
"priority":null,
"url":"https://adobe.com",
"secureUrl":null,
"tagCode":null,
"secureTagCode":null,
"traitAlias":null
}
Map a Segment to a Serialized URL Destination map-segment-serial
A POST
method that lets you map a segment to a serialized URL destination.
Request
POST https://api.demdex.com/v1/destinations/
<dataOrderId>
/traits/
Sample Request
In the request, the traitAlias
corresponds to the key in a key-value pair. All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"startDate":"2012-07-04",
"traitAlias":"123"
}
Response
{
"mappingId":65335,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":4034,
"elementName":"Sample Games",
"elementDescription":"Migration of Sample Games Pixel",
"elementStatus":"active",
"createTime":1338940401000,
"updateTime":1338940401000,
"crUID":694,
"upUID":694,
"sid":87723,
"startDate":"2012-07-03",
"endDate":null,
"priority":null,
"url":"123",
"secureUrl":"123",
"tagCode":null,
"secureTagCode":null,
"traitAlias":"123"
}
Map a Segment to a Cookie Destination: Single-Key, Non-Serialized map-segment-cookie-noserial
A POST
method that lets you map a segment to single-key, non-serialized cookie destination.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/mappings/
Sample Request
In the request, the valueAlias
corresponds to the value in a key-value pair. All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"startDate":"2012-07-04",
"valueAlias":"123"
}
Response
{
"destinationMappingId":65336,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":4035,
"elementName":"Sample Games",
"elementDescription":"Migration of Sample Games Pixel",
"elementStatus":"active",
"createTime":1338940704000,
"updateTime":1338940704000,
"crUID":694,
"upUID":694,
"sid":87723,
"startDate":"2012-07-03",
"endDate":null,
"priority":1,
"traitAlias":null,
"valueAlias":"123"
}
Map a Segment to a Cookie Destination: Multi-Key, Non-Serialized map-segment-cookie-multi-noserial
A POST
method that lets you map a segment to multi-key, non-serialized cookie destination.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/mappings/
Sample Request
In the request, the traitAlias
and valueAlias
set the key and the value respectively in a key-value pair. All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"startDate":"2012-07-04",
"traitAlias":"type",
"valueAlias":"123"
}
Response
{
"mappingId":65338,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":4037,
"elementName":"Sample Games",
"elementDescription":"Migration of Sample Games Pixel",
"elementStatus":"active",
"createTime":1338941092000,
"updateTime":1338941092000,
"crUID":694,
"upUID":694,
"sid":87723,
"startDate":"2012-07-03",
"endDate":null,
"priority":1,
"traitAlias":"type",
"valueAlias":"123"
}
Map a Segment to a Cookie Destination: Multi-Key, Serialized map-segment-cookie-multi-serial
A POST
method that lets you map a segment to a multi-key, serialized cookie destination.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/mappings/
Sample Request
In the request, the traitAlias
and valueAlias
set the key and the value in a key-value pair. All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"startDate":"2012-07-04",
"traitAlias":"type",
"valueAlias":"123"
}
Response
{
"destinationMappingId":65340,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":4038,
"elementName":"Sample Games",
"elementDescription":"Migration of Sample Games Pixel",
"elementStatus":"active",
"createTime":1338941273000,
"updateTime":1338941273000,
"crUID":694,
"upUID":694,
"sid":87723,
"startDate":"2012-07-03",
"endDate":null,
"priority":2,
"traitAlias":"type",
"valueAlias":"123"
}
Map a Segment to a Server-to-Server Destination map-segment-s2s
A POST
method that lets you map a segment to an existing server-to-server destination. Note, however, that you cannot create server-to-server destinations with these currently available API methods.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/mappings/
Sample Request
In the request, the traitAlias
corresponds to the key in a key-value pair. All request values are required unless otherwise indicated.
{
"sid":87723,
"traitType":"SEGMENT",
"startDate":"2012-07-04",
"traitAlias":"123"
}
Response
{
"destinationMappingId":65341,
"traitType":"SEGMENT",
"traitValue":0,
"destinationId":566,
"elementName":"Sample",
"elementDescription":"",
"elementStatus":"active",
"createTime":1338942118000,
"updateTime":1338942118000,
"crUID":308,
"upUID":308,
"sid":84326,
"startDate":"2012-07-03",
"endDate":null,
"priority":null,
"traitAlias":"123"
}
Bulk Create Destination Mappings bulk-create
A POST
method that lets you pass in an array of cookie or URL destination mappings.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
/bulk-create
Sample Request
All request values are required unless otherwise indicated.
[
{
"sid": 105123,
"traitType":"SEGMENT",
"url":"https://adobe.com",
"startDate":"2012-11-20"
},
{
"sid": 121070,
"traitType":"SEGMENT",
"url":"https://my.adobeconnect.com",
"startDate":"2012-11-21"
}
]
Response
A successful response returns the array of created mappings.
[
{
"mappingId": 103454,
"traitType": "SEGMENT",
"traitValue": 0,
"destinationId": 780,
"elementName": "Case of the Mondays",
"elementDescription": "test",
"elementStatus": "active",
"createTime": 1353373234000,
"updateTime": 1353373234000,
"crUID": 1065,
"upUID": 1065,
"sid": 105123,
"startDate": "2012-11-19",
"endDate": null,
"priority": null,
"url": "https://adobe.com",
"secureUrl": null,
"tagCode": null,
"secureTagCode": null,
"traitAlias": null
},
{
"mappingId": 103455,
"traitType": "SEGMENT",
"traitValue": 0,
"orderId": 780,
"elementName": "Test Trait",
"elementDescription": "This trait",
"elementStatus": 1,
"createTime": 1353373234000,
"updateTime": 1353373234000,
"crUID": 1065,
"upUID": 1065,
"sid": 121070,
"startDate": "2012-11-20",
"endDate": null,
"priority": null,
"url": "https://my.adobeconnect.com",
"secureUrl": null,
"tagCode": null,
"secureTagCode": null,
"traitAlias": null
}
]
Add Multiple Segments to a Destination add-segments-dest
A POST
method that lets you map multiple segments to a destination.
Request
POST https://api.demdex.com/v1/destinations/
<destinationId>
bulk-create
Sample Request
Create multiple destination mappings in an array. All request values are required unless otherwise indicated.
[
{
"sid": 105123,
"traitType":"SEGMENT",
"url":"https://adobe.com",
"startDate":"2012-11-20"
},
{
"sid": 121070,
"traitType":"SEGMENT",
"url":"https://my.adobeconnect.com",
"startDate":"2012-11-21"
}
]
Response
Returns an array of created mappings.
[
{
"destinationMappingId": 103454,
"traitType": "SEGMENT",
"traitValue": 0,
"destinationId": 780,
"elementName": "Case of the Mondays",
"elementDescription": "test",
"elementStatus": "active",
"createTime": 1353373234000,
"updateTime": 1353373234000,
"crUID": 1065,
"upUID": 1065,
"sid": 105123,
"startDate": "2012-11-19",
"endDate": null,
"priority": null,
"url": "https://adobe.com",
"secureUrl": null,
"tagCode": null,
"secureTagCode": null,
"traitAlias": null
},
{
"traitToDataOrderId": 103455,
"traitType": "SEGMENT",
"traitValue": 0,
"destinationId": 780,
"elementName": "Test Trait",
"elementDescription": "This trait",
"elementStatus": 1,
"createTime": 1353373234000,
"updateTime": 1353373234000,
"crUID": 1065,
"upUID": 1065,
"sid": 121070,
"startDate": "2012-11-20",
"endDate": null,
"priority": null,
"url": "https://my.adobeconnect.com",
"secureUrl": null,
"tagCode": null,
"secureTagCode": null,
"traitAlias": null
}
]
Update a Destination by Destination ID update-dest-data-order
A PUT
method that lets you update an existing destination by destinationId
.
Request
PUT https://api.demdex.com/v1/destinations/
<destinationId>
Sample Request
All request values are required unless otherwise indicated.
{
"name":"Updated URL Destination (not serialized)",
"description":"new description",
"destinationType":"PUSH",
"serializationEnabled":false
}
Response
{
"destinationType": "PUSH",
"destinationId": 780,
"dataSourceId": null,
"pid": 1099,
"name": "Updated URL Destination (not serialized)",
"description": "new description",
"startDate": null,
"endDate": null,
"status": 1,
"createTime": 1348851790000,
"updateTime": 1353372029000,
"crUID": 884,
"upUID": 1065,
"domainRestrictions":"all_domains",
"tagType": 0,
"serializationEnabled": false,
"urlFormatString": null,
"secureUrlFormatString": null,
"delimiter": null,
"mappings": null
}
Update a Mapping to a Destination by Mapping ID update-mapping-dest-id
A PUT
method that lets you update a mapping to a destination by the specified mappingId
.
Request
PUT https://api.demdex.com/v1/destinations/mappings/
<mappingId>
Sample Request
All request values are required unless otherwise indicated.
{
"sid": 105123,
"traitType":"SEGMENT",
"url":"https://adobe.com",
"startDate":"2012-11-20"
}
Response
{
"mappingId": 103453,
"traitType": "SEGMENT",
"traitValue": 0,
"destinationId": 780,
"elementName": "sample",
"elementDescription": "test",
"elementStatus": "active",
"createTime": 1353373005000,
"updateTime": 1353373005000,
"crUID": 1065,
"upUID": 1065,
"sid": 105123,
"startDate": "2012-11-19",
"endDate": null,
"priority": null,
"url": "https://www.adobe.com/send?%ALIAS%",
"secureUrl": null,
"tagCode": null,
"secureTagCode": null,
"traitAlias": null
}