MediaMath Platform API
MediaMath Platform API
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/bulk_update/strategies \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"update": [
{
"id": 0,
"name": "string",
"description": "string",
"status": true,
"archived": false,
"is_programmatic_guaranteed": false,
"media_type": "DISPLAY",
"use_optimization": true,
"ads_txt_verified": "ANY",
"type": "REM",
"feature_compatibility": "string",
"device_graph_only": true,
"version": 0,
"campaign_id": 0,
"duration": {
"use_campaign_start": true,
"use_campaign_end": true,
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"budget": {
"budget": 0.1,
"currency_code": "string",
"margin_pct": 9999999.9999
},
"pacing": {
"impression_pacing_type": "even",
"impression_pacing_amount": 1,
"impression_pacing_interval": "hour",
"pacing_type": "even",
"pacing_amount": 9999999.99,
"pacing_interval": "hour",
"pacing_optimization_type": "monetary",
"pacing_optimization_amount": 9999999.99,
"use_dba_strategy_pacing": "always",
"use_dba_strategy_pacing_after_date": "2019-08-24"
},
"goals": {
"goal_type": "spend",
"goal_value": 999999999.9999,
"min_bid": 9999999.99,
"max_bid": 0.01,
"roi_target": 999999999.99,
"bid_min_devices": 0,
"bid_aggressiveness": 100,
"bid_price_is_media_only": true,
"max_bid_wm": 9999999.99,
"use_bid_shading": true,
"flat_rate_cpm": 0.01
},
"frequency": {
"frequency_type": "even",
"frequency_interval": "hour",
"frequency_amount": 0,
"frequency_optimization": true
},
"inventory": {
"supply_type": "RTB",
"run_on_all_pmp": true,
"run_on_all_exchanges": true,
"site_restriction_transparent_urls": true,
"domain_restrictions": {
"include": [
{
"domain": "www.mediamath.com",
"target_type": "DOMAIN"
}
],
"exclude": [
{
"domain": "www.mediamath.com",
"target_type": "DOMAIN"
}
]
},
"site_lists": [
{
"site_list_id": 0,
"assigned": true
}
],
"campaign_site_lists": [
{
"site_list_id": 0,
"assigned": true
}
],
"deals": [
{
"deal_id": 0
}
],
"deal_groups": [
{
"deal_group_id": 0
}
],
"supply_sources": [
{
"supply_source_id": 0
}
]
},
"targeting": {
"fold_position": [
"ABOVE"
],
"audience": {
"include": [
{
"operator": "AND",
"segments": [
null
]
}
],
"exclude": {
"operator": "AND",
"segments": [
{}
]
}
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"segments": [
null
]
}
],
"exclude": {
"code": "string",
"operator": "AND",
"segments": [
{}
]
}
},
"postal_codes": {
"restriction": "INCLUDE",
"codes": [
"us-14392",
"us-24981",
"us-25632",
"us-16191",
"us-48574",
"us14392",
"us24981",
"us25632",
"us16191",
"us48574",
"14392",
"24981",
"25632",
"16191",
"48574"
]
},
"geofence": {
"include": {
"operator": "AND",
"segments": [
{}
]
},
"exclude": {
"operator": "AND",
"segments": [
{}
]
}
},
"my_data": {
"include": {
"operator": "AND",
"pixels": [
{}
]
},
"exclude": {
"operator": "AND",
"pixels": [
{}
]
}
},
"location": {
"include": [
{
"operator": "string",
"target_value_id": 0,
"code": "DMAX"
}
],
"exclude": [
{
"operator": "string",
"target_value_id": 0,
"code": "DMAX"
}
]
},
"technology": {
"include": [
{
"operator": "string",
"code": "BSER",
"target_value_id": 0
}
],
"exclude": [
{
"operator": "string",
"code": "BSER",
"target_value_id": 0
}
]
},
"ip_addresses": {
"restriction": "INCLUDE",
"codes": [
"string"
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
],
"recency": [
{
"pixel_id": 0,
"from_hour": 0,
"to_hour": 0
}
],
"language_codes": [
{
"code": "string",
"name": "string"
}
]
},
"concepts": {
"weighting": "NONE",
"creative_groups": [
{
"concept_id": 0,
"percent": 0
}
]
}
}
]
}'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/bulk_update/budget_flights \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"budget_flights": {
"create": [
{
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0,
"campaign_id": 0
}
],
"update": [
{
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0,
"id": 1
}
],
"delete": [
0
]
}
}'
{ "data": [ [ … ] ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/bulk_update/campaigns \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"update": [
{
"archived": false,
"status": true,
"name": "string",
"service_type": "SELF",
"io_name": "string",
"io_reference_num": "string",
"is_programmatic_guaranteed": true,
"political": false,
"source_campaign_id": 0,
"zone_name": "string",
"id": 1,
"identity": {
"device_graph_only": false,
"bid_min_devices": 1,
"connected_id_type": "DETERMINISTIC_FIRST"
},
"ad_server": {
"ad_server_id": 0,
"ad_server_username": "string",
"ad_server_password": "string",
"use_default_ad_server": true,
"ad_server_fee": 9999999.99
},
"goals": {
"goal_type": "spend",
"goal_alert": 9999999.99,
"goal_value": 0.0001,
"goal_category": "audience"
},
"duration": {
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"budget": {
"currency_code": "USD",
"margin_pct": 9999999.9999,
"dynamic_budget_allocation_type": "SBA_AUTO_ALLOCATION",
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z",
"total_impression_budget": 0,
"total_budget": 0,
"flights": [
{
"id": 0,
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0
}
]
},
"frequency": {
"frequency_type": "even",
"frequency_interval": "hour",
"frequency_amount": 0,
"use_mm_freq": false,
"frequency_optimization": false
},
"pacing": {
"pacing_alert": 0,
"impression_cap_automatic": false,
"impression_cap_amount": 0,
"impression_cap_type": "even",
"spend_cap_type": "even",
"spend_cap_amount": 0,
"spend_cap_automatic": true,
"brain_intraday_pacing": false
},
"inventory": {
"ads_txt_verified": "ANY",
"minimize_multi_ads": false,
"override_suspicious_traffic_filter": false,
"suspicious_traffic_filter_level": 25,
"dcs_data_is_campaign_level": false,
"restrict_targeting_to_deterministic_id": false,
"restrict_targeting_to_same_device_id": true
},
"attribution": {
"has_custom_attribution": false,
"custom_attribution_source": "3rd Party Attribution",
"pc_window_minutes": 0,
"pv_window_minutes": 0,
"pv_pct": 100,
"merit_pixel_id": 0,
"conversion_type": "every",
"conversion_variable_minutes": 1
},
"viewability": {
"vendor_id": 0,
"type": "AUTO_TAG",
"sample_rate": 1
},
"vendor_contracts": [
{
"vendor_id": 0,
"use_mm_contract": true,
"price": 0.1,
"rate_card_type": "CPM",
"site_lists": {
"id": 0,
"name": "string",
"version": 0,
"status": true,
"organization_id": 0,
"restriction": "string",
"filename": "string",
"campaign_id": 0,
"assigned": true,
"sites_count": 0,
"sites_count_app": 0,
"sites_count_domain": 0
}
}
]
}
]
}'
{ "id": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }