Marketplaces API V2.0 API (2.0)

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://apidocs.mediamath.com/_mock/apis/marketplaces/
https://api.mediamath.com/deals/v1.0/

Private Marketplace Exchange (PMP-E)

Private Marketplace Direct (PMP-E)

Operations

List Deals

Request

List the Deals

You can read more about deals and deal groups (including adding them through T1), deal ownership, and deal best practices here. You may also find it useful for exploring input values.

Query
idsstring

_

exportstring

_

deal_typestring

Returns a list of deals that match the specified query

qstring

Returns a list of deals that match the specified query

sort_byboolean

Returns a list of deals sorted by the specified parameter

page_offsetstring

Returns a list of deals starting from the specified page offset

page_limitinteger

Returns a number of deals equal to the specified page limit

currency_codestring

Returns a list of deals with price attributes converted to such currency

statusboolean

Returns a list of deals that match the specified status

owner.typestring

Returns a list of deals that match the specified owner type

Enum"INTERNAL""ORGANIZATION""AGENCY""ADVERTISER"
strategy_idinteger

Returns a list of deals that are currently targeted by the strategy with that id

owner.advertiser_idinteger

Returns a list of deals that are editable by users of the advertiser with that id

owner.agency_idinteger

Returns a list of deals that are editable by users of the agency with that id

owner.organization_idintegerrequired

Returns a list of deals that are editable by users of the organization with that id

permissions.advertiser_idinteger

Returns a list of deals that are targetable by the advertiser with that id

Headers
Authorizationstringrequired

_

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deals?currency_code=string&deal_type=string&export=string&ids=string&owner.advertiser_id=0&owner.agency_id=0&owner.organization_id=0&owner.type=INTERNAL&page_limit=0&page_offset=string&permissions.advertiser_id=0&q=string&sort_by=true&status=true&strategy_id=0' \
  -H 'Authorization: string'

Responses

Please note that currently bill_type does not disclose here. GET /deals/{deal ID) will however disclose that parameter, and the creation or updating of the deal will both allow bill_type to be set and display it in the response.

Body
dataArray of objects
metaobject
Response
{
  "data": [
    {
      "created_on": "2019-08-14T17:23:56+00:00",
      "deal_identifier": "MDM-17302-00003",
      "deal_type": "STANDARD",
      "description": "News",
      "end_datetime": "2999-12-31T05:00:00+00:00",
      "entity_type": "deal",
      "id": 384382,
      "name": "Rubicon Project_The Washington Post_EBDA_Private Auction_Standard_Desktop & TabletWeb Display_Display_728x90, 160x600, 300x250_FLOOR_First Price_NAR_13_PREMIUM",
      "owner": {
        "id": 166628,
        "type": "ADVERTISER"
      },
      "permissions": {
        "advertiser_ids": [
          166628
        ],
        "agency_ids": [],
        "all_organizations": false,
        "organization_ids": []
      },
      "price": {
        "currency_code": "USD",
        "value": "13.0000"
      },
      "price_method": "CPM",
      "price_type": "FLOOR",
      "start_datetime": "2019-08-14T17:23:31+00:00",
      "status": true,
      "sub_supply_source_id": null,
      "supply_source_id": 11,
      "updated_on": "2019-08-14T17:23:56+00:00"
    }
  ],
  "meta": {
    "count": 1,
    "offset": 0,
    "status": "ok",
    "total_count": 1
  }
}

Create Deal

Request

Create Deal

For more insight into deal creation (inside T1), read here. You may find it useful for exploring input values.

Headers
Content-Typestringrequired

Content-Type

Default application/json
Cookiestringrequired

Cookie

Default adama_session=<<sessionid>>
Body

_

bill_typestring

Bill recipient when creating a deal

Enum"EXCHANGE""NONE""PUBLISHER"
deal_identifierstring<= 255 characters

the identifier used within a bid request to reference the deal

Default "EXCHANGE"
deal_typestring

When creating deal type PG, price_type must be set to FIXED and valid start_datetime and end_datetime must be present.

Default "STANDARD"
Enum"PG""STANDARD"
descriptionstring<= 4095 characters

the description of the deal

end_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##. Default is current time.

namestring<= 255 charactersrequired

the name of the deal

ownerobjectrequired

level of ownership for the deal (i.e. who can edit the deal) and the id of the ownership entity. for example, if the ownership level is set to ADVERTISER, anyone with access to such advertiser can edit this deal.

owner.​idinteger
owner.​typestring
Enum"ADVERTISER""AGENCY""INTERNAL""ORGANIZATION"
permissionsobjectrequired

List of entities that are allowed to target this deal, which should be either the owner entity or sub-entities of the owner entity. if a higher-level entity is included, then do not include any lower-level entity that is part of the included higher level entity. for example, if an organization X is listed in this parameter, then automatically all agencies and advertisers that are part of the organization X will be included and listing any such agencies and advertisers part of organization X will cause a validation error.

permissions.​advertiser_idsArray of integers
permissions.​agency_idsArray of integers
permissions.​all_organizationsbooleanrequired
permissions.​organization_idsArray of integers
priceobjectrequired

price floor or fixed value to use in auction along with the associated currency code

price.​currency_codestring= 3 characters

3-character currency code

Default "USD"
price.​valuestring

$9,999,999.9999 maximum

price_methodstring

only CPM cost accrual is supported

Default "CPM"
Value"CPM"
price_typestring

The deal is a "FLOOR" price deal (bids must be above this floor, and will likely clear above this floor) or "FIXED" price deal (bids must be at this price or above, and will clear at the fixed price)

Default "FLOOR"
Enum"FIXED""FLOOR"
start_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##. Default is current time.

statusboolean

If the deal is active

Default true
sub_supply_source_idinteger or null

the id of the publisher if the supply_source_id is set to 83 (BidSwitch)

supply_source_idintegerrequired

the exchange providing the deal

curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/deals \
  -H 'Content-Type: application/javascript' \
  -H 'Cookie: adama_session=<<sessionid>>' \
  -d '[object Object]'

Responses

Body
dataobject
metaobject
Response
No response example

List Deals and their reporting data

Request

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
  }
}
Headers
Content-Typestringrequired

Content-Type

Default application/json
Cookiestringrequired

Cookie

Default adama_session=<<sessionid>>
Body

_

bill_typestring

Bill recipient when creating a deal

Enum"EXCHANGE""NONE""PUBLISHER"
deal_identifierstring<= 255 characters

the identifier used within a bid request to reference the deal

Default "EXCHANGE"
deal_typestring

When creating deal type PG, price_type must be set to FIXED and valid start_datetime and end_datetime must be present.

Default "STANDARD"
Enum"PG""STANDARD"
descriptionstring<= 4095 characters

the description of the deal

end_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##. Default is current time.

namestring<= 255 charactersrequired

the name of the deal

ownerobjectrequired

level of ownership for the deal (i.e. who can edit the deal) and the id of the ownership entity. for example, if the ownership level is set to ADVERTISER, anyone with access to such advertiser can edit this deal.

owner.​idinteger
owner.​typestring
Enum"ADVERTISER""AGENCY""INTERNAL""ORGANIZATION"
permissionsobjectrequired

List of entities that are allowed to target this deal, which should be either the owner entity or sub-entities of the owner entity. if a higher-level entity is included, then do not include any lower-level entity that is part of the included higher level entity. for example, if an organization X is listed in this parameter, then automatically all agencies and advertisers that are part of the organization X will be included and listing any such agencies and advertisers part of organization X will cause a validation error.

permissions.​advertiser_idsArray of integers
permissions.​agency_idsArray of integers
permissions.​all_organizationsbooleanrequired
permissions.​organization_idsArray of integers
priceobjectrequired

price floor or fixed value to use in auction along with the associated currency code

price.​currency_codestring= 3 characters

3-character currency code

Default "USD"
price.​valuestring

$9,999,999.9999 maximum

price_methodstring

only CPM cost accrual is supported

Default "CPM"
Value"CPM"
price_typestring

The deal is a "FLOOR" price deal (bids must be above this floor, and will likely clear above this floor) or "FIXED" price deal (bids must be at this price or above, and will clear at the fixed price)

Default "FLOOR"
Enum"FIXED""FLOOR"
start_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##. Default is current time.

statusboolean

If the deal is active

Default true
sub_supply_source_idinteger or null

the id of the publisher if the supply_source_id is set to 83 (BidSwitch)

supply_source_idintegerrequired

the exchange providing the deal

curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_analytics \
  -H 'Content-Type: application/javascript' \
  -H 'Cookie: adama_session=<<sessionid>>' \
  -d '[object Object]'

Responses

Body
dataobject
metaobject
Response
No response example

Get Deal

Request

Get Deal

You can read more about deals and deal groups (including adding them through MediaMath Platform), deal ownership, and deal best practices here. You may also find it useful for exploring input values.

Path
idintegerrequired

id

Query
currency_codestring

Returns a list of deals with price attributes converted to such currency

Headers
Authorizationstringrequired

Authorization

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deals/{id}?currency_code=string' \
  -H 'Authorization: string'

Responses

Body
dataobject
metaobject
Response
{
  "data": {
    "created_on": "2016-11-22T10:24:21+00:00",
    "deal_identifier": "416788299328261311",
    "description": "",
    "end_datetime": "2999-12-31T00:00:00+00:00",
    "entity_type": "deal",
    "id": 140591,
    "name": "Future | Tech | Standards | DELL",
    "owner": {
      "id": 170605,
      "type": "ADVERTISER"
    },
    "permissions": {
      "advertiser_ids": [
        170605
      ],
      "agency_ids": [],
      "all_organizations": false,
      "organization_ids": []
    },
    "price": {
      "currency_code": "GBP",
      "value": "4.0000"
    },
    "price_method": "CPM",
    "price_type": "FLOOR",
    "start_datetime": "2016-10-31T11:26:59+00:00",
    "status": true,
    "sub_supply_source_id": null,
    "supply_source_id": 8,
    "updated_on": "2016-11-22T10:24:21+00:00"
  },
  "meta": {
    "status": "ok"
  }
}

Update Deal

Request

Update Deal

You can read more about deals and deal groups (including adding them through T1), deal ownership, and deal best practices here. You may also find it useful for exploring input values.

Path
idintegerrequired

id

Headers
Content-Typestringrequired

Content-Type

Default application/json
Cookiestringrequired

Cookie

Default adama_session=<<sessionid>>
Body

Note: The owner type and ID cannot be altered once the deal has been created.

bill_typestring

Bill recipient when creating a deal

Default "EXCHANGE"
Enum"EXCHANGE""NONE""PUBLISHER"
deal_identifierstring<= 255 characters

the identifier used within a bid request to reference the deal

deal_typestring

When updating deal to type PG, price_type must be set to FIXED and valid start_datetime and end_datetime must be present.

Default "STANDARD"
Enum"PG""STANDARD"
descriptionstring<= 4095 characters

the description of the deal

end_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##

namestring<= 255 characters

the name of the deal

permissionsobject

List of entities that are allowed to target this deal, which should be either the owner entity or sub-entities of the owner entity. if a higher-level entity is included, then do not include any lower-level entity that is part of the included higher level entity. for example, if an organization X is listed in this parameter, then automatically all agencies and advertisers that are part of the organization X will be included and listing any such agencies and advertisers part of organization X will cause a validation error.

priceobject

price floor or fixed value to use in auction along with the associated currency code

price_typestring

The deal is a "FLOOR" price deal (bids must be above this floor, and will likely clear above this floor) or "FIXED" price deal (bids must be at this price or above, and will clear at the fixed price)

Enum"FIXED""FLOOR"
start_datetimestring(date-time)

string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##

statusboolean

whether the deal is active

Default true
sub_supply_source_idinteger or null

the id of the publisher if the supply_source_id is set to 83 (BidSwitch)

supply_source_idinteger

the exchange providing the deal

curl -i -X POST \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deals/{id}' \
  -H 'Content-Type: application/javascript' \
  -H 'Cookie: adama_session=<<sessionid>>' \
  -d '[object Object]'

Responses

Body
dataobject
metaobject
Response
{
  "data": {
    "bill_type": "EXCHANGE",
    "created_on": "2019-08-19T14:14:59+00:00",
    "deal_identifier": "somethingelselongerstring3",
    "deal_type": "STANDARD",
    "description": "My First Deal Update",
    "end_datetime": "2999-12-31T05:00:00+00:00",
    "entity_type": "deal",
    "id": 384607,
    "name": "Alec",
    "owner": {
      "id": 464566,
      "type": "INTERNAL"
    },
    "permissions": {
      "advertiser_ids": [],
      "agency_ids": [],
      "all_organizations": true,
      "organization_ids": []
    },
    "price": {
      "currency_code": "EUR",
      "value": "2.7500"
    },
    "price_method": "CPM",
    "price_type": "FLOOR",
    "start_datetime": "2999-03-13T16:39:22+00:00",
    "status": true,
    "sub_supply_source_id": null,
    "supply_source_id": 41,
    "updated_on": "2019-08-19T14:58:33+00:00"
  },
  "meta": {
    "status": "ok"
  }
}

List the Deal Groups

Request

List the Deal Groups When executing the GET call, you must specify one of the following: 'owner.organization_id', or 'ids' parameter, or else you will receive an error.

Query
idsstring

ids

exportstring

export

allinteger

all

statusboolean

status

deal_idinteger

deal_id

strategy_idintegerrequired

strategy_id

owner.organization_idintegerrequired

owner.organization_id

page_offsetinteger

page_offset

page_limitinteger

page_limit

sort_bystring

sort_by

qstring

q

Headers
Authorizationstring

Authorization

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_groups?all=0&deal_id=0&export=string&ids=string&owner.organization_id=0&page_limit=0&page_offset=0&q=string&sort_by=string&status=true&strategy_id=0' \
  -H 'Authorization: string'

Responses

Body
dataArray of objects
metaobject
Response
No response example

Create a Deal Group

Request

Create a Deal Group

Deal Groups are a feature that will allow you and your team to package individual deals into groups. This should streamline targeting, improve marketability (ex. creating a viewability deal group), and simplify bulk updating of strategies targeting deals.

Deal Groups Ownership and Targeting Permissions: Ownership: Deal Groups can be created at the Organization, Agency, or Advertiser level of the T1 hierarchy. The creating entity (ex. Agency Z) owns the Deal Group, and any users with access to that entity can edit the Deal Group. Similarly, individual deals can be created at the Organization, Agency, or Advertiser level. The creating entity owns and can edit the deal. A Deal Group can only include deals which have the same owning entity as the Deal Group. This means that a Deal Group created by Agency Z can only include deals owned by Agency Z. That Deal Group cannot include deals created by any other entity, including Agency Z’s parent Organization or subsidiary Advertisers. Like deals, ownership of a Deal Group cannot change once it is created. Please consider this when creating deals and Deal Groups and developing targeting strategies. Targeting: Targeting permissions are set within individual deals. The default setting permissions all sub-entities of the deal owning entity to target the deal. For example, a deal created by Org X will by default be targetable by all agencies, advertisers and their strategies within Org X. Targeting permissions can also be restricted to particular subsidiary entities of the owning entity. For example, a deal may be created at the Agency level, but only permission targeting for two out of three advertisers within that agency. There are no targeting permissions set within a deal group. Deal Groups instead honor the targeting permissions of the deals within them. Inside a strategy, users can expand Deal Groups to view the deals within them. Users will only be able to view deals which they are permissioned to target. Deals showing in gray are inactive.

Note: the text above, with screenshots of T1 editing, can be found here

Headers
Content-Typestringrequired

_

Cookiestringrequired

_

Body

_

deal_idsArray of integers
descriptionstring
namestring
ownerobject
statusboolean
curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_groups \
  -H 'Content-Type: application/javascript' \
  -H 'Cookie: string' \
  -d '[object Object]'

Responses

Body
dataobject
metaobject
Response
No response example

Get Deal Groups

Request

Get a Deal Group's Details

Path
idintegerrequired

_

Headers
Authorizationstring

Authorization

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_groups/{id}' \
  -H 'Authorization: string'

Responses

Body
dataobject
metaobject
Response
No response example

Update Deal Groups

Request

Update a Deal Group's Details

Deal Groups are a feature that will allow you and your team to package individual deals into groups. This should streamline targeting, improve marketability (ex. creating a viewability deal group), and simplify bulk updating of strategies targeting deals.

