# Marketplaces API V2.0 API Version: 2.0 License: Apache 2.0 ## Servers ``` https://api.mediamath.com/deals/v1.0 ``` ## Download OpenAPI description [Marketplaces API V2.0 API](https://apidocs.mediamath.com/_spec/apis/marketplaces.yaml) ## Private Marketplace Exchange (PMP-E) Private Marketplace Direct (PMP-E) ### List Deals - [GET /deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list-deals.md): 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. ### Create Deal - [POST /deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/post-deal.md): Create Deal For more insight into deal creation (inside T1), read here. You may find it useful for exploring input values. ### List Deals and their reporting data - [POST /deal_analytics](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list-deals.md): 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. ### Get Deal - [GET /deals/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/get-deal.md): 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. ### Update Deal - [POST /deals/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/put-deal.md): 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. ### List the Deal Groups - [GET /deal_groups](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list-deal-groups.md): 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. ### Create a Deal Group - [POST /deal_groups](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/post-deal-group.md): 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 ### Get Deal Groups - [GET /deal_groups/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/get-deal-group.md): Get a Deal Group's Details ### Update Deal Groups - [POST /deal_groups/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/put-deal-group.md): 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. ### Create publisher - [POST /publishers](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/post_publishers.md): 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 ### List publishers - [GET /publishers](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/retrieve_publishers.md): 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 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 ### Read publisher - [GET /publishers/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/retrieve_a_publisher_by_id.md): 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 ### Update Publisher - [POST /publishers/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/edit_pub_name.md): where you might want to edit to the following: 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 ### Delete publisher - [DELETE /publishers/{id}](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/delete_publisher.md): 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 ### List channels - [GET /channels](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list_channels.md): Displays a list of channels ### Bulk Update Deal - [PUT /bulk_update/deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/update-bulk-deal.md): Bulk Update Deal ### Bulk Create Deal - [POST /bulk_create/deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/bulk-create-deal.md): 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. ### Bulk Create or Update Deal - [POST /bulk/deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/bulk-create-deal.md): 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. ### Bulk Create Publishers - [POST /bulk_create/publishers](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/bulk-create-publishers.md): 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 ### List Deal Strategies - [GET /deals/{id}/strategy_deals](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list-deal-strategies.md): List Deal Strategies you can use the 'with' parameter to get information about the strategies and campaigns using the deal. ### List Deal Group Strategies - [GET /deal_groups/{id}/strategy_deal_groups](https://apidocs.mediamath.com/apis/marketplaces/private-marketplace-exchange-(pmp-e)/list-deal-group-strategies.md): List deal group strategies you can use the 'with param to vide the details of the strategy's campaign or advertiser eg: