Member data sharing service (audience only)
Member data sharing service (For audience data providers only)
Tip
In order to make the Member Data Sharing documentation clearer, we've created this page which has calls relevant only to audience data providers (those that do not have a bidder/real-time integration).
The Member Data Sharing Service allows you to share your segments with other platform members. Here's how it works:
- You ask the buyer to enable you (the data provider) in Invest DSP. The setting they must use to do this is located in the Invest DSP Segment Manager, under Manage Data Providers.
- You create a sharing record for a member that you want to share segments with.
- In the sharing record, you specify whether you want to share all of your segments or a specific list of segments.
- The member that you've shared your segments with can then target your segments in campaigns (or in the case of bidders, they will be sent the segment data with each bid request).
Note that when you remove a segment from a sharing record, the member cannot add the segment to the targeting profile of any new or existing campaign. If the member is already targeting the segment in an existing campaign, however, the campaign will continue to target the segment until the member manually removes it from the campaign's targeting profile. Once the segment has been removed, the member will not be able to add it to the campaign's targeting profile again.
Tip
If you have custom segments intended for specific members, you should set segment_exposure
to "list" in each sharing record and use the segments
array to identify the segments that each member should have access to.
Note
The Member Data Sharing service works on BOTH Xandr's API (api.appnexus.com) as well as the impression bus API (api.adnxs.com). Although only api.adnxs.com is used below, it may be replaced with api.appnexus.com for those clients who have access to Xandr's API. Only members who are on Xandr will have access to the API. The majority of data providers can only access the impression bus API.
REST API
Tip
JSON Structure:
When adding or updating a single sharing record, you should structure the JSON as a single object called "member_data_sharing". When adding (POST) multiple sharing records, you should structure the JSON as an array of objects called "member_data_sharings" (note the plural) and place the sharing data in an array. You cannot update (PUT) multiple sharing records at the same time. For exact formatting, see the examples below.
JSON Fields
Field | Type (Length) | Description |
---|---|---|
buyer_member_id | int | The ID of the member with whom you are sharing segments. Required On: POST |
data_member_id | int | Read-only. Your member ID. |
id | int | The ID of the sharing record. Default: Auto-generated number Required On: PUT/DELETE, in query string |
segment_exposure | enum | Whether you share all of your segments or a list of specific segments with the member. Possible values: "all" or "list". If you choose "all", any newly created segments will automatically be shared with the buyer member. If you create custom segments that should only be accessible to certain buyers, you should use "list" exposure. Required On: POST |
segments | array of objects | If segment_exposure is "list", the list of segments that you are sharing with the member. See the first example below for formatting. Required On: POST/PUT, if segment_exposure is "list". |
Examples
Share segments with members 103 and 104
$ cat data_share_multiple
{
"member_data_sharings": [
{
"buyer_member_id": 103,
"segment_exposure": "all"
},
{
"buyer_member_id": 104,
"segment_exposure": "list",
"segments": [
{
"id": 121175
},
{
"id": 121176
},
{
"id": 121177
},
{
"id": 121178
}
]
}
]
}
$ curl -b cookies -c cookies -X POST -d @data_share_multiple 'https://api.adnxs.com/member-data-sharing'
{
"response": {
"status": "OK",
"count": 2,
"start_element": null,
"num_elements": null,
"id": [
54,
55
],
"member_data_sharings": {
"54": {
"id": 54,
"data_member_id": 1432,
"buyer_member_id": 103,
"segment_exposure": "all",
"segments": null
},
"55": {
"id": 55,
"data_member_id": 1432,
"buyer_member_id": 104,
"segment_exposure": "list",
"segments": [
{
"id": 121175,
"name": "Segment share 1"
},
{
"id": 121176,
"name": "Segment share 2"
},
{
"id": 121177,
"name": "Segment share 3"
},
{
"id": 121178,
"name": "Segment share 4"
}
]
}
},
"dbg": {
...
}
}
}
Share segments with member 105
$ cat data_share_single
{
"member_data_sharing": {
"buyer_member_id": 105,
"segment_exposure": "all"
}
}
$ curl -b cookies -c cookies -X POST -d @data_share_single 'https://api.adnxs.com/member-data-sharing'
{
"response": {
"status": "OK",
"count": 1,
"start_element": null,
"num_elements": null,
"id": "56",
"member_data_sharing": {
"id": 56,
"data_member_id": 1432,
"buyer_member_id": 105,
"segment_exposure": "all",
"segments": null
},
"dbg": {
...
}
}
}
Update the sharing record for member 104
Note
In this example, the PUT request replaces the existing data in sharing record 55 (the sharing record for member 104) - with segment 121179.
$ cat data_share_update
{
"member_data_sharing": {
"segments": [
{
"id": 121175
},
{
"id": 121176
},
{
"id": 121177
},
{
"id": 121178
},
{
"id": 121179
}
]
}
}
$ curl -b cookies -c cookies -X PUT -d @data_share_update 'https://api.adnxs.com/member-data-sharing/55'
{
"response": {
"status": "OK",
"count": 1,
"start_element": null,
"num_elements": null,
"id": 55,
"member_data_sharing": {
"id": 55,
"data_member_id": 1432,
"buyer_member_id": 104,
"segment_exposure": "list",
"segments": [
{
"id": 121175,
"name": "test for sharing"
},
{
"id": 121176,
"name": "test for sharing2"
},
{
"id": 121177,
"name": "test for sharing3"
},
{
"id": 121178,
"name": "test for sharing4"
},
{
"id": 121179,
"name": "test for sharing4"
}
]
},
"dbg": {
...
}
}
}
View all of your sharing records
$ curl -b cookies -c cookies 'https://api.adnxs.com/member-data-sharing'
{
"response": {
"status": "OK",
"count": 5,
"start_element": null,
"num_elements": null,
"member_data_sharings": [
{
"id": 46,
"data_member_id": 1432,
"buyer_member_id": 100,
"segment_exposure": "all",
"segments": null
},
{
"id": 52,
"data_member_id": 1432,
"buyer_member_id": 101,
"segment_exposure": "all",
"segments": null
},
{
"id": 53,
"data_member_id": 1432,
"buyer_member_id": 102,
"segment_exposure": "all",
"segments": null
},
{
"id": 54,
"data_member_id": 1432,
"buyer_member_id": 103,
"segment_exposure": "all",
"segments": null
},
{
"id": 55,
"data_member_id": 1432,
"buyer_member_id": 104,
"segment_exposure": "list",
"segments": [
{
"id": 121175,
"name": "Segment share 1"
},
{
"id": 121176,
"name": "Segment share 2"
},
{
"id": 121177,
"name": "Segment share 3"
},
{
"id": 121178,
"name": "Segment share 4"
},
{
"id": 121179,
"name": "Segment share 5"
}
]
},
{
"id": 56,
"data_member_id": 1432,
"buyer_member_id": 105,
"segment_exposure": "all",
"segments": null
}
],
"dbg": {
...
}
}
}
View sharing record 55
$ curl -b cookies -c cookies 'https://api.adnxs.com/member-data-sharing/55'
{
"response": {
"status": "OK",
"count": 1,
"start_element": null,
"num_elements": null,
"member_data_sharing": {
"id": 55,
"data_member_id": 1432,
"buyer_member_id": 104,
"segment_exposure": "list",
"segments": [
{
"id": 121175,
"name": "Segment share 1"
},
{
"id": 121176,
"name": "Segment share 2"
},
{
"id": 121177,
"name": "Segment share 3"
},
{
"id": 121178,
"name": "Segment share 4"
},
{
"id": 121179,
"name": "Segment share 5"
}
]
},
"dbg": {
...
}
}
}