Deal Groups Ownership and Targeting Permissions: Like deals, ownership of a Deal Group cannot change once it is created. There are no targeting permissions set within a deal group. Deal Groups instead honor the targeting permissions of the deals within them.

Path
idintegerrequired

_

Headers
Content-Typestringrequired

_

Cookiestringrequired

_

Body

_

namestring
statusboolean
deal_idsArray of integers
descriptionstring
ownerobject
curl -i -X POST \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_groups/{id}' \
  -H 'Content-Type: application/javascript' \
  -H 'Cookie: string' \
  -d '[object Object]'

Responses

Body
dataobject
metaobject
Response
No response example

Create publisher

Request

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

Body

_

organization_idintegerrequired

ID of the organization to associate the publisher with

namestring<= 64 charactersrequired

Name of the publisher (64 character maximum)

curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/publishers \
  -H 'Content-Type: application/javascript' \
  -d '[object Object]'

Responses

Body
metaobject
dataobject
Response
No response example

List publishers

Request

Publishers are associated to an organization. A collection of publishers for an organization can be retrieved using an HTTP GET request containing an organization_id

Example: https://api.mediamath.com/deals/v1.0/publishers?organization_id=100315

The only sort_by parameter allowed is "name", and organization_id is the only required parameter

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

Query
sort_bystring

sort_by

Value"name"
qstring

q

page_offsetinteger

page_offset

page_limitinteger

Maximum list page element count

organization_idintegerrequired

organization_id

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/publishers?organization_id=0&page_limit=0&page_offset=0&q=string&sort_by=name' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{
"meta": {
"count": 1,
"status": "ok",
"offset": 0,
"total_count": 1
},
"data": [
{
"name": "testing",
"last_touch_user_id": 4254,
"id": 3,
"updated_on": "2020-10-01T14:21:48+00:00",
"created_on": "2020-10-01T14:21:48+00:00",
"deleted_on": null,
"organization_id": 100315
}
]
}
Body
metaobject
dataArray of objects
Response
No response example

Read publisher

Request

Example: https://api.mediamath.com/deals/v1.0/publishers/3

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

Path
idstringrequired

See below

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/publishers/{id}' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{
  "data": {
    "created_on": "2020-10-01T14:21:48+00:00",
    "last_touch_user_id": 4254,
    "id": 3,
    "organization_id": 100315,
    "updated_on": "2020-10-01T14:21:48+00:00",
    "name": "testing",
    "deleted_on": null
  },
  "meta": {
    "status": "ok"
  }
}
Body
dataobject
metaobject
Response
No response example

Update Publisher

Request

Example: POST https://api.mediamath.com/deals/v1.0/publishers/5

where you might want to edit to the following:

{
    "name" : "edited demo publisher 2", 
}

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

Path
idstringrequired

See below

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X POST \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/publishers/{id}' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{ "data": { "created_on": "2020-09-28T20:52:03+00:00", "deleted_on": null, "id": 5, "last_touch_user_id": 1234, "name": "edited demo publisher 2", "organization_id": 100048, "updated_on": "2020-09-28T20:52:03+00:00" }, "meta": { "status": "ok" } }

Body
dataobject
metaobject
Response
No response example

Delete publisher

Request

Example: DELETE https://api.mediamath.com/deals/v1.0/publishers/5

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

Path
idstringrequired

See below

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X DELETE \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/publishers/{id}' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{
  "meta": {
    "status": "ok"
  },
  "data": {
    "deleted_on": "2020-10-07T21:26:03+00:00",
    "organization_id": 100048,
    "last_touch_user_id": 1234,
    "updated_on": "2020-10-07T21:26:03+00:00",
    "created_on": "2020-09-28T20:52:03+00:00",
    "id": 5,
    "name": "edited demo publisher 2"
  }
}
Body
metaobject
dataobject
Response
No response example

List channels

Request

Displays a list of channels

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X GET \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/channels \
  -H 'Authorization: Bearer $TOKEN'

Responses

[
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 1,
    "name": "Display",
    "pos": 1,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 2,
    "name": "Mobile Web",
    "pos": 2,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 3,
    "name": "Mobile In-app",
    "pos": 3,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 4,
    "name": "Video",
    "pos": 4,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 5,
    "name": "Audio",
    "pos": 5,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 6,
    "name": "CTV",
    "pos": 6,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  },
  {
    "created_on": "Mon, 20 Jul 2020 11:13:55 GMT",
    "id": 7,
    "name": "DOOH",
    "pos": 7,
    "updated_on": "Mon, 20 Jul 2020 11:13:55 GMT"
  }
]
BodyArray [
created_onstring
idinteger
namestring
posinteger
updated_onstring
]
Response
No response example

Bulk Update Deal

Request

Bulk Update Deal

Query
<<any other attributes>>string

<<any other attributes>>

namestring

name

descriptionstring

description

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
Body

See below

dealsArray of objects
curl -i -X PUT \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/bulk_update/deals?%3C%3Cany%20other%20attributes%3E%3E=string&description=string&name=string' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/javascript' \
  -d '[object Object]'

Responses

{
    "data": {
        "updated_deals": [
            {
                "updated_on": "2021-07-08T14:02:24+00:00",
                "created_on": "2021-07-08T13:57:26+00:00",
                "id": 429599,
                "name": "some new name",
                "description": "something",
                "supply_source_id": 246,
                "sub_supply_source_id": null,
                "deal_identifier": "hello",
                "start_datetime": "2020-12-31T05:00:00+00:00",
                "end_datetime": "2999-12-31T05:00:00+00:00",
                "price_type": "FLOOR",
                "price_method": "CPM",
                "status": false,
                "bill_type": "EXCHANGE",
                "deal_type": "STANDARD",
                "impressions": 22,
                "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"
                    },
                    {
                        "id": 2,
                        "name": "Mobile Web",
                        "pos": 2,
                        "created_on": "2020-07-20T11:13:55.015407+00:00",
                        "updated_on": "2020-07-20T11:13:55.015407+00:00"
                    }
                ],
                "publisher_id": null,
                "organization_id": 100315,
                "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": [],
                "strategies_count": 0
            }
        ],
        "invalid_deals": []
    },
    "meta": {
        "status": "ok"
    }
}
Body
dataobject
metaobject
Response
No response example

Bulk Create Deal

Request

Bulk Create Deal endpoint is /deals/v1.0/bulk_create/deals

For more insight into deal creation (inside T1), read here. You may find it useful for exploring input values.

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
Body
{
  "data": [
    {
      "updated_on": "2021-06-09T14:29:27+00:00",
      "created_on": "2021-04-12T13:22:35+00:00",
      "id": 422839,
      "name": "UIA_Inventory_Test",
      "description": null,
      "supply_source_id": 159,
      "sub_supply_source_id": null,
      "deal_identifier": "2718951",
      "start_datetime": "2021-04-12T13:22:15+00:00",
      "end_datetime": "2999-12-31T05:00:00+00:00",
      "price_type": "FIXED",
      "price_method": "CPM",
      "status": true,
      "bill_type": "EXCHANGE",
      "deal_type": "STANDARD",
      "impressions": null,
      "channels": [],
      "publisher_id": null,
      "organization_id": 100048,
      "permissions": {
        "all_organizations": false,
        "organization_ids": [
          100048
        ],
        "agency_ids": [],
        "advertiser_ids": []
      },
      "owner": {
        "type": "ORGANIZATION",
        "id": 100048
      },
      "price": {
        "value": "0.0073",
        "currency_code": "USD"
      },
      "entity_type": "deal",
      "deal_groups": [],
      "strategies_count": 0
    },
    {
      "updated_on": "2018-03-01T21:43:46+00:00",
      "created_on": "2017-04-10T06:31:51+00:00",
      "id": 177130,
      "name": "pmp test",
      "description": "",
      "supply_source_id": 218,
      "sub_supply_source_id": null,
      "deal_identifier": "MM2-8G3-K3D4",
      "start_datetime": "2017-04-10T07:31:28+00:00",
      "end_datetime": "2999-12-31T00:00:00+00:00",
      "price_type": "FLOOR",
      "price_method": "CPM",
      "status": true,
      "bill_type": "EXCHANGE",
      "deal_type": "STANDARD",
      "impressions": null,
      "channels": null,
      "publisher_id": null,
      "organization_id": 100048,
      "permissions": {
        "all_organizations": false,
        "organization_ids": [],
        "agency_ids": [],
        "advertiser_ids": [
          176789
        ]
      },
      "owner": {
        "type": "ADVERTISER",
        "id": 176789
      },
      "price": {
        "value": "8.0000",
        "currency_code": "USD"
      },
      "entity_type": "deal",
      "deal_groups": [],
      "strategies_count": 0
    }
  ]
}
object
curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/bulk_create/deals \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/javascript' \
  -d '[object Object]'

Responses

{
    "data": {
        "created_deals": [
            {
                "updated_on": "2021-07-08T13:57:26+00:00",
                "created_on": "2021-07-08T13:57:26+00:00",
                "id": 429599,
                "name": "hello",
                "description": "hello",
                "supply_source_id": 246,
                "sub_supply_source_id": null,
                "deal_identifier": "hello",
                "start_datetime": "2020-12-31T05:00:00+00:00",
                "end_datetime": "2999-12-31T05:00:00+00:00",
                "price_type": "FLOOR",
                "price_method": "CPM",
                "status": false,
                "bill_type": "EXCHANGE",
                "deal_type": "STANDARD",
                "impressions": 22,
                "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"
                    },
                    {
                        "id": 2,
                        "name": "Mobile Web",
                        "pos": 2,
                        "created_on": "2020-07-20T11:13:55.015407+00:00",
                        "updated_on": "2020-07-20T11:13:55.015407+00:00"
                    }
                ],
                "publisher_id": null,
                "organization_id": 100315,
                "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": [],
                "strategies_count": 0
            }
        ],
        "invalid_deals": []
    },
    "meta": {
        "status": "ok"
    }
}
Body
dataobject
metaobject
Response
No response example

Bulk Create or Update Deal

Request

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.

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
Body
{
    "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
        }
    ]
}
object
curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/bulk/deals \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/javascript' \
  -d '[object Object]'

Responses

{
    "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"
    }
}
Body
dataobject
metaobject
Response
No response example

Bulk Create Publishers

Request

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

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
Body

{"organization_id":100315, "names" : ["my name is..","my other name is"]}

organization_idinteger
namesArray of strings
curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/marketplaces/bulk_create/publishers \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/javascript' \
  -d '[object Object]'

Responses

{
  "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"
  }
}
Body
metaobject
dataArray of objects
Response
No response example

List Deal Strategies

Request

List Deal Strategies

Example: /deals/v1.0/deals/380882/strategy_deals

you can use the 'with' parameter to get information about the strategies and campaigns using the deal. eg: /deals/v1.0/deals/380882/strategy_deals?with=strategy,campaign,advertiser

Path
idnumberrequired

See below

Query
sort_bystring

sort_by

withstring

with

page_offsetnumber

The list starts from the specified page offset

page_limitnumber

Maximum list page element count

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deals/{id}/strategy_deals?page_limit=0&page_offset=0&sort_by=string&with=string' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{ "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 } }

Body
dataArray of objects
metaobject
Response
No response example

List Deal Group Strategies

Request

List deal group strategies

Example: /deals/v1.0/deal_groups/980/strategy_deal_groups

you can use the 'with param to vide the details of the strategy's campaign or advertiser eg: deals/v1.0/deal_groups/980/strategy_deal_groups?with=strategy,campaign,advertiser

Path
idnumberrequired

See below

Query
sort_bystring

sort_by

withstring

with

page_offsetnumber

The list starts from the specified page offset

page_limitnumber

Maximum list page element count

Headers
Authorizationstring

Authorization

Default Bearer $TOKEN
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/marketplaces/deal_groups/{id}/strategy_deal_groups?page_limit=0&page_offset=0&sort_by=string&with=string' \
  -H 'Authorization: Bearer $TOKEN'

Responses

{
  "data": [
    {
      "id": 19744,
      "entity_type": "strategy_deal_group"
    },
    {
      "id": 19496,
      "entity_type": "strategy_deal_group"
    }
  ],
  "meta": {
    "count": 2,
    "total_count": 2,
    "status": "ok",
    "offset": 0
  }
}
Body
dataArray of objects
metaobject
Response
No response example