openapi: 3.0.0 info: title: Marketplaces API V2.0 API contact: url: https://support.infillion.com/ license: url: http://www.apache.org/licenses/LICENSE-2.0.html name: Apache 2.0 version: '2.0' security: - Bearer: [] paths: /deals: get: tags: - Private Marketplace Exchange (PMP-E) summary: List Deals description: List the Deals operationId: LIST-deals parameters: - name: ids in: query description: _ schema: type: string - name: export in: query description: _ schema: type: string - name: deal_type in: query description: Returns a list of deals that match the specified query schema: type: string - name: q in: query description: Returns a list of deals that match the specified query schema: type: string - name: sort_by in: query description: Returns a list of deals sorted by the specified parameter schema: type: string enum: - name - id - deal_identifier - supply_source_id - updated_on - created_on - start_datetime - end_datetime - price - description - name: sort_dir in: query description: Sort direction schema: type: string enum: - ASC - DESC - name: page_offset in: query description: Returns a list of deals starting from the specified page offset schema: type: string - name: page_limit in: query description: Returns a number of deals equal to the specified page limit schema: type: integer - name: currency_code in: query description: Returns a list of deals with price attributes converted to such currency schema: type: string - name: status in: query description: Returns a list of deals that match the specified status schema: type: boolean - name: owner.type in: query description: Returns a list of deals that match the specified owner type schema: type: string enum: - ORGANIZATION - name: strategy_id in: query description: Returns a list of deals that are currently targeted by the strategy with that id schema: type: integer - name: owner.advertiser_id in: query description: Returns a list of deals that are editable by users of the advertiser with that id schema: type: integer - name: owner.agency_id in: query description: Returns a list of deals that are editable by users of the agency with that id schema: type: integer - name: owner.organization_id in: query description: Returns a list of deals that are editable by users of the organization with that id required: true schema: type: integer - name: permissions.organization_ids in: query description: Comma-separated list of organization IDs to filter deals by. Returns deals permissioned to at least one of the specified organizations (OR within this parameter). If combined with permissions.agency_ids or permissions.advertiser_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string - name: permissions.agency_ids in: query description: Comma-separated list of agency IDs to filter deals by. Returns deals permissioned to at least one of the specified agencies (OR within this parameter). If combined with permissions.organization_ids or permissions.advertiser_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string - name: permissions.advertiser_ids in: query description: Comma-separated list of advertiser IDs to filter deals by. Returns deals permissioned to at least one of the specified advertisers (OR within this parameter). If combined with permissions.organization_ids or permissions.agency_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string - name: time_window in: query description: Filter deals by time window schema: type: string enum: - last_7_days responses: '200': description: 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. content: application/json: schema: type: object properties: data: type: array items: type: object properties: advertiser_id: type: integer description: Advertiser id is 0 for global deal bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Who will be billed for the deal channels: type: array description: List of advertising channels associated with this deal items: type: object properties: id: type: integer description: Channel ID name: type: string description: Channel name created_on: type: string format: date-time currency_code: type: string description: ISO 4217 3-character currency code minLength: 3 maxLength: 3 x-examples: - USD deal_identifier: type: string description: ID used within a bid request to reference the deal maxLength: 256 deal_type: type: string enum: - PG - STANDARD description: deal_type is the type of deal. PG is for a Programmatic Guaranteed deal, and STANDARD is the only other value allowed default: STANDARD description: type: string description: Description of the deal maxLength: 4096 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time entity_type: type: string enum: - deal id: type: integer description: ID of the deal name: type: string description: Name of the deal maxLength: 256 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION maxLength: 32 permissions: type: object description: List of entities that are allowed to target this deal. 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 adevertisers part of organization X will cause a validation error. properties: advertiser_ids: type: array items: type: integer agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: object price: type: object properties: currency_code: type: string description: ISO 4217 3-character currency code minLength: 3 maxLength: 3 default: USD value: type: string description: Maximum is 9,999,999.9999 price_method: type: string enum: - CPM description: CPM is the only acceptable value for now maxLength: 16 price_type: type: string enum: - FIXED - FLOOR description: 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) maxLength: 16 start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: Whether the deal is active default: true sub_supply_source_id: type: integer description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: Exchange providing the deal supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name publisher: type: object description: Publisher details properties: id: type: integer description: Publisher ID name: type: string description: Publisher name nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal impressions: type: integer description: Number of impressions nullable: true effective_status: type: string description: Current effective status of the deal enum: - ready - creating - ssp_status_mismatch - ssp_start_date_mismatch - ssp_end_date_mismatch - organization_contract_start_date_error - organization_contract_end_date_error - organization_inactive - agency_inactive - advertiser_inactive - campaign_inactive - campaign_start_date_error - campaign_end_date_error - campaign_pg_flag_error - strategy_inactive - strategy_start_date_error - strategy_end_date_error - strategy_pg_flag_error - strategy_concept_inactive - creative_inactive - deal_status_inactive - deal_start_date_error - deal_end_date_error - strategy_not_assigned severity: type: integer description: Severity level nullable: true deal_groups: type: array description: Deal groups associated with this deal items: type: object properties: id: type: integer description: Deal group ID name: type: string description: Deal group name updated_on: type: string format: date-time meta: type: object properties: count: type: integer offset: type: integer status: type: string total_count: type: integer post: tags: - Private Marketplace Exchange (PMP-E) summary: Create Deal description: Create Deal operationId: POST-deal parameters: - $ref: '#/components/parameters/trait_postHeader_Content-Type' - $ref: '#/components/parameters/trait_cookieAuth_Cookie' requestBody: content: application/json: schema: $ref: '#/components/schemas/create-deal' description: _ responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Who will be billed for the deal default: EXCHANGE channels: type: array description: List of advertising channels associated with this deal items: type: object properties: id: type: integer description: Channel ID name: type: string description: Channel name created_on: type: string format: date-time deal_identifier: type: string description: ID used within a bid request to reference the deal maxLength: 255 deal_type: type: string enum: - PG - STANDARD description: deal_type is the type of deal. PG is for a Programmatic Guaranteed deal, and STANDARD is the only other value allowed default: STANDARD description: type: string description: Description of the deal maxLength: 4095 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time entity_type: type: string enum: - deal id: type: integer description: ID of the deal name: type: string description: Name of the deal maxLength: 255 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION permissions: type: object description: List of entities that are allowed to target this deal. 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 adevertisers part of organization X will cause a validation error. properties: advertiser_ids: type: array items: type: object agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: object price: type: object properties: currency_code: type: string description: 3-character ISO 1427 currency code default: USD value: type: string description: Maximum is $9,999,999.9999 price_method: type: string enum: - CPM description: CPM is the only acceptable value for now price_type: type: string enum: - FIXED - FLOOR description: 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) start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: Whether the deal is active default: true sub_supply_source_id: type: integer description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: Exchange providing the deal supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name publisher_id: type: integer description: Publisher ID nullable: true publisher: type: object description: Publisher details properties: id: type: integer description: Publisher ID name: type: string description: Publisher name nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal impressions: type: integer description: Number of impressions nullable: true effective_status: type: string description: Current effective status of the deal enum: - ready - creating - ssp_status_mismatch - ssp_start_date_mismatch - ssp_end_date_mismatch - organization_contract_start_date_error - organization_contract_end_date_error - organization_inactive - agency_inactive - advertiser_inactive - campaign_inactive - campaign_start_date_error - campaign_end_date_error - campaign_pg_flag_error - strategy_inactive - strategy_start_date_error - strategy_end_date_error - strategy_pg_flag_error - strategy_concept_inactive - creative_inactive - deal_status_inactive - deal_start_date_error - deal_end_date_error - strategy_not_assigned severity: type: integer description: Severity level nullable: true deal_groups: type: array description: Deal groups associated with this deal items: type: object properties: id: type: integer description: Deal group ID name: type: string description: Deal group name updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: status: type: string '400': description: 'Reasons may include: * "deal_type", "unsupported feature, cannot change deal_type from " + db_deal_type + " to " + request_deal_type * ''{}'' format is invalid".format(field) * ''deal_type'' field is not present in db, requires manually investigations * end_datetime is required and must match the dates in the __ Programmatic Guaranteed agreement * Entities in the ''permissions'' field must be equivalent to or sub-entities of the owner entity * Invalid currency_code * Invalid owner.id * Invalid sub_supply_source_id * missing owner * overlap error: duplicate advertiserID * overlap error: duplicate agencyID * Owner type not found. * ''owner.id'' is a required property for this owner.type * ''permissions.advertiser_ids'' field must be present * ''permissions.agency_ids'' field must be present * ''permissions.organization_ids'' currently can have up to one id * ''permissions.organization_ids'' field must be present * ''price.value'' is invalid * Programmatic guaranteed deals must have a fixed price * start_datetime is required and must match the dates in the " + name + " Programmatic Guaranteed agreement * ''start_datetime'' must be earlier than ''end_datetime'' * ''sub_supply_source_id'' is not necessary for this supply source * ''sub_supply_source_id'' is required for this supply source * This deal_identifier already exists * This supply source does not support programmatic guaranteed deals * Unauthorized to set ''permissions.all_organizations'' to true * Unauthorized to set this ''owner.type''' /deal_analytics: post: tags: - Private Marketplace Exchange (PMP-E) summary: List Deals and their reporting data description: "List the Deals\n\nThis 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.\ \ \nThe 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. \n{\"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. \n\n```{\n \"reporting\": {\n \"organization_id\": 100048,\n\ \ \"time_window\": \"last_7_days\",\n \"start_date\": null,\n \"end_date\": null\n },\n\ \ \"filters\": [\n {\"field\": \"id\",\n \"op\": \"in\",\n \"value\"\ \ : [447824]},\n {\"field\": \"match_rate\",\n \"op\": \">\",\n \ \ \"value\" : 0}\n ],\n \"sorting\": [\n {\n \"field\": \"viewability_rate\"\ ,\n \"dir\": \"asc\"\n }\n \n ],\n \"paging\": {\n \"page_offset\"\ : 0\n }\n}\n```\n" operationId: LIST-deals-and-reporting-data parameters: - $ref: '#/components/parameters/trait_postHeader_Content-Type' - $ref: '#/components/parameters/trait_cookieAuth_Cookie' - name: owner.organization_id in: query description: Organization ID that owns the deals required: true schema: type: integer - name: permissions.organization_ids in: query description: Comma-separated list of organization IDs to filter deals by. Returns deals permissioned to at least one of the specified organizations (OR within this parameter). If combined with permissions.agency_ids or permissions.advertiser_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string - name: permissions.agency_ids in: query description: Comma-separated list of agency IDs to filter deals by. Returns deals permissioned to at least one of the specified agencies (OR within this parameter). If combined with permissions.organization_ids or permissions.advertiser_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string - name: permissions.advertiser_ids in: query description: Comma-separated list of advertiser IDs to filter deals by. Returns deals permissioned to at least one of the specified advertisers (OR within this parameter). If combined with permissions.organization_ids or permissions.agency_ids, a deal must match at least one ID from each provided parameter (AND between parameters). Users may only request IDs they have access to; unauthorized IDs return 400. required: false schema: type: string requestBody: content: application/json: schema: type: object properties: reporting: type: object required: - organization_id properties: organization_id: type: integer description: Organization ID for which to retrieve reporting data time_window: type: string enum: - yesterday - last_7_days - last_30_days - month_to_date description: Predefined time window (use either this OR start_date/end_date) start_date: type: string format: date description: Custom start date (YYYY-MM-DD). Use with end_date instead of time_window end_date: type: string format: date description: Custom end date (YYYY-MM-DD). Use with start_date instead of time_window filters: type: array description: Filter criteria for deals items: type: object properties: field: type: string description: Field name to filter on (e.g., "id", "match_rate", "name") op: type: string description: Operator (e.g., "in", ">", "<", "=", "!=") value: description: Value or array of values to filter by sorting: type: array description: Sort criteria items: type: object properties: field: type: string description: Field name to sort by (e.g., "viewability_rate", "name", "id") dir: type: string enum: - asc - desc description: Sort direction paging: type: object properties: page_offset: type: integer description: Offset for pagination default: 0 page_limit: type: integer description: Number of results per page required: - reporting description: Request body for deal analytics query responses: '200': description: Returns deals with performance/reporting data content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer name: type: string description: type: string created_on: type: string format: date-time updated_on: type: string format: date-time supply_source_id: type: integer sub_supply_source_id: type: integer nullable: true deal_identifier: type: string start_datetime: type: string format: date-time end_datetime: type: string format: date-time price_type: type: string enum: - FIXED - FLOOR price_method: type: string enum: - CPM status: type: boolean bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER deal_type: type: string enum: - PG - STANDARD impressions: type: integer nullable: true publisher_id: type: integer nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal effective_status: type: string description: Current effective status of the deal severity: type: string nullable: true permissions: type: object properties: all_organizations: type: boolean organization_ids: type: array items: type: integer agency_ids: type: array items: type: integer advertiser_ids: type: array items: type: integer owner: type: object properties: type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION id: type: integer price: type: object properties: value: type: string currency_code: type: string entity_type: type: string performance_data: type: object description: Performance metrics for the deal during the specified time period properties: bid_requests: type: integer bids: type: integer bid_rate: type: number wins: type: integer win_rate: type: number matches: type: integer match_rate: type: number total_spend: type: object properties: value: type: number currencyCode: type: string impressions: type: integer e_CPM: type: object properties: value: type: number currencyCode: type: string media_spend: type: object properties: value: type: number currencyCode: type: string v_CPM: type: object properties: value: type: number currencyCode: type: string viewability_rate: type: object properties: value: type: number nullable: true currencyCode: type: string videoCompleteRate: type: object properties: value: type: number nullable: true currencyCode: type: string total_spend_CPA: type: object properties: value: type: number currencyCode: type: string media_spend_CPM: type: object properties: value: type: number currencyCode: type: string clicks: type: integer ctr: type: number response_rate: type: object properties: value: type: number is_percent: type: boolean uniques: type: integer frequency: type: number issues: type: array description: Array of issues or problems with the deal items: type: object deal_groups: type: array items: type: object supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name channels: type: array description: Channels associated with this deal items: type: object properties: id: type: string description: Channel ID (string format) name: type: string publisher: type: object description: Publisher details properties: id: type: string name: type: string nullable: true is_favorite: type: boolean description: Whether this deal is marked as favorite meta: type: object properties: total_count: type: integer count: type: integer status: type: string nullable: true offset: type: integer next_page: type: string nullable: true /deals/{id}: get: tags: - Private Marketplace Exchange (PMP-E) summary: Get Deal description: Get Deal operationId: GET-deal parameters: - name: id in: path description: id required: true schema: type: integer - name: currency_code in: query description: Returns a list of deals with price attributes converted to such currency schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: advertiser_id: type: integer description: Advertiser id is 0 for global deal bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Who will be billed for the deal default: EXCHANGE channels: type: array description: List of advertising channels associated with this deal items: type: object properties: id: type: integer description: Channel ID name: type: string description: Channel name created_on: type: string format: date-time currency_code: type: string description: ISO-4217 3-letter currency code minLength: 3 maxLength: 3 deal_identifier: type: string description: ID used within a bid request to reference the deal maxLength: 255 deal_type: type: string enum: - PG - STANDARD description: deal_type is the type of deal. PG is for a Programmatic Guaranteed deal, and STANDARD is the only other value allowed default: STANDARD description: type: string description: Description of the deal maxLength: 4095 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time entity_type: type: string enum: - deal id: type: integer description: ID of the deal name: type: string description: Name of the deal maxLength: 255 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION permissions: type: object description: List of entities that are allowed to target this deal. 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 adevertisers part of organization X will cause a validation error. properties: advertiser_ids: type: array items: type: integer agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: object price: type: object properties: currency_code: type: string description: 3-character ISO 1427 currency code value: type: string description: Maximum is $9,999,999.9999 price_method: type: string enum: - CPM description: CPM is the only acceptable value for now price_type: type: string enum: - FIXED - FLOOR description: 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) start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: Whether the deal is active sub_supply_source_id: type: integer description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: Exchange providing the deal supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name publisher_id: type: integer description: Publisher ID nullable: true publisher: type: object description: Publisher details properties: id: type: integer description: Publisher ID name: type: string description: Publisher name nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal impressions: type: integer description: Number of impressions nullable: true effective_status: type: string description: Current effective status of the deal enum: - ready - creating - ssp_status_mismatch - ssp_start_date_mismatch - ssp_end_date_mismatch - organization_contract_start_date_error - organization_contract_end_date_error - organization_inactive - agency_inactive - advertiser_inactive - campaign_inactive - campaign_start_date_error - campaign_end_date_error - campaign_pg_flag_error - strategy_inactive - strategy_start_date_error - strategy_end_date_error - strategy_pg_flag_error - strategy_concept_inactive - creative_inactive - deal_status_inactive - deal_start_date_error - deal_end_date_error - strategy_not_assigned severity: type: integer description: Severity level nullable: true deal_groups: type: array description: Deal groups associated with this deal items: type: object properties: id: type: integer description: Deal group ID name: type: string description: Deal group name updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: status: type: string post: tags: - Private Marketplace Exchange (PMP-E) summary: Update Deal description: Update Deal operationId: PUT-deal parameters: - name: id in: path description: id required: true schema: type: integer - $ref: '#/components/parameters/trait_postHeader_Content-Type' - $ref: '#/components/parameters/trait_cookieAuth_Cookie' requestBody: content: application/json: schema: $ref: '#/components/schemas/update-deal' description: 'Note: The owner type and ID cannot be altered once the deal has been created.' responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Who will be billed for the deal default: EXCHANGE channels: type: array description: List of advertising channels associated with this deal items: type: object properties: id: type: integer description: Channel ID name: type: string description: Channel name created_on: type: string format: date-time deal_identifier: type: string description: ID used within a bid request to reference the deal maxLength: 255 deal_type: type: string enum: - PG - STANDARD description: deal_type is the type of deal. PG is for a Programmatic Guaranteed deal, and STANDARD is the only other value allowed default: STANDARD description: type: string description: Description of the deal maxLength: 4095 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time entity_type: type: string enum: - deal id: type: integer description: ID of the deal name: type: string description: Name of the deal maxLength: 255 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION permissions: type: object description: List of entities that are allowed to target this deal. 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 adevertisers part of organization X will cause a validation error. properties: advertiser_ids: type: array items: type: object agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: object price: type: object properties: currency_code: type: string description: 3-character ISO 1427 currency code minLength: 3 maxLength: 3 default: USD value: type: string description: Maximum value is $9,999,999.9999 price_method: type: string enum: - CPM description: CPM is the only acceptable value for now price_type: type: string enum: - FIXED - FLOOR description: 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) start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: Whether the deal is active default: true sub_supply_source_id: type: integer description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: Exchange providing the deal supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name publisher_id: type: integer description: Publisher ID nullable: true publisher: type: object description: Publisher details properties: id: type: integer description: Publisher ID name: type: string description: Publisher name nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal impressions: type: integer description: Number of impressions nullable: true effective_status: type: string description: Current effective status of the deal enum: - ready - creating - ssp_status_mismatch - ssp_start_date_mismatch - ssp_end_date_mismatch - organization_contract_start_date_error - organization_contract_end_date_error - organization_inactive - agency_inactive - advertiser_inactive - campaign_inactive - campaign_start_date_error - campaign_end_date_error - campaign_pg_flag_error - strategy_inactive - strategy_start_date_error - strategy_end_date_error - strategy_pg_flag_error - strategy_concept_inactive - creative_inactive - deal_status_inactive - deal_start_date_error - deal_end_date_error - strategy_not_assigned severity: type: integer description: Severity level nullable: true deal_groups: type: array description: Deal groups associated with this deal items: type: object properties: id: type: integer description: Deal group ID name: type: string description: Deal group name updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: status: type: string '400': description: 'Reasons may include: * "deal_type", "unsupported feature, cannot change deal_type from " + db_deal_type + " to " + request_deal_type * ''{}'' format is invalid".format(field) * ''deal_type'' field is not present in db, requires manually investigations * end_datetime is required and must match the dates in the __ Programmatic Guaranteed agreement * Entities in the ''permissions'' field must be equivalent to or sub-entities of the owner entity * Invalid currency_code * Invalid owner.id * Invalid sub_supply_source_id * missing owner * overlap error: duplicate advertiserID * overlap error: duplicate agencyID * Owner type not found. * ''owner.id'' is a required property for this owner.type * ''permissions.advertiser_ids'' field must be present * ''permissions.agency_ids'' field must be present * ''permissions.organization_ids'' currently can have up to one id * ''permissions.organization_ids'' field must be present * ''price.value'' is invalid * Programmatic guaranteed deals must have a fixed price * start_datetime is required and must match the dates in the " + name + " Programmatic Guaranteed agreement * ''start_datetime'' must be earlier than ''end_datetime'' * ''sub_supply_source_id'' is not necessary for this supply source * ''sub_supply_source_id'' is required for this supply source * This deal_identifier already exists * This supply source does not support programmatic guaranteed deals * Unauthorized to set ''permissions.all_organizations'' to true * Unauthorized to set this ''owner.type''' /deal_groups: get: tags: - Private Marketplace Exchange (PMP-E) summary: List the Deal Groups description: '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. ' operationId: LIST-deal-groups parameters: - name: ids in: query description: ids schema: type: string - name: export in: query description: export schema: type: string - name: all in: query description: all schema: type: integer - name: status in: query description: status schema: type: boolean - name: deal_id in: query description: deal_id schema: type: integer - name: strategy_id in: query description: strategy_id required: false schema: type: integer - name: owner.organization_id in: query description: owner.organization_id required: true schema: type: integer - name: owner.type in: query description: Filter by owner type schema: type: string enum: - ORGANIZATION - name: page_offset in: query description: page_offset required: false schema: type: integer - name: page_limit in: query description: page_limit required: false schema: type: integer - name: sort_by in: query description: sort_by required: false schema: type: string enum: - name - id - deal_identifier - supply_source_id - updated_on - created_on - start_datetime - end_datetime - price - name: sort_dir in: query description: Sort direction schema: type: string enum: - ASC - DESC - name: q in: query description: q required: false schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: data: type: array items: type: object properties: created_on: type: string format: date-time deal_ids: type: array items: type: integer description: type: string maxLength: 4095 entity_type: type: string enum: - deal_group id: type: integer name: type: string maxLength: 255 owner: type: object properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - ORGANIZATION status: type: boolean description: Whether the deal group is active (TRUE) or inactive (FALSE) updated_on: type: string format: date-time meta: type: object properties: count: type: integer offset: type: integer status: type: string enum: - ok total_count: type: integer post: tags: - Private Marketplace Exchange (PMP-E) summary: Create a Deal Group description: "Create a Deal Group\n\nDeal 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. \n\nDeal Groups Ownership and Targeting Permissions:\nOwnership: 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. \nTargeting: 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. " operationId: POST-deal-group parameters: - name: Content-Type in: header description: _ required: true schema: type: string - name: Cookie in: header description: _ required: true schema: type: string requestBody: content: application/json: schema: type: object properties: deal_ids: type: array items: type: integer description: type: string name: type: string owner: type: object properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - ORGANIZATION status: type: boolean description: _ responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: created_on: type: string format: date-time deal_ids: type: array items: type: integer description: type: string maxLength: 4095 entity_type: type: string enum: - deal_group id: type: integer name: type: string maxLength: 255 owner: type: object properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - ORGANIZATION status: type: boolean description: Whether the deal group is active (TRUE) or inactive (FALSE) updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: status: type: string enum: - ok '400': description: 'Reasons may include: * deal_ids is a required field * ''deal_ids'' must be valid and must have the same owner fields as the deal group * duplicate id''s in ''deal_ids'' * Each deal group can have upto 300 deal_ids * Invalid deal id ___ * Invalid owner.organization_id * Invalid strategy_id * ''page_limit'' parameter cannot be greater than 100 * ''page_limit'' parameter cannot be less than 0 * ''page_offset'' parameter cannot be less than 0 * Request must be in JSON format * ''sort_by'' parameter must be one of id, name, updated_on, or created_on * ''status'' parameter is invalid * The queried field ''{}'' is not a ___ field this resource can match * The request is invalid! * There are more than 1000 ids to be updated! * There is no data to be updated! * Unauthorized! -- (Note: Yes, this is a roles/permissions thing) * You cannot combine owner.organization_id with deal_id parameter * You cannot combine strategy_id with deal_id parameter * You cannot combine strategy_id with owner.organization_id and deal_id parameter * You cannot combine strategy_id with owner.organization_id parameter * You need to provide ''owner.organization_id'', ''strategy_id'', ''deal_id'' or ''ids'' parameter' /deal_groups/{id}: get: tags: - Private Marketplace Exchange (PMP-E) summary: Get Deal Groups description: 'Get a Deal Group''s Details ' operationId: GET-deal-group parameters: - name: id in: path description: _ required: true schema: type: integer responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: created_on: type: string format: date-time deal_ids: type: array items: type: integer description: type: string maxLength: 4095 entity_type: type: string enum: - deal_group id: type: integer name: type: string maxLength: 255 owner: type: object properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - ORGANIZATION status: type: boolean description: Whether the deal group is active (TRUE) or inactive (FALSE) updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: count: type: integer offset: type: integer status: type: string enum: - ok total_count: type: integer post: tags: - Private Marketplace Exchange (PMP-E) summary: Update Deal Groups description: "Update a Deal Group's Details\n\nDeal 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. \n\nDeal Groups Ownership and Targeting Permissions:\nLike deals, ownership\ \ of a Deal Group cannot change once it is created.\nThere are no targeting permissions set within\ \ a deal group. Deal Groups instead honor the targeting permissions of the deals within them." operationId: PUT-deal-group parameters: - name: id in: path description: _ required: true schema: type: integer - name: Content-Type in: header description: _ required: true schema: type: string - name: Cookie in: header description: _ required: true schema: type: string requestBody: content: application/json: schema: type: object properties: name: type: string status: type: boolean deal_ids: type: array items: type: integer description: type: string owner: type: object properties: type: type: string id: type: integer description: _ responses: '200': description: '' content: application/json: schema: type: object properties: data: type: object properties: created_on: type: string format: date-time deal_ids: type: array items: type: integer description: type: string maxLength: 4095 entity_type: type: string enum: - deal_group id: type: integer name: type: string maxLength: 255 owner: type: object properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - ORGANIZATION status: type: boolean description: Whether the deal group is active (TRUE) or inactive (FALSE) updated_on: type: string format: date-time has_strategies: type: boolean description: Indicates if the deal has strategies assigned meta: type: object properties: status: type: string enum: - ok '400': description: 'Reasons may include: * deal_ids is a required field * ''deal_ids'' must be valid and must have the same owner fields as the deal group * duplicate id''s in ''deal_ids'' * Each deal group can have upto 300 deal_ids * Invalid deal id ___ * Invalid owner.organization_id * Invalid strategy_id * ''page_limit'' parameter cannot be greater than 100 * ''page_limit'' parameter cannot be less than 0 * ''page_offset'' parameter cannot be less than 0 * Request must be in JSON format * ''sort_by'' parameter must be one of id, name, updated_on, or created_on * ''status'' parameter is invalid * The queried field ''{}'' is not a ___ field this resource can match * The request is invalid! * There are more than 1000 ids to be updated! * There is no data to be updated! * Unauthorized! -- (Note: Yes, this is a roles/permissions thing) * You cannot combine owner.organization_id with deal_id parameter * You cannot combine strategy_id with deal_id parameter * You cannot combine strategy_id with owner.organization_id and deal_id parameter * You cannot combine strategy_id with owner.organization_id parameter * You need to provide ''owner.organization_id'', ''strategy_id'', ''deal_id'' or ''ids'' parameter' /publishers: post: tags: - Private Marketplace Exchange (PMP-E) summary: Create publisher description: 'Publishers Information about PMP-D from the T1 side can be found [here](https://mediamathsupport.force.com/s/article/Private-Marketplace-Direct-PMPD) 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' operationId: POST_publishers requestBody: content: application/json: schema: type: object properties: organization_id: type: integer description: "ID of the organization to associate the publisher with\t" name: type: string description: "Name of the publisher\t(20 character maximum)" maxLength: 20 required: - organization_id - name description: _ responses: '200': description: '' content: application/json: schema: type: object properties: meta: type: object properties: status: type: string data: type: object properties: deleted_on: nullable: true organization_id: type: integer last_touch_user_id: type: integer updated_on: type: string created_on: type: string id: type: integer name: type: string get: tags: - Private Marketplace Exchange (PMP-E) summary: List publishers description: '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 allowed sort_by parameters are "id", "name", "created_on", and "updated_on". 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 ' operationId: Retrieve_publishers parameters: - name: sort_by in: query description: sort_by schema: type: string enum: - id - name - created_on - updated_on - name: sort_dir in: query description: Sort direction schema: type: string enum: - ASC - DESC - name: q in: query description: q schema: type: string - name: page_offset in: query description: page_offset schema: type: integer - name: page_limit in: query description: Maximum list page element count schema: type: integer - name: organization_id in: query description: organization_id required: true schema: type: integer - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: '``` { "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 } ] } ```' content: application/json: schema: type: object properties: meta: type: object properties: count: type: integer status: type: string offset: type: integer total_count: type: integer data: type: array items: type: object properties: name: type: string last_touch_user_id: type: integer id: type: integer updated_on: type: string created_on: type: string deleted_on: nullable: true organization_id: type: integer /publishers/{id}: get: tags: - Private Marketplace Exchange (PMP-E) summary: Read publisher description: '`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' operationId: Retrieve_a_publisher_by_ID parameters: - name: id in: path description: See below required: true schema: type: string - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: "```\n{\n \"data\": {\n \"created_on\": \"2020-10-01T14:21:48+00:00\",\n \ \ \"last_touch_user_id\": 4254,\n \"id\": 3,\n \"organization_id\": 100315,\n \"\ updated_on\": \"2020-10-01T14:21:48+00:00\",\n \"name\": \"testing\",\n \"deleted_on\"\ : null\n },\n \"meta\": {\n \"status\": \"ok\"\n }\n}\n```" content: application/json: schema: type: object properties: data: type: object properties: created_on: type: string last_touch_user_id: type: integer id: type: integer organization_id: type: integer updated_on: type: string name: type: string deleted_on: nullable: true meta: type: object properties: status: type: string post: tags: - Private Marketplace Exchange (PMP-E) summary: Update Publisher description: '`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' operationId: Edit_Pub_name parameters: - name: id in: path description: See below required: true schema: type: string - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: "{\n \"data\": {\n \"created_on\": \"2020-09-28T20:52:03+00:00\",\n \ \ \"deleted_on\": null,\n \"id\": 5,\n \"last_touch_user_id\": 1234,\n\ \ \"name\": \"edited demo publisher 2\",\n \"organization_id\": 100048,\n \ \ \"updated_on\": \"2020-09-28T20:52:03+00:00\"\n },\n \"meta\": {\n \"\ status\": \"ok\"\n }\n}" content: application/json: schema: type: object properties: data: type: object properties: created_on: type: string last_touch_user_id: type: integer id: type: integer organization_id: type: integer updated_on: type: string name: type: string deleted_on: nullable: true meta: type: object properties: status: type: string delete: tags: - Private Marketplace Exchange (PMP-E) summary: Delete publisher description: '`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' operationId: Delete_publisher parameters: - name: id in: path description: See below required: true schema: type: string - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: "```\n{\n \"meta\": {\n \"status\": \"ok\"\n },\n \"data\": {\n \"deleted_on\"\ : \"2020-10-07T21:26:03+00:00\",\n \"organization_id\": 100048,\n \"last_touch_user_id\"\ : 1234,\n \"updated_on\": \"2020-10-07T21:26:03+00:00\",\n \"created_on\": \"2020-09-28T20:52:03+00:00\"\ ,\n \"id\": 5,\n \"name\": \"edited demo publisher 2\"\n }\n}\n```" content: application/json: schema: type: object properties: meta: type: object properties: status: type: string data: type: object properties: deleted_on: type: string organization_id: type: integer last_touch_user_id: type: integer updated_on: type: string created_on: type: string id: type: integer name: type: string /channels: get: tags: - Private Marketplace Exchange (PMP-E) summary: List channels description: Displays a list of channels operationId: List_channels parameters: - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: Returns a list of available advertising channels content: application/json: schema: type: array items: type: object properties: id: type: integer description: Unique identifier for the channel name: type: string description: Name of the channel pos: type: integer description: Position/order of the channel created_on: type: string format: date-time description: Timestamp when the channel was created updated_on: type: string format: date-time description: Timestamp when the channel was last updated examples: response: value: - 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' - id: 3 name: Mobile In-app pos: 3 created_on: '2020-07-20T11:13:55.015407+00:00' updated_on: '2020-07-20T11:13:55.015407+00:00' - id: 4 name: Video pos: 4 created_on: '2020-07-20T11:13:55.015407+00:00' updated_on: '2020-07-20T11:13:55.015407+00:00' - id: 5 name: Audio pos: 5 created_on: '2020-07-20T11:13:55.015407+00:00' updated_on: '2020-07-20T11:13:55.015407+00:00' - id: 6 name: CTV pos: 6 created_on: '2020-07-20T11:13:55.015407+00:00' updated_on: '2020-07-20T11:13:55.015407+00:00' - id: 7 name: DOOH pos: 7 created_on: '2020-07-20T11:13:55.015407+00:00' updated_on: '2020-07-20T11:13:55.015407+00:00' /bulk_update/deals: put: tags: - Private Marketplace Exchange (PMP-E) summary: Bulk Update Deal description: Bulk Update Deal operationId: Update-Bulk-Deal parameters: - name: <> in: query description: <> schema: type: string - name: name in: query description: name schema: type: string - name: description in: query description: description schema: type: string - $ref: '#/components/parameters/trait_jwtAuth_JWT' requestBody: content: application/json: schema: type: object properties: deals: type: array items: type: object properties: id: type: integer name: type: string channels: type: array description: Array of channel IDs items: type: integer description: See below responses: '200': description: "```\n{\n \"data\": {\n \"updated_deals\": [\n {\n \ \ \"updated_on\": \"2021-07-08T14:02:24+00:00\",\n \"created_on\":\ \ \"2021-07-08T13:57:26+00:00\",\n \"id\": 429599,\n \"name\"\ : \"some new name\",\n \"description\": \"something\",\n \"\ supply_source_id\": 246,\n \"sub_supply_source_id\": null,\n \ \ \"deal_identifier\": \"hello\",\n \"start_datetime\": \"2020-12-31T05:00:00+00:00\"\ ,\n \"end_datetime\": \"2999-12-31T05:00:00+00:00\",\n \"price_type\"\ : \"FLOOR\",\n \"price_method\": \"CPM\",\n \"status\": false,\n\ \ \"bill_type\": \"EXCHANGE\",\n \"deal_type\": \"STANDARD\"\ ,\n \"impressions\": 22,\n \"channels\": [\n \ \ {\n \"id\": 1,\n \"name\": \"Display\"\ ,\n \"pos\": 1,\n \"created_on\": \"2020-07-20T11:13:55.015407+00:00\"\ ,\n \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n \ \ },\n {\n \"id\": 2,\n \ \ \"name\": \"Mobile Web\",\n \"pos\": 2,\n \ \ \"created_on\": \"2020-07-20T11:13:55.015407+00:00\",\n \ \ \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n }\n \ \ ],\n \"publisher_id\": null,\n \"organization_id\":\ \ 100315,\n \"permissions\": {\n \"all_organizations\":\ \ false,\n \"organization_ids\": [\n 100315\n \ \ ],\n \"agency_ids\": [],\n \"advertiser_ids\"\ : []\n },\n \"owner\": {\n \"type\": \"ORGANIZATION\"\ ,\n \"id\": 100315\n },\n \"price\": {\n\ \ \"value\": \"1.3000\",\n \"currency_code\": \"EUR\"\ \n },\n \"entity_type\": \"deal\",\n \"deal_groups\"\ : [],\n \"strategies_count\": 0\n }\n ],\n \"invalid_deals\"\ : []\n },\n \"meta\": {\n \"status\": \"ok\"\n }\n}\n```" content: application/json: schema: type: object properties: data: type: object properties: updated_deals: type: array items: type: object properties: updated_on: type: string created_on: type: string id: type: integer name: type: string description: type: string supply_source_id: type: integer sub_supply_source_id: nullable: true deal_identifier: type: string start_datetime: type: string end_datetime: type: string price_type: type: string price_method: type: string status: type: boolean bill_type: type: string deal_type: type: string impressions: nullable: true channels: nullable: true publisher_id: nullable: true permissions: type: object properties: all_organizations: type: boolean organization_ids: type: array items: type: object agency_ids: type: array items: type: object advertiser_ids: type: array items: type: integer owner: type: object properties: type: type: string id: type: integer price: type: object properties: value: type: string currency_code: type: string entity_type: type: string deal_groups: type: array items: type: object strategies_count: type: integer invalid_deals: type: array items: type: object properties: deal: type: object properties: updated_on: nullable: true created_on: nullable: true id: type: integer name: type: string description: nullable: true supply_source_id: nullable: true sub_supply_source_id: nullable: true deal_identifier: nullable: true start_datetime: nullable: true end_datetime: nullable: true price: type: object properties: value: type: string currency_code: nullable: true price_type: nullable: true price_method: nullable: true status: nullable: true bill_type: nullable: true deal_type: nullable: true impressions: nullable: true channels: nullable: true publisher_id: nullable: true permissions: type: object properties: all_organizations: nullable: true organization_ids: nullable: true agency_ids: nullable: true advertiser_ids: nullable: true owner: type: object properties: type: nullable: true id: nullable: true entity_type: type: string deal_groups: type: array items: type: object strategies_count: type: integer validation_error: type: string meta: type: object properties: status: type: string '400': description: '* Programmatic guaranteed deals must have a fixed price * start_datetime is required and must match the dates in the " + name + " Programmatic Guaranteed agreement * ''start_datetime'' must be earlier than ''end_datetime'' * ''sub_supply_source_id'' is not necessary for this supply source * ''sub_supply_source_id'' is required for this supply source * This deal_identifier already exists * This supply source does not support programmatic guaranteed deals * Unauthorized to set ''permissions.all_organizations'' to true * Unauthorized to set this ''owner.type''' /bulk_create/deals: post: tags: - Private Marketplace Exchange (PMP-E) summary: 'Bulk Create Deal ' description: "Bulk Create Deal \nendpoint is /deals/v1.0/bulk_create/deals" operationId: Bulk-Create-Deal parameters: - $ref: '#/components/parameters/trait_jwtAuth_JWT' requestBody: content: application/json: schema: type: object description: "```\n{\n \"data\": [\n {\n \"updated_on\": \"2021-06-09T14:29:27+00:00\"\ ,\n \"created_on\": \"2021-04-12T13:22:35+00:00\",\n \"id\": 422839,\n \"name\"\ : \"UIA_Inventory_Test\",\n \"description\": null,\n \"supply_source_id\": 159,\n\ \ \"sub_supply_source_id\": null,\n \"deal_identifier\": \"2718951\",\n \"start_datetime\"\ : \"2021-04-12T13:22:15+00:00\",\n \"end_datetime\": \"2999-12-31T05:00:00+00:00\",\n \ \ \"price_type\": \"FIXED\",\n \"price_method\": \"CPM\",\n \"status\": true,\n\ \ \"bill_type\": \"EXCHANGE\",\n \"deal_type\": \"STANDARD\",\n \"impressions\"\ : null,\n \"channels\": [],\n \"publisher_id\": null,\n \"organization_id\":\ \ 100048,\n \"permissions\": {\n \"all_organizations\": false,\n \"organization_ids\"\ : [\n 100048\n ],\n \"agency_ids\": [],\n \"advertiser_ids\":\ \ []\n },\n \"owner\": {\n \"type\": \"ORGANIZATION\",\n \"id\": 100048\n\ \ },\n \"price\": {\n \"value\": \"0.0073\",\n \"currency_code\": \"\ USD\"\n },\n \"entity_type\": \"deal\",\n \"deal_groups\": [],\n \"strategies_count\"\ : 0\n },\n {\n \"updated_on\": \"2018-03-01T21:43:46+00:00\",\n \"created_on\"\ : \"2017-04-10T06:31:51+00:00\",\n \"id\": 177130,\n \"name\": \"pmp test\",\n \ \ \"description\": \"\",\n \"supply_source_id\": 218,\n \"sub_supply_source_id\"\ : null,\n \"deal_identifier\": \"MM2-8G3-K3D4\",\n \"start_datetime\": \"2017-04-10T07:31:28+00:00\"\ ,\n \"end_datetime\": \"2999-12-31T00:00:00+00:00\",\n \"price_type\": \"FLOOR\",\n\ \ \"price_method\": \"CPM\",\n \"status\": true,\n \"bill_type\": \"EXCHANGE\"\ ,\n \"deal_type\": \"STANDARD\",\n \"impressions\": null,\n \"channels\": null,\n\ \ \"publisher_id\": null,\n \"organization_id\": 100048,\n \"permissions\": {\n\ \ \"all_organizations\": false,\n \"organization_ids\": [],\n \"agency_ids\"\ : [],\n \"advertiser_ids\": [\n 176789\n ]\n },\n \"owner\"\ : {\n \"type\": \"ADVERTISER\",\n \"id\": 176789\n },\n \"price\": {\n\ \ \"value\": \"8.0000\",\n \"currency_code\": \"USD\"\n },\n \"entity_type\"\ : \"deal\",\n \"deal_groups\": [],\n \"strategies_count\": 0\n }\n ]\n}\n```" responses: '200': description: "```\n{\n \"data\": {\n \"created_deals\": [\n {\n \ \ \"updated_on\": \"2021-07-08T13:57:26+00:00\",\n \"created_on\":\ \ \"2021-07-08T13:57:26+00:00\",\n \"id\": 429599,\n \"name\"\ : \"hello\",\n \"description\": \"hello\",\n \"supply_source_id\"\ : 246,\n \"sub_supply_source_id\": null,\n \"deal_identifier\"\ : \"hello\",\n \"start_datetime\": \"2020-12-31T05:00:00+00:00\",\n \ \ \"end_datetime\": \"2999-12-31T05:00:00+00:00\",\n \"price_type\"\ : \"FLOOR\",\n \"price_method\": \"CPM\",\n \"status\": false,\n\ \ \"bill_type\": \"EXCHANGE\",\n \"deal_type\": \"STANDARD\"\ ,\n \"impressions\": 22,\n \"channels\": [\n \ \ {\n \"id\": 1,\n \"name\": \"Display\"\ ,\n \"pos\": 1,\n \"created_on\": \"2020-07-20T11:13:55.015407+00:00\"\ ,\n \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n \ \ },\n {\n \"id\": 2,\n \ \ \"name\": \"Mobile Web\",\n \"pos\": 2,\n \ \ \"created_on\": \"2020-07-20T11:13:55.015407+00:00\",\n \ \ \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n }\n \ \ ],\n \"publisher_id\": null,\n \"organization_id\":\ \ 100315,\n \"permissions\": {\n \"all_organizations\":\ \ false,\n \"organization_ids\": [\n 100315\n \ \ ],\n \"agency_ids\": [],\n \"advertiser_ids\"\ : []\n },\n \"owner\": {\n \"type\": \"ORGANIZATION\"\ ,\n \"id\": 100315\n },\n \"price\": {\n\ \ \"value\": \"1.3000\",\n \"currency_code\": \"EUR\"\ \n },\n \"entity_type\": \"deal\",\n \"deal_groups\"\ : [],\n \"strategies_count\": 0\n }\n ],\n \"invalid_deals\"\ : []\n },\n \"meta\": {\n \"status\": \"ok\"\n }\n}\n```" content: application/json: schema: type: object properties: data: type: object properties: bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Who will be billed for the deal default: EXCHANGE channels: type: array description: List of advertising channels associated with this deal items: type: object properties: id: type: integer description: Channel ID name: type: string description: Channel name created_on: type: string format: date-time deal_identifier: type: string description: ID used within a bid request to reference the deal maxLength: 255 deal_type: type: string enum: - PG - STANDARD description: deal_type is the type of deal. PG is for a Programmatic Guaranteed deal, and STANDARD is the only other value allowed default: STANDARD description: type: string description: Description of the deal maxLength: 4095 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time entity_type: type: string enum: - deal id: type: integer description: ID of the deal name: type: string description: Name of the deal maxLength: 255 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION permissions: type: object description: List of entities that are allowed to target this deal. 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 adevertisers part of organization X will cause a validation error. properties: advertiser_ids: type: array items: type: object agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: object price: type: object properties: currency_code: type: string description: 3-character ISO 1427 currency code default: USD value: type: string description: Maximum is $9,999,999.9999 price_method: type: string enum: - CPM description: CPM is the only acceptable value for now price_type: type: string enum: - FIXED - FLOOR description: 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) start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: Whether the deal is active default: true sub_supply_source_id: type: integer description: ID of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: Exchange providing the deal supply_source: type: object description: Supply source details properties: id: type: integer description: Supply source ID name: type: string description: Supply source name publisher_id: type: integer description: Publisher ID nullable: true publisher: type: object description: Publisher details properties: id: type: integer description: Publisher ID name: type: string description: Publisher name nullable: true strategies_count: type: integer description: Number of strategies targeting this deal organization_id: type: integer description: Organization ID that owns this deal impressions: type: integer description: Number of impressions nullable: true effective_status: type: string description: Current effective status of the deal enum: - ready - creating - ssp_status_mismatch - ssp_start_date_mismatch - ssp_end_date_mismatch - organization_contract_start_date_error - organization_contract_end_date_error - organization_inactive - agency_inactive - advertiser_inactive - campaign_inactive - campaign_start_date_error - campaign_end_date_error - campaign_pg_flag_error - strategy_inactive - strategy_start_date_error - strategy_end_date_error - strategy_pg_flag_error - strategy_concept_inactive - creative_inactive - deal_status_inactive - deal_start_date_error - deal_end_date_error - strategy_not_assigned severity: type: integer description: Severity level nullable: true deal_groups: type: array description: Deal groups associated with this deal items: type: object properties: id: type: integer description: Deal group ID name: type: string description: Deal group name updated_on: type: string format: date-time required: - name - owner - permissions - price - supply_source_id meta: type: object properties: status: type: string /bulk/deals: post: tags: - Private Marketplace Exchange (PMP-E) summary: Bulk Create or Update Deal description: "Bulk Create/Update Deal \nendpoint is /deals/v1.0/bulk/deals\nTo 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. " operationId: Bulk-Create-or-Update-Deal parameters: - $ref: '#/components/parameters/trait_jwtAuth_JWT' requestBody: content: application/json: schema: type: object description: "```\n{\n \"deals\": \n [\n {\n \"owner\": {\n \ \ \"type\": \"ORGANIZATION\",\n \"id\": 100315\n },\n \ \ \"price_method\": \"CPM\",\n \"deal_identifier\": \"Test_3\",\n \ \ \"name\": \"Test_3\",\n \"status\": true,\n \"start_datetime\": \"2022-06-01T05:00:00+00:00\"\ ,\n \"end_datetime\": \"2022-06-17T05:00:00+00:00\",\n \"channels\": [1],\n\ \ \"supply_source_id\": 246,\n \"permissions\": {\n \"\ organization_ids\": [100315],\n \"agency_ids\" :[],\n \"advertiser_ids\"\ :[]\n },\n \"price\": {\n \"value\": \"1.3\",\n \ \ \"currency_code\": \"EUR\"\n },\n \"deal_type\": \"PG\",\n \ \ \"price_type\": \"FIXED\"\n }\n ]\n}\n```\n\nfor update:\n\n```\n{\n \ \ \"deals\": \n [\n {\n \"id\": 457001,\n \"name\": \"Test_3_update\"\ ,\n \"status\": false\n }\n ]\n}\n```" responses: '200': description: "```\n{\n \"data\": {\n \"valid_deals\": [\n {\n \ \ \"updated_on\": \"2022-06-28T10:11:37+00:00\",\n \"created_on\": \"\ 2022-06-28T10:11:37+00:00\",\n \"id\": 457001,\n \"name\": \"\ Test_3\",\n \"description\": null,\n \"supply_source_id\": 246,\n\ \ \"sub_supply_source_id\": null,\n \"deal_identifier\": \"\ Test_3\",\n \"start_datetime\": \"2022-06-01T05:00:00+00:00\",\n \ \ \"end_datetime\": \"2022-06-17T05:00:00+00:00\",\n \"price_type\": \"\ FIXED\",\n \"price_method\": \"CPM\",\n \"status\": true,\n\ \ \"deal_type\": \"PG\",\n \"impressions\": null,\n \ \ \"channels\": [\n {\n \"id\": 1,\n \ \ \"name\": \"Display\",\n \"pos\": 1,\n \ \ \"created_on\": \"2020-07-20T11:13:55.015407+00:00\",\n \ \ \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n }\n \ \ ],\n \"publisher_id\": null,\n \"strategies_count\"\ : 0,\n \"organization_id\": 100315,\n \"effective_status\":\ \ \"creating\",\n \"severity\": null,\n \"api_version\": \"\ v2\",\n \"permissions\": {\n \"all_organizations\": false,\n\ \ \"organization_ids\": [\n 100315\n \ \ ],\n \"agency_ids\": [],\n \"advertiser_ids\"\ : []\n },\n \"owner\": {\n \"type\": \"ORGANIZATION\"\ ,\n \"id\": 100315\n },\n \"price\": {\n\ \ \"value\": \"1.3000\",\n \"currency_code\": \"EUR\"\ \n },\n \"entity_type\": \"deal\",\n \"deal_groups\"\ : [],\n \"publisher\": null\n }\n ],\n \"invalid_deals\"\ : []\n },\n \"meta\": {\n \"status\": \"ok\"\n }\n}\n```\n\nfor update:\n\ ```{\n \"data\": {\n \"valid_deals\": [\n {\n \"updated_on\"\ : \"2022-06-28T12:21:03+00:00\",\n \"created_on\": \"2022-06-28T12:20:05+00:00\"\ ,\n \"id\": 457226,\n \"name\": \"Test_DanTest_1_update\",\n\ \ \"description\": null,\n \"supply_source_id\": 246,\n \ \ \"sub_supply_source_id\": null,\n \"deal_identifier\": \"Test_DanTest_1\"\ ,\n \"start_datetime\": \"2022-06-01T05:00:00+00:00\",\n \"\ end_datetime\": \"2022-06-17T05:00:00+00:00\",\n \"price_type\": \"FIXED\"\ ,\n \"price_method\": \"CPM\",\n \"status\": false,\n \ \ \"deal_type\": \"PG\",\n \"impressions\": null,\n \ \ \"channels\": [\n {\n \"id\": 1,\n \ \ \"name\": \"Display\",\n \"pos\": 1,\n \ \ \"created_on\": \"2020-07-20T11:13:55.015407+00:00\",\n \ \ \"updated_on\": \"2020-07-20T11:13:55.015407+00:00\"\n }\n \ \ ],\n \"publisher_id\": null,\n \"strategies_count\"\ : 0,\n \"organization_id\": 100315,\n \"effective_status\":\ \ \"creating\",\n \"severity\": null,\n \"api_version\": \"\ v2\",\n \"permissions\": {\n \"all_organizations\": false,\n\ \ \"organization_ids\": [\n 100315\n \ \ ],\n \"agency_ids\": [],\n \"advertiser_ids\"\ : []\n },\n \"owner\": {\n \"type\": \"ORGANIZATION\"\ ,\n \"id\": 100315\n },\n \"price\": {\n\ \ \"value\": \"1.3000\",\n \"currency_code\": \"EUR\"\ \n },\n \"entity_type\": \"deal\",\n \"deal_groups\"\ : [],\n \"publisher\": null\n }\n ],\n \"invalid_deals\"\ : []\n },\n \"meta\": {\n \"status\": \"ok\"\n }\n}\n```" content: application/json: schema: type: object properties: data: type: object properties: valid_deals: type: array items: type: object properties: updated_on: type: string created_on: type: string id: type: integer name: type: string description: nullable: true supply_source_id: type: integer sub_supply_source_id: nullable: true deal_identifier: type: string start_datetime: type: string end_datetime: type: string price_type: type: string price_method: type: string status: type: boolean deal_type: type: string impressions: nullable: true channels: type: array items: type: object properties: id: type: integer name: type: string pos: type: integer created_on: type: string updated_on: type: string publisher_id: nullable: true strategies_count: type: integer organization_id: type: integer effective_status: type: string severity: nullable: true api_version: type: string permissions: type: object properties: all_organizations: type: boolean organization_ids: type: array items: type: integer agency_ids: type: array items: type: object advertiser_ids: type: array items: type: object owner: type: object properties: type: type: string id: type: integer price: type: object properties: value: type: string currency_code: type: string entity_type: type: string deal_groups: type: array items: type: object publisher: nullable: true invalid_deals: type: array items: type: object meta: type: object properties: status: type: string x-examples: example-1: 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 /bulk_create/publishers: post: tags: - Private Marketplace Exchange (PMP-E) summary: Bulk Create Publishers description: 'This allows you to add multiple publishers at one under the same organization id. Publishers Information about PMP-D from the MediaMath side can be found [here](https://support.infillion.com/article/s/article/PMP-Direct-Best-Practices) 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' operationId: Bulk-Create-Publishers parameters: - $ref: '#/components/parameters/trait_jwtAuth_JWT' requestBody: content: application/json: schema: type: object properties: organization_id: type: integer names: type: array items: type: string description: '`{"organization_id":100315, "names" : ["my name is..","my other name is"]}`' responses: '200': description: "```\n{\n \"data\": [\n {\n \"updated_on\": \"2021-07-08T14:08:06+00:00\"\ ,\n \"created_on\": \"2021-07-08T14:08:06+00:00\",\n \"id\": 514,\n \"name\"\ : \"my name is..\",\n \"organization_id\": 100315,\n \"last_touch_user_id\": 4254,\n\ \ \"deleted_on\": null\n },\n {\n \"updated_on\": \"2021-07-08T14:08:06+00:00\"\ ,\n \"created_on\": \"2021-07-08T14:08:06+00:00\",\n \"id\": 515,\n \"name\"\ : \"my other name is\",\n \"organization_id\": 100315,\n \"last_touch_user_id\"\ : 4254,\n \"deleted_on\": null\n }\n ],\n \"meta\": {\n \"status\": \"ok\"\n\ \ }\n}\n```" content: application/json: schema: type: object properties: meta: type: object properties: total_count: type: integer offset: type: integer count: type: integer status: type: string data: type: array items: type: object properties: id: type: integer organization_id: type: integer updated_on: type: string deleted_on: nullable: true name: type: string created_on: type: string last_touch_user_id: type: integer /deals/{id}/strategy_deals: get: tags: - Private Marketplace Exchange (PMP-E) summary: List Deal Strategies description: '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`' operationId: List-Deal-Strategies parameters: - name: id in: path description: See below required: true schema: type: number - name: sort_by in: query description: sort_by schema: type: string - name: with in: query description: with schema: type: string - name: page_offset in: query description: The list starts from the specified page offset schema: type: number - name: page_limit in: query description: Maximum list page element count schema: type: number - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: "{\n \"data\": [\n {\n \"id\": 852908478,\n \"entity_type\": \"strategy_deal\"\ \n },\n {\n \"id\": 852911871,\n \"entity_type\": \"strategy_deal\"\n },\n\ \ {\n \"id\": 852908409,\n \"entity_type\": \"strategy_deal\"\n },\n {\n\ \ \"id\": 852908397,\n \"entity_type\": \"strategy_deal\"\n }\n ],\n \"meta\"\ : {\n \"count\": 4,\n \"total_count\": 4,\n \"status\": \"ok\",\n \"offset\":\ \ 0\n }\n}" content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer entity_type: type: string enum: - strategy_deal meta: type: object properties: count: type: integer total_count: type: integer status: type: string enum: - ok offset: type: integer /deal_groups/{id}/strategy_deal_groups: get: tags: - Private Marketplace Exchange (PMP-E) summary: List Deal Group Strategies description: '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` ' operationId: List-deal-group-strategies parameters: - name: id in: path description: See below required: true schema: type: number - name: sort_by in: query description: sort_by schema: type: string - name: with in: query description: with schema: type: string - name: page_offset in: query description: The list starts from the specified page offset schema: type: number - name: page_limit in: query description: Maximum list page element count schema: type: number - $ref: '#/components/parameters/trait_jwtAuth_JWT' responses: '200': description: "```\n{\n \"data\": [\n {\n \"id\": 19744,\n \"entity_type\": \"\ strategy_deal_group\"\n },\n {\n \"id\": 19496,\n \"entity_type\": \"strategy_deal_group\"\ \n }\n ],\n \"meta\": {\n \"count\": 2,\n \"total_count\": 2,\n \"status\":\ \ \"ok\",\n \"offset\": 0\n }\n}\n```" content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer entity_type: type: string enum: - strategy_deal_group meta: type: object properties: count: type: integer total_count: type: integer status: type: string enum: - ok offset: type: integer tags: - name: Private Marketplace Exchange (PMP-E) description: Private Marketplace Direct (PMP-E) x-tests: {} servers: - url: https://api.mediamath.com/deals/v1.0 components: parameters: trait_jsonResponse_Accept: name: Accept in: header description: Accept required: false schema: type: string default: application/vnd.mediamath.v1+json trait_postHeader_Content-Type: name: Content-Type in: header description: Content-Type required: true schema: type: string default: application/json trait_cookieAuth_Cookie: name: Cookie in: header description: Cookie required: true schema: type: string default: adama_session=<> trait_jwtAuth_JWT: name: Authorization in: header description: Authorization schema: type: string default: Bearer $TOKEN trait_limit_page_limit: name: page_limit in: query description: page_limit required: false schema: type: integer minimum: 1 maximum: 100 trait_limit_page_offset: name: page_offset in: query description: Index of the first element in the collection to retrieve required: false schema: type: integer trait_querying_q: name: q in: query description: q required: false schema: type: string trait_returnAdditionalEntityProperties_full: name: full in: query description: To include all properties for all entities returned by the API call, use `full=*:` required: false schema: type: string default: '' trait_returnAdditionalEntityProperties_with: name: with in: query description: with required: false schema: type: string trait_sorting_sort_by: name: sort_by in: query description: name required: false schema: type: string securitySchemes: Bearer: type: apiKey name: Authorization in: header description: 'JWT token. Format: Bearer $TOKEN' schemas: create-deal: type: object title: Deal Fields (create) properties: bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Bill recipient when creating a deal x-examples: - EXCHANGE channels: type: array description: List of advertising channel IDs to associate with this deal (use GET /channels to see available channels) items: type: integer example: - 5 - 4 deal_identifier: type: string description: the identifier used within a bid request to reference the deal maxLength: 255 default: EXCHANGE deal_type: type: string enum: - PG - STANDARD description: 'When creating deal type `PG`, `price_type` must be set to `FIXED` and valid `start_datetime` and `end_datetime` must be present. ' default: STANDARD description: type: string description: the description of the deal maxLength: 4095 end_datetime: type: string description: '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.' format: date-time name: type: string description: the name of the deal maxLength: 255 owner: type: object description: 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. properties: id: type: integer type: type: string enum: - ADVERTISER - AGENCY - INTERNAL - ORGANIZATION permissions: type: object description: 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. properties: advertiser_ids: type: array items: type: integer agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: integer required: - all_organizations price: type: object description: price floor or fixed value to use in auction along with the associated currency code properties: currency_code: type: string description: 3-character currency code minLength: 3 maxLength: 3 default: USD value: type: string description: $9,999,999.9999 maximum price_method: type: string enum: - CPM description: only CPM cost accrual is supported default: CPM price_type: type: string enum: - FIXED - FLOOR description: 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 start_datetime: type: string description: '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.' format: date-time status: type: boolean description: If the deal is active default: true sub_supply_source_id: type: integer description: the id of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: the exchange providing the deal publisher_id: type: integer description: the publisher id (optional) nullable: true required: - name - owner - permissions - price - supply_source_id update-deal: type: object title: Deal Fields (update) properties: bill_type: type: string enum: - EXCHANGE - NONE - PUBLISHER description: Bill recipient when creating a deal default: EXCHANGE channels: type: array description: List of advertising channel IDs to associate with this deal (use GET /channels to see available channels) items: type: integer example: - 5 - 4 deal_identifier: type: string description: the identifier used within a bid request to reference the deal maxLength: 255 deal_type: type: string enum: - PG - STANDARD description: '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 description: type: string description: the description of the deal maxLength: 4095 end_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time name: type: string description: the name of the deal maxLength: 255 permissions: type: object description: 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. properties: advertiser_ids: type: array items: type: integer agency_ids: type: array items: type: integer all_organizations: type: boolean organization_ids: type: array items: type: integer required: - all_organizations price: type: object description: price floor or fixed value to use in auction along with the associated currency code properties: currency_code: type: string description: 3-letter currency code minLength: 3 maxLength: 3 value: type: string description: Maximum is $9,999,999.9999 price_type: type: string enum: - FIXED - FLOOR description: 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) start_datetime: type: string description: 'string / timestamp as full RFC 3339 date strings including timezone offsets: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS-##:##' format: date-time status: type: boolean description: whether the deal is active default: true sub_supply_source_id: type: integer description: the id of the publisher if the supply_source_id is set to 83 (BidSwitch) nullable: true supply_source_id: type: integer description: the exchange providing the deal publisher_id: type: integer description: the publisher id (optional) nullable: true