MediaMath Platform API
MediaMath Platform API
Number of elements in the collection to retrieve
Index of the first element in the collection to retrieve
The field to sort by. You can use any field name in ascending or descending order. For ascending order, use the field name directly, e.g., id
. For descending order, prefix the field name with a hyphen (-
), e.g., -id
.
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans?advertiser_id=0&agency_id=0&organization_id=0&page_limit=100&page_offset=0&q=string&sort_by=id%2C%20-id%2C%20name%2C%20-name&sort_order=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "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/strategy_plans \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"zone_name": "string",
"budget": {
"budget": 0.1,
"currency_code": "str"
},
"goals": {
"max_bid": 0.1
},
"campaign_plan_id": 0,
"advertiser_id": 0,
"duration": {
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"channels": [
"display"
],
"creatives": {
"ad_expandable": true,
"ad_formats": [
"string"
],
"ad_sizes": [
"string"
]
},
"frequency": {
"frequency_type": "no-limit",
"frequency_amount": 0,
"frequency_interval": "not-applicable"
},
"targeting": {
"audience": {
"include": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
],
"exclude": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
]
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"my_data": {
"include": {
"pixel_bundle_ids": [
0
],
"operator": "AND"
},
"exclude": {
"pixel_bundle_ids": [
0
]
}
},
"location": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"technology": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
]
},
"inventory": {
"supply_source_ids": [
0
],
"run_on_all_exchanges": true,
"run_on_all_pmp": true,
"deal_ids": [
0
],
"deal_group_ids": [
0
],
"site_list_ids": [
0
]
},
"forecast": {
"forecast_date": "2050-01-01T16:00:00.000Z",
"forecast_result": {
"data": {
"errors": null,
"flags": null,
"opps": 216000,
"pricing": [
{
"impressions": 0,
"price": "7.665749",
"spend": "352816.151476",
"uniques": 0
}
],
"uniques": 156270
},
"meta": {
"status": "success"
}
}
}
}'
{ "data": { "id": 0, "version": 0, "campaign_plan_id": 0, "advertiser": { … }, "name": "strategy plan test", "duration": { … }, "zone_name": "America/Denver", "budget": { … }, "goals": { … }, "creatives": { … }, "channels": [ … ], "frequency": { … }, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "forecast_date": "2019-08-24T14:15:22Z", "forecast_query": { … }, "targeting": { … }, "inventory": { … }, "forecast": { … } }, "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans/{strategy_plan_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "id": 0, "version": 0, "campaign_plan_id": 0, "advertiser": { … }, "name": "strategy plan test", "duration": { … }, "zone_name": "America/Denver", "budget": { … }, "goals": { … }, "creatives": { … }, "channels": [ … ], "frequency": { … }, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "forecast_date": "2019-08-24T14:15:22Z", "forecast_query": { … }, "targeting": { … }, "inventory": { … }, "forecast": { … } }, "meta": { "status": "success" } }
curl -i -X POST \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans/{strategy_plan_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"zone_name": "string",
"budget": {
"budget": 0.1,
"currency_code": "str"
},
"goals": {
"max_bid": 0.1
},
"campaign_plan_id": 0,
"advertiser_id": 0,
"duration": {
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"channels": [
"display"
],
"creatives": {
"ad_expandable": true,
"ad_formats": [
"string"
],
"ad_sizes": [
"string"
]
},
"frequency": {
"frequency_type": "no-limit",
"frequency_amount": 0,
"frequency_interval": "not-applicable"
},
"targeting": {
"audience": {
"include": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
],
"exclude": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
]
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"my_data": {
"include": {
"pixel_bundle_ids": [
0
],
"operator": "AND"
},
"exclude": {
"pixel_bundle_ids": [
0
]
}
},
"location": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"technology": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
]
},
"inventory": {
"supply_source_ids": [
0
],
"run_on_all_exchanges": true,
"run_on_all_pmp": true,
"deal_ids": [
0
],
"deal_group_ids": [
0
],
"site_list_ids": [
0
]
},
"forecast": {
"forecast_date": "2050-01-01T16:00:00.000Z",
"forecast_result": {
"data": {
"errors": null,
"flags": null,
"opps": 216000,
"pricing": [
{
"impressions": 0,
"price": "7.665749",
"spend": "352816.151476",
"uniques": 0
}
],
"uniques": 156270
},
"meta": {
"status": "success"
}
}
}
}'
{ "data": { "id": 0, "version": 0, "campaign_plan_id": 0, "advertiser": { … }, "name": "strategy plan test", "duration": { … }, "zone_name": "America/Denver", "budget": { … }, "goals": { … }, "creatives": { … }, "channels": [ … ], "frequency": { … }, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "forecast_date": "2019-08-24T14:15:22Z", "forecast_query": { … }, "targeting": { … }, "inventory": { … }, "forecast": { … } }, "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans/{strategy_plan_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": {}, "meta": { "status": "success" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans/forecast \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"zone_name": "string",
"budget": {
"budget": 0.1,
"currency_code": "str"
},
"goals": {
"max_bid": 0.1
},
"campaign_plan_id": 0,
"advertiser_id": 0,
"duration": {
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"channels": [
"display"
],
"creatives": {
"ad_expandable": true,
"ad_formats": [
"string"
],
"ad_sizes": [
"string"
]
},
"frequency": {
"frequency_type": "no-limit",
"frequency_amount": 0,
"frequency_interval": "not-applicable"
},
"targeting": {
"audience": {
"include": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
],
"exclude": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
]
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"my_data": {
"include": {
"pixel_bundle_ids": [
0
],
"operator": "AND"
},
"exclude": {
"pixel_bundle_ids": [
0
]
}
},
"location": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"technology": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
]
},
"inventory": {
"supply_source_ids": [
0
],
"run_on_all_exchanges": true,
"run_on_all_pmp": true,
"deal_ids": [
0
],
"deal_group_ids": [
0
],
"site_list_ids": [
0
]
},
"forecast": {
"forecast_date": "2050-01-01T16:00:00.000Z",
"forecast_result": {
"data": {
"errors": null,
"flags": null,
"opps": 216000,
"pricing": [
{
"impressions": 0,
"price": "7.665749",
"spend": "352816.151476",
"uniques": 0
}
],
"uniques": 156270
},
"meta": {
"status": "success"
}
}
}
}'
{ "data": { "id": 0, "version": 0, "campaign_plan_id": 0, "advertiser": { … }, "name": "strategy plan test", "duration": { … }, "zone_name": "America/Denver", "budget": { … }, "goals": { … }, "creatives": { … }, "channels": [ … ], "frequency": { … }, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "forecast_date": "2019-08-24T14:15:22Z", "forecast_query": { … }, "targeting": { … }, "inventory": { … }, "forecast": { … } }, "meta": { "status": "success" } }
curl -i -X POST \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/strategy_plans/{strategy_plan_id}/forecast' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "id": 0, "version": 0, "campaign_plan_id": 0, "advertiser": { … }, "name": "strategy plan test", "duration": { … }, "zone_name": "America/Denver", "budget": { … }, "goals": { … }, "creatives": { … }, "channels": [ … ], "frequency": { … }, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "forecast_date": "2019-08-24T14:15:22Z", "forecast_query": { … }, "targeting": { … }, "inventory": { … }, "forecast": { … } }, "meta": { "status": "success" } }