Data Partnership API¶
Overview¶
The Data Partnership API provides a curator-facing workspace where users can configure essential deal metadata, including deal IDs, campaign timeframe, cost type (CPM or percentage of media), cost value, and currency.
To integrate with Data Partnership API, use the following steps.
Get your API Access Token, which will be passed in the request header. If you do not have an API token or user account, use the steps outlined in the API Authorization section. If you have Read Only permissions you may only user
GETqueries. Request an API Account to access all API methods.Retrieve or update deal details from Data Partnership API.
Creating Deals¶
To create a new deal, POST the details to Data Partnership API.
<!-- POST to this endpoint where the <id> is your data partner ID -->
/api/v1/data_partners/<id>/deals/
Request Body Example¶
{
"deal_id": "dp_deal_partner_a_premium_2026",
"fee_type": "cpm",
"fee_amount": "2.50",
"currency": "USD",
"dsp": 101,
"ssp": "ssp_a",
"geo": ["US", "GB", "CA/ON"],
"device_type": ["Phone", "Tablet", "PC"],
"content_type": ["display", "video"],
"domain": {
"type": "allow",
"values": ["example.com", "premium-site.com", "news-outlet.com"]
},
"bundle": {
"type": "block",
"values": ["com.example.app", "com.premium.app"]
},
"inventory_type": ["web", "in_app"],
"iab_category": ["IAB1", "IAB1/IAB1-1", "IAB12"],
"livestream": false,
"start_date": "2026-06-01",
"end_date": "2026-06-02",
"custom_fields": {}
}
Note
For unconstrained geo, iab_category, domain, or bundle, please use null. Empty lists for geo and iab_category are rejected.
The API will respond with 201 Created.
Getting Deals List¶
To see the list of existing deals, GET the following endpoint:
<!-- GET this endpoint where the <id> is your data partner ID -->
/api/v1/data_partners/<id>/deals/
The API will respond with a paginated list of deals.
Paginated Item Example¶
{
"id": 111,
"deal_id": "deal_id",
"dsp": 101,
"ssp": "ssp_a",
"fee_type": "cpm",
"fee_amount": "2.50",
"currency": "USD",
"start_date": "2026-06-01",
"end_date": "2026-10-01",
"updated": "2026-06-01T15:03:00.000000Z"
}
Filtering Deals¶
The following filters are supported:
Filter |
Type |
|---|---|
query |
string, matches |
dsp |
integer |
ssp |
string |
page |
integer |
page_size |
integer |
Getting Deals Details¶
To get details of a particular deal, GET the following endpoint:
<!-- GET this endpoint where the <deal_pk> is the internal integer deal ID -->
/api/v1/data_partners/<id>/deals/<deal_pk>/
Deal Details Response Example¶
{
"id": 111,
"deal_id": "dp_deal_partner_a_premium_2026",
"fee_type": "cpm",
"fee_amount": "2.50",
"currency": "USD",
"dsp": 101,
"ssp": "ssp_a",
"geo": ["US", "GB", "CA/ON"],
"device_type": ["Phone", "Tablet", "PC"],
"content_type": ["display", "video"],
"domain": {
"type": "allow",
"values": ["example.com", "premium-site.com", "news-outlet.com"]
},
"bundle": {
"type": "block",
"values": ["com.example.app", "com.premium.app"]
},
"inventory_type": ["web", "in_app"],
"iab_category": ["IAB1", "IAB1/IAB1-1", "IAB12"],
"livestream": false,
"start_date": "2026-06-01",
"end_date": "2026-06-02",
"custom_fields": {},
"created": "2026-01-14T15:30:00.000000Z",
"updated": "2026-01-14T15:30:00.000000Z"
}
Note
If geo, iab_category, domain, or bundle are empty, the API responds with null for that field.
Data Partnership API Fields¶
Field |
Type/Validators |
Description |
|---|---|---|
|
integer |
Represents the internal Data Partnerships deal ID |
|
string |
Represents the external deal ID |
|
string |
Represents the type of curator fee. Supported types: |
|
decimal |
The amount paid as the curator fee. Can be decimal or integer. Should be |
|
string |
Represents the deal currency, supported values |
|
integer |
Represents Buyer ID in BidSwitch |
|
string |
Represents Supplier ID in BidSwitch |
|
array of strings |
Represents the geolocation targeting by country( |
|
array of strings |
Represents supported device types. Supported values: |
|
array of strings |
Represents supported content types. Supported values: |
|
string |
Represents domain targeting settings. Example |
|
string |
Represents app bundle targeting settings. Example |
|
array of strings |
Represents supported inventory types, for example |
|
array of strings |
Represents ontent category targeting settings. |
|
boolean |
Represents the Livestream flag |
|
string |
Represent the deal flight dates. The start date cannot be earlier than the next day after the deal creation. The end
date should be at least 1 day later than the start date. The end date cannot be equal or later than |
|
object |
Partner-specific extra fields |
|
string |
Represent the deal timestamps |
Custom Fields¶
Custom fields are partner-specific API fields added to deals under custom_fields object.
Partners’ custom fields are defined in code.
Matching uses the Data Partner’s internal
namefield.Unknown custom fields in the deal payload raise a validation error.
Current behavior:
Integrations are registered in service code and matched exactly to
DataPartner.name.GET
/api/v1/data_partners/and GET/api/v1/data_partners/<id>/expose the partner’s custom_fields_schema.If a Data Partner has no registered integration, submitted
custom_fieldsare ignored and stored as{}.If a Data Partner has a registered integration, custom_fields must match that integration’s schema. The integration serializer validates required fields, field types, choices, and unknown fields.
Response Example With Custom Fields¶
{
"id": 1,
"name": "lumen",
"name_external": "Lumen",
"status": "active",
"custom_fields_schema": [
{
"name": "min_lumen_attention_score",
"verbose_name": "Attention Score",
"type": "enum",
"required": true,
"choices": [
{"value": "low", "display": "Low"},
{"value": "medium", "display": "Medium"},
{"value": "high", "display": "High"}
]
}
]
}