Private Marketplace Direct (PMP-E)
Bulk Create/Update Deal endpoint is /deals/v1.0/bulk/deals To create a deal you need to populate all the fileds. To update you need to provide the "id" field and only the fields that you want to change. For more insight into deal creation (inside T1), read here. You may find it useful for exploring input values.
{
"deals":
[
{
"owner": {
"type": "ORGANIZATION",
"id": 100315
},
"price_method": "CPM",
"deal_identifier": "Test_3",
"name": "Test_3",
"status": true,
"start_datetime": "2022-06-01T05:00:00+00:00",
"end_datetime": "2022-06-17T05:00:00+00:00",
"channels": [1],
"supply_source_id": 246,
"permissions": {
"organization_ids": [100315],
"agency_ids" :[],
"advertiser_ids":[]
},
"price": {
"value": "1.3",
"currency_code": "EUR"
},
"deal_type": "PG",
"price_type": "FIXED"
}
]
}
for update:
{
"deals":
[
{
"id": 457001,
"name": "Test_3_update",
"status": false
}
]
}
curl -i -X POST \
https://api.mediamath.com/deals/v1.0/bulk/deals \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/javascript' \
-d '[object Object]'
{
"data": {
"valid_deals": [
{
"updated_on": "2022-06-28T10:11:37+00:00",
"created_on": "2022-06-28T10:11:37+00:00",
"id": 457001,
"name": "Test_3",
"description": null,
"supply_source_id": 246,
"sub_supply_source_id": null,
"deal_identifier": "Test_3",
"start_datetime": "2022-06-01T05:00:00+00:00",
"end_datetime": "2022-06-17T05:00:00+00:00",
"price_type": "FIXED",
"price_method": "CPM",
"status": true,
"deal_type": "PG",
"impressions": null,
"channels": [
{
"id": 1,
"name": "Display",
"pos": 1,
"created_on": "2020-07-20T11:13:55.015407+00:00",
"updated_on": "2020-07-20T11:13:55.015407+00:00"
}
],
"publisher_id": null,
"strategies_count": 0,
"organization_id": 100315,
"effective_status": "creating",
"severity": null,
"api_version": "v2",
"permissions": {
"all_organizations": false,
"organization_ids": [
100315
],
"agency_ids": [],
"advertiser_ids": []
},
"owner": {
"type": "ORGANIZATION",
"id": 100315
},
"price": {
"value": "1.3000",
"currency_code": "EUR"
},
"entity_type": "deal",
"deal_groups": [],
"publisher": null
}
],
"invalid_deals": []
},
"meta": {
"status": "ok"
}
}
for update:
"data": {
"valid_deals": [
{
"updated_on": "2022-06-28T12:21:03+00:00",
"created_on": "2022-06-28T12:20:05+00:00",
"id": 457226,
"name": "Test_DanTest_1_update",
"description": null,
"supply_source_id": 246,
"sub_supply_source_id": null,
"deal_identifier": "Test_DanTest_1",
"start_datetime": "2022-06-01T05:00:00+00:00",
"end_datetime": "2022-06-17T05:00:00+00:00",
"price_type": "FIXED",
"price_method": "CPM",
"status": false,
"deal_type": "PG",
"impressions": null,
"channels": [
{
"id": 1,
"name": "Display",
"pos": 1,
"created_on": "2020-07-20T11:13:55.015407+00:00",
"updated_on": "2020-07-20T11:13:55.015407+00:00"
}
],
"publisher_id": null,
"strategies_count": 0,
"organization_id": 100315,
"effective_status": "creating",
"severity": null,
"api_version": "v2",
"permissions": {
"all_organizations": false,
"organization_ids": [
100315
],
"agency_ids": [],
"advertiser_ids": []
},
"owner": {
"type": "ORGANIZATION",
"id": 100315
},
"price": {
"value": "1.3000",
"currency_code": "EUR"
},
"entity_type": "deal",
"deal_groups": [],
"publisher": null
}
],
"invalid_deals": []
},
"meta": {
"status": "ok"
}
}
No response example
This allows you to add multiple publishers at one under the same organization id.
Publishers
Information about PMP-D from the T1 side can be found here A video explainer on publisher management through the MediaMath app can be found at: https://academy.mediamath.com/mediamath-beta-courses?next=%2Fmediamath-beta-courses%2F800806
{"organization_id":100315, "names" : ["my name is..","my other name is"]}
curl -i -X POST \
https://api.mediamath.com/deals/v1.0/bulk_create/publishers \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/javascript' \
-d '[object Object]'
{
"data": [
{
"updated_on": "2021-07-08T14:08:06+00:00",
"created_on": "2021-07-08T14:08:06+00:00",
"id": 514,
"name": "my name is..",
"organization_id": 100315,
"last_touch_user_id": 4254,
"deleted_on": null
},
{
"updated_on": "2021-07-08T14:08:06+00:00",
"created_on": "2021-07-08T14:08:06+00:00",
"id": 515,
"name": "my other name is",
"organization_id": 100315,
"last_touch_user_id": 4254,
"deleted_on": null
}
],
"meta": {
"status": "ok"
}
}
No response example
curl -i -X GET \
'https://api.mediamath.com/deals/v1.0/deals/{id}/strategy_deals?page_limit=0&page_offset=0&sort_by=string&with=string' \
-H 'Authorization: Bearer $TOKEN'
{ "data": [ { "id": 852908478, "entity_type": "strategy_deal" }, { "id": 852911871, "entity_type": "strategy_deal" }, { "id": 852908409, "entity_type": "strategy_deal" }, { "id": 852908397, "entity_type": "strategy_deal" } ], "meta": { "count": 4, "total_count": 4, "status": "ok", "offset": 0 } }
No response example