- List Deals and their reporting data
List the Deals
This call returns all information you get with a deal and also the reporting data for a specified time interval (time_window : "yesterday", "last_7_days", "last_30_days", "month_to_date", or a custom range using "start_date" and "end_date"). You should only send time_window or start_date/end_date but not a combination of the both. The filters field allows you to filter the results based on what you need, e.g: "filters": [{"field":"id", "op":"in", "value": [123]}] will look for deals that have 123 in their ID. {"field" :"match_rate", "op":">", "value" :0} will return deals that have a "match_rate" greater than 0. You can also use the "sorting" field to sort the results, eg: "sorting":[{"field":"viewability_rate", "dir":"asc"}] will give the results sorted by the viewability_rate field.
"reporting": {
"organization_id": 100048,
"time_window": "last_7_days",
"start_date": null,
"end_date": null
},
"filters": [
{"field": "id",
"op": "in",
"value" : [447824]},
{"field": "match_rate",
"op": ">",
"value" : 0}
],
"sorting": [
{
"field": "viewability_rate",
"dir": "asc"
}
],
"paging": {
"page_offset": 0
}
}- https://api.mediamath.com/deals/v1.0https://api.mediamath.com/deals/v1.0/deal_analytics
curl -i -X POST \
https://api.mediamath.com/deals/v1.0/deal_analytics \
-H 'Content-Type: application/json' \
-H 'Cookie: adama_session=<<sessionid>>' \
-d '{
"reporting": {
"organization_id": 0,
"time_window": "yesterday",
"start_date": "2019-08-24",
"end_date": "2019-08-24"
},
"filters": [
{
"field": "string",
"op": "string",
"value": null
}
],
"sorting": [
{
"field": "string",
"dir": "asc"
}
],
"paging": {
"page_offset": 0,
"page_limit": 0
}
}'{ "data": [ { … } ], "meta": { "total_count": 0, "count": 0, "status": "string", "offset": 0, "next_page": "string" } }