{"openapi":"3.0.3","info":{"title":"Relay","description":"","contact":{"name":"jgrimes"},"license":{"name":""},"version":"0.1.0"},"servers":[{"url":"https://api.relay.bid/m/v1","description":"Production api"}],"paths":{"/channel":{"get":{"tags":["crate"],"operationId":"list_channels","parameters":[{"name":"a","in":"query","description":"Account ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"List of all Distribution Channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelListOutput"}}}},"404":{"description":"Demand Source was not found."}}},"post":{"tags":["channel_handlers"],"operationId":"create_channel","requestBody":{"description":"Channel to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelForm"}}},"required":true},"responses":{"200":{"description":"Channel stored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelOutput"}}}}}}},"/channel/{channel_id}":{"get":{"tags":["crate"],"operationId":"get_channel","parameters":[{"name":"a","in":"query","description":"Account ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"channel_id","in":"path","description":"Distribution Channel ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Distribution Channel found successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelOutput"}}}},"404":{"description":"Distribution Channel was not found."}}}},"/channel/{channel_id}/demand/{demand_id}":{"put":{"tags":["channel_handlers"],"operationId":"put_channel_demand","parameters":[{"name":"channel_id","in":"path","description":"Distribution Channel ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"demand_id","in":"path","description":"Demand ID to associated with the Distribution Channel.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Demand associated to Distribution Channel successfully"}},"security":[]}},"/channel/{channel_id}/placement/{placement_id}":{"put":{"tags":["channel_handlers"],"operationId":"put_channel_placement","parameters":[{"name":"channel_id","in":"path","description":"Distribution Channel ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"placement_id","in":"path","description":"Placement ID to associated with the Distribution Channel.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Placement associated to Distribution Channel successfully"}}},"delete":{"tags":["channel_handlers"],"operationId":"delete_channel_placement","parameters":[{"name":"channel_id","in":"path","description":"Distribution Channel ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"placement_id","in":"path","description":"Placement ID to be disassociated with the Distribution Channel.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Placement disassociated from Distribution Channel successfully"}}}},"/demand_source":{"get":{"tags":["crate"],"operationId":"list_demand_sources","parameters":[{"name":"a","in":"query","description":"Account ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"List of all Demand Sources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemandSourceListOutput"}}}},"404":{"description":"Demand Source was not found."}}},"post":{"tags":["demand_source_handlers"],"operationId":"update_demand_source","requestBody":{"description":"Updated Demand Source body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemandSourceForm"}}},"required":true},"responses":{"200":{"description":"Demand Source stored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemandSourceOutput"},"example":{"id":"000","account_id":"000","name":"asdf","config":"sasf","demand_partner_id":"asdf","enabled":"asdf"}}}}}}},"/demand_source/{demand_source_id}":{"get":{"tags":["crate"],"operationId":"get_demand_source","parameters":[{"name":"a","in":"query","description":"Account ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}},{"name":"demand_source_id","in":"path","description":"Demand Source ID","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Demand Source found successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DemandSourceOutput"}}}},"404":{"description":"Demand Source was not found."}}}},"/placement":{"get":{"tags":["crate"],"operationId":"list_placement","parameters":[{"name":"a","in":"query","description":"Account ID","required":true,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"description":"List of all Placements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementListOutput"}}}}}},"post":{"tags":["placement_handlers"],"operationId":"create_placement","requestBody":{"description":"Placement to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementForm"}}},"required":true},"responses":{"200":{"description":"Placement stored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementOutput"}}}}}}},"/placement/{placement_id}":{"put":{"tags":["placement_handlers"],"operationId":"update_placement","parameters":[{"name":"placement_id","in":"path","description":"Placement ID","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Placement to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementForm"}}},"required":true},"responses":{"200":{"description":"Placement stored successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementOutput"}}}}}}},"/placement/{placement_id}/demand/{demand_id}":{"put":{"tags":["placement_handlers"],"operationId":"put_placement_demand","parameters":[{"name":"placement_id","in":"path","description":"Distribution Channel ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"demand_id","in":"path","description":"Demand ID to associated with the Distribution Channel.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Demand associated to Placement successfully"}}},"delete":{"tags":["placement_handlers"],"operationId":"delete_placement_demand","parameters":[{"name":"placement_id","in":"path","description":"Placement ID","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"demand_id","in":"path","description":"Demand ID to associated with the Placement.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Demand associated to Placement successfully"},"404":{"description":"One of the Placement or Demand was not found."}}}},"/report":{"post":{"tags":["crate"],"summary":"Report Generation","description":"Report Generation\n\nThe submit_delivery_report endpoint generates a report from impression and request data. These\nreports are aggregated into discrete buckets of time, and are grouped by a subset of their\nfields called dimensions. Data from fired impressions, alongside requests made to the exchange\nserver and requests that the exchange server makes, are collated to create the reports returned\nby this endpoint.\n\nThe body of this request is broken up into roughly four conceptual parts, made up of six top\nlevel fields.\n\n## Time Range fields:\n\nThese include `start_date`, `end_date`, and `time_group`. The start and end dates, which take\nthe format `%Y-%m-%d %H:%M:%S` determine the start and end of the time range the report will be\ngenerated for. `time_group` represents how the report should partition the time.\n\nFor example: a `start_date` of \"2023-09-20 05:00:00\", an `end_date` of \"2023-09-22 05:00:00\",\nand a `time_group` of `hour` will return 48 sets of values for the metrics and dimensions\nrequested. But if the `time_group` is changed to `day`, only 2 collections will be returned.\n\n## Dimensions\n\nRepresented by the `dimensions` key, Dimensions are any field on the report which, when taken\ntogether, identify the data that [metrics](#metrics) should be aggregated over. For (an\nincomplete) example, if the supply_id, placement_id, domain, and country_code are all shared\nbetween two reports, the [metrics](#metrics) from those reports will be aggregated together.\n\nThe list of dimensions passed in through the `dimensions` key represents which of the\npreviously described dimensions to include in the returned report(s).\n\n## Metrics\n\nMetrics are data aggregated across multiple chunks of reporting data for a given time period\nand set of matching dimensions. Some examples of metrics over the given time period, and\nmatching dimensions include:\n\n* number of outbound bid requests\n* number of outbound bid responses\n* number of inbound bid requests\n* number of impressions\n* avg bid price\n* revenue\n\nThese metrics are aggregated differently depending on their type. {outbound | inbound} bid\n{requests| responses}, and impressions are simple sums; avg bid price is an average taken across the queried\ntime period; revenue is the aggregation of impressions multiplied by their bid prices.\n\nThe `metrics` field in this request is a list of which of these Metrics to include in the\ngenerated report(s).\n\n## Filters\n> 📘 Info\n>\n> Filters apply *positively*, meaning that any report which matches an expression _WILL BE INCLUDED_.\n\nThe `filters` field is an optional, user defined query that determines which data to\ninclude in the report and to aggregate over. The value of `filters` deserves some special\nattention.\n\nAt the top level, `filters` is an array of similarly structured query objects which represent\nconditions . A simple example\nof a query object might be:\n\n```json\n{\n\"domain\": {\n\"in\": [\n\"example.com\",\n\"kevel.com\"\n]\n}\n}\n```\nSince reports which positively match the given filters _are included_ this filter will cause the\nreport which have domains equal to either \"example.com\" or \"kevel.com\" to be included. In this\nexample, `domain` could have been any Dimension. The value corresponding to this is always\ngoing to be in the form `{operation: value(s)}`. The `operation`s all compare the value of the\ndimension in the report to literal(s) given in `value(s)`. The operations include:\n\n- \"eq\": equal to (takes a single literal)\n- \"lt\": less than (takes a single literal)\n- \"gt\": greater than (takes a single literal)\n- \"lte\": less than or equal to (takes a single literal)\n- \"gte\": greater than or equal to (takes a single literal)\n- \"in\": contained within a list of literals (takes a list of literals)\n\nThese `operation: value` pairs can also be combined. The desired `{dimension: {domain: value(s)}}` objects\ncan be wrapped in the logical operators \"or\" and \"and\". These top level keys take, as values, a\nlist of query objects. In the case of \"or\", if any of the queries match, the data will be\nincluded; In the case of \"and\", they all must match. Right now, \"or\" is much more useful, since\n\"and\" is the default behavior of having multiple `{domain: value}` pairs.\n\nAn example of using these logical operators might look like:\n```json\n{\n\"or\": [\n{\n\"country_code\": {\n\"in\": [\n1,\n44,\n351,\n852\n]\n}\n},\n{\n\"domain\": {\n\"in\": [\n\"example.com\",\n\"kevel.com\"\n]\n}\n}\n]\n}\n```","operationId":"submit_delivery_report","parameters":[{"name":"a","in":"query","description":"Org ID","required":true,"schema":{"type":"string"}},{"name":"supply_id","in":"query","description":"Supply ID","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Reporting query to run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportParameters"}}},"required":true},"responses":{"200":{"description":"Generated report response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}}}}}},"components":{"schemas":{"AppForm":{"type":"object","properties":{"cat":{"type":"array","items":{"type":"string"},"nullable":true},"domain":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}}},"AppListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"AppOutput":{"type":"object","required":["id"],"properties":{"cat":{"type":"array","items":{"type":"string"},"nullable":true},"domain":{"type":"string","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true}}},"AudioPlacementForm":{"type":"object","required":["playmethod","mime","api","ctype","rqddurs","delivery","comp","comptype","overlayexpdir","ext"],"properties":{"api":{"type":"object"},"comp":{"type":"object"},"comptype":{"type":"object"},"ctype":{"type":"object"},"delay":{"type":"integer","format":"int32","nullable":true},"delivery":{"type":"object"},"ext":{"type":"object"},"feed":{"type":"integer","format":"int32","nullable":true},"maxbitr":{"type":"integer","format":"int32","nullable":true},"maxdur":{"type":"integer","format":"int32","nullable":true},"maxext":{"type":"integer","format":"int32","nullable":true},"maxseq":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"minbitr":{"type":"integer","format":"int32","nullable":true},"mincpmpersec":{"type":"number","format":"double","nullable":true},"mindur":{"type":"integer","format":"int32","nullable":true},"nvol":{"type":"integer","format":"int32","nullable":true},"overlayexpdir":{"type":"object"},"placement_id":{"type":"string","format":"uuid","nullable":true},"playend":{"type":"integer","format":"int32","nullable":true},"playmethod":{"type":"object"},"poddur":{"type":"integer","format":"int32","nullable":true},"podseq":{"type":"integer","format":"int32","nullable":true},"rqddurs":{"type":"object"},"skip":{"type":"integer","format":"int32","nullable":true},"skipafter":{"type":"integer","format":"int32","nullable":true},"skipmin":{"type":"integer","format":"int32","nullable":true},"slotinpod":{"type":"integer","format":"int32","nullable":true}}},"AudioPlacementListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"AudioPlacementOutput":{"type":"object","required":["id","placement_id","playmethod","mime","api","ctype","rqddurs","delivery","comp","comptype","overlayexpdir","ext"],"properties":{"api":{"type":"object"},"comp":{"type":"object"},"comptype":{"type":"object"},"ctype":{"type":"object"},"delay":{"type":"integer","format":"int32","nullable":true},"delivery":{"type":"object"},"ext":{"type":"object"},"feed":{"type":"integer","format":"int32","nullable":true},"id":{"type":"string","format":"uuid"},"maxbitr":{"type":"integer","format":"int32","nullable":true},"maxdur":{"type":"integer","format":"int32","nullable":true},"maxext":{"type":"integer","format":"int32","nullable":true},"maxseq":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"minbitr":{"type":"integer","format":"int32","nullable":true},"mincpmpersec":{"type":"number","format":"double","nullable":true},"mindur":{"type":"integer","format":"int32","nullable":true},"nvol":{"type":"integer","format":"int32","nullable":true},"overlayexpdir":{"type":"object"},"placement_id":{"type":"string","format":"uuid"},"playend":{"type":"integer","format":"int32","nullable":true},"playmethod":{"type":"object"},"poddur":{"type":"integer","format":"int32","nullable":true},"podseq":{"type":"integer","format":"int32","nullable":true},"rqddurs":{"type":"object"},"skip":{"type":"integer","format":"int32","nullable":true},"skipafter":{"type":"integer","format":"int32","nullable":true},"skipmin":{"type":"integer","format":"int32","nullable":true},"slotinpod":{"type":"integer","format":"int32","nullable":true}}},"ChannelForm":{"allOf":[{"oneOf":[{"type":"object","required":["site"],"properties":{"site":{"$ref":"#/components/schemas/SiteForm"}}},{"type":"object","required":["app"],"properties":{"app":{"$ref":"#/components/schemas/AppForm"}}},{"type":"object","required":["device"],"properties":{"device":{"$ref":"#/components/schemas/DoohForm"}}}]},{"type":"object","properties":{"bidfloor":{"type":"number","format":"double","nullable":true},"enabled":{"type":"boolean","nullable":true}}}]},"ChannelListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"ChannelOutput":{"type":"object","required":["id"],"properties":{"app":{"allOf":[{"$ref":"#/components/schemas/AppOutput"}],"nullable":true},"bidfloor":{"type":"number","format":"double","nullable":true},"device":{"allOf":[{"$ref":"#/components/schemas/DoohOutput"}],"nullable":true},"enabled":{"type":"boolean","nullable":true},"id":{"type":"string","format":"uuid"},"site":{"allOf":[{"$ref":"#/components/schemas/SiteOutput"}],"nullable":true}}},"ColumnOrSubQuery":{"oneOf":[{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FilterVal"}}},{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ColumnOrSubQuery"}}}]},"DemandForm":{"type":"object","required":["enabled","demand_source_id","config_values"],"properties":{"config_values":{"type":"object"},"demand_source_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"}}},"DemandListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DemandOutput":{"type":"object","required":["id","demand_source_id","config_values","enabled"],"properties":{"config_values":{"type":"object"},"demand_source_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"id":{"type":"string","format":"uuid"}}},"DemandPartnerListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DemandPartnerOutput":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"DemandSourceForm":{"type":"object","required":["name","demand_partner_id","enabled"],"properties":{"config":{"type":"object","description":"JSON defining the configuration values for this Demand Source.","nullable":true},"demand_partner_id":{"type":"string","format":"uuid","description":"Demand Partner Id that this Demand Source refers to."},"enabled":{"type":"boolean","description":"Is this Demand Source enabled (e.g. should Relay send requests to it or not)"},"name":{"type":"string","description":"Name of the Demand Source."}}},"DemandSourceListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DemandSourceOutput":{"type":"object","required":["id","account_id","name","demand_partner_id","enabled"],"properties":{"account_id":{"type":"string","format":"uuid"},"config":{"type":"object","nullable":true},"demand_partner_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"Dimensions":{"type":"string","enum":["demand_source_id","supply_id","channel_id","placement_id","domain","country_code","demand_id","bidder"]},"DisplayFormatForm":{"type":"object","properties":{"h":{"type":"integer","format":"int32","nullable":true},"w":{"type":"integer","format":"int32","nullable":true}}},"DisplayFormatListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DisplayFormatOutput":{"type":"object","required":["id"],"properties":{"h":{"type":"integer","format":"int32","nullable":true},"id":{"type":"string","format":"uuid"},"w":{"type":"integer","format":"int32","nullable":true}}},"DisplayPlacementForm":{"type":"object","required":["mime","api","ctype","ext"],"properties":{"ampren":{"type":"integer","format":"int32","nullable":true},"api":{"type":"object"},"clktype":{"type":"integer","format":"int32","nullable":true},"context":{"type":"integer","format":"int32","nullable":true},"ctype":{"type":"object"},"displayfmt":{"type":"array","items":{"$ref":"#/components/schemas/DisplayFormatForm"},"nullable":true},"ext":{"type":"object"},"h":{"type":"integer","format":"int32","nullable":true},"ifrbust":{"type":"integer","format":"int32","nullable":true},"instl":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"placement_id":{"type":"string","format":"uuid","nullable":true},"pos":{"type":"integer","format":"int32","nullable":true},"priv":{"type":"integer","format":"int32","nullable":true},"ptype":{"type":"integer","format":"int32","nullable":true},"topframe":{"type":"integer","format":"int32","nullable":true},"unit":{"type":"integer","format":"int32","nullable":true},"w":{"type":"integer","format":"int32","nullable":true}}},"DisplayPlacementListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DisplayPlacementOutput":{"type":"object","required":["id","placement_id","mime","api","ctype","ext"],"properties":{"ampren":{"type":"integer","format":"int32","nullable":true},"api":{"type":"object"},"clktype":{"type":"integer","format":"int32","nullable":true},"context":{"type":"integer","format":"int32","nullable":true},"ctype":{"type":"object"},"displayfmt":{"type":"array","items":{"$ref":"#/components/schemas/DisplayFormatOutput"},"nullable":true},"ext":{"type":"object"},"h":{"type":"integer","format":"int32","nullable":true},"id":{"type":"string","format":"uuid"},"ifrbust":{"type":"integer","format":"int32","nullable":true},"instl":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"placement_id":{"type":"string","format":"uuid"},"pos":{"type":"integer","format":"int32","nullable":true},"priv":{"type":"integer","format":"int32","nullable":true},"ptype":{"type":"integer","format":"int32","nullable":true},"topframe":{"type":"integer","format":"int32","nullable":true},"unit":{"type":"integer","format":"int32","nullable":true},"w":{"type":"integer","format":"int32","nullable":true}}},"DoohForm":{"type":"object","properties":{"dpi":{"type":"integer","format":"int32","nullable":true},"etime":{"type":"integer","format":"int32","nullable":true},"fixed":{"type":"integer","format":"int32","nullable":true},"name":{"type":"string","nullable":true},"venue":{"type":"integer","format":"int32","nullable":true}}},"DoohListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"DoohOutput":{"type":"object","required":["id"],"properties":{"dpi":{"type":"integer","format":"int32","nullable":true},"etime":{"type":"integer","format":"int32","nullable":true},"fixed":{"type":"integer","format":"int32","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"venue":{"type":"integer","format":"int32","nullable":true}}},"FilterConst":{"oneOf":[{"type":"number","format":"double"},{"type":"string"},{"type":"string","format":"uuid"}]},"FilterVal":{"oneOf":[{"$ref":"#/components/schemas/FilterConst"},{"type":"array","items":{"$ref":"#/components/schemas/FilterConst"}}]},"Metrics":{"type":"string","enum":["outbound_bid_requests","outbound_bid_responses","inbound_bid_requests","user_matched_outbound_bid_requests","filtered_outbound_bid_requests","avg_bid_price","revenue","impressions"]},"PlacementForm":{"type":"object","required":["tagid"],"properties":{"audio":{"allOf":[{"$ref":"#/components/schemas/AudioPlacementForm"}],"nullable":true},"bidfloor":{"type":"number","format":"double","nullable":true},"display":{"allOf":[{"$ref":"#/components/schemas/DisplayPlacementForm"}],"nullable":true},"enabled":{"type":"boolean","nullable":true},"sdk":{"type":"string","nullable":true},"sdkver":{"type":"string","nullable":true},"secure":{"type":"integer","format":"int32","nullable":true},"tagid":{"type":"string"},"video":{"allOf":[{"$ref":"#/components/schemas/VideoPlacementForm"}],"nullable":true},"wlang":{"type":"array","items":{"type":"string"},"nullable":true}}},"PlacementListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"PlacementOutput":{"type":"object","required":["id","account_id","tagid"],"properties":{"account_id":{"type":"string","format":"uuid"},"audio":{"allOf":[{"$ref":"#/components/schemas/AudioPlacementOutput"}],"nullable":true},"bidfloor":{"type":"number","format":"double","nullable":true},"display":{"allOf":[{"$ref":"#/components/schemas/DisplayPlacementOutput"}],"nullable":true},"enabled":{"type":"boolean","nullable":true},"id":{"type":"string","format":"uuid"},"sdk":{"type":"string","nullable":true},"sdkver":{"type":"string","nullable":true},"secure":{"type":"integer","format":"int32","nullable":true},"tagid":{"type":"string"},"video":{"allOf":[{"$ref":"#/components/schemas/VideoPlacementOutput"}],"nullable":true},"wlang":{"type":"array","items":{"type":"string"},"nullable":true}}},"Report":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/ReportRow"}}}},"ReportParameters":{"type":"object","required":["start_date","end_date","time_group","dimensions","filters","metrics"],"properties":{"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/Dimensions"}},"end_date":{"type":"string","format":"date-time"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/ColumnOrSubQuery"},"default":[{"or":[{"country_code":{"in":[1,44,351,852]}},{"domain":{"in":["example.com","kevel.com"]}}]}]},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/Metrics"}},"start_date":{"type":"string","format":"date-time"},"time_group":{"$ref":"#/components/schemas/TimeGroup"}}},"ReportRow":{"type":"object","properties":{"bidder":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"domain":{"type":"string","nullable":true},"impressions":{"type":"integer","format":"int64","nullable":true},"inbound_bid_requests":{"type":"integer","format":"int64","nullable":true},"outbound_bid_requests":{"type":"integer","format":"int64","nullable":true},"outbound_bid_responses":{"type":"integer","format":"int64","nullable":true},"revenue":{"type":"number","format":"double","nullable":true}}},"SiteForm":{"type":"object","required":["domain"],"properties":{"amp":{"type":"integer","format":"int32","nullable":true},"cat":{"type":"array","items":{"type":"string"},"nullable":true},"cattax":{"type":"integer","format":"int32","nullable":true},"domain":{"type":"string"},"mobile":{"type":"integer","format":"int32","nullable":true},"name":{"type":"string","nullable":true},"privpolicy":{"type":"integer","format":"int32","nullable":true}}},"SiteListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"SiteOutput":{"type":"object","required":["id","domain"],"properties":{"amp":{"type":"integer","format":"int32","nullable":true},"cat":{"type":"array","items":{"type":"string"},"nullable":true},"cattax":{"type":"integer","format":"int32","nullable":true},"domain":{"type":"string"},"id":{"type":"string","format":"uuid"},"mobile":{"type":"integer","format":"int32","nullable":true},"name":{"type":"string","nullable":true},"privpolicy":{"type":"integer","format":"int32","nullable":true}}},"SubQueryType":{"type":"string","enum":["or","and"]},"SupplyForm":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"SupplyListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"SupplyOutput":{"type":"object","required":["id","name","enabled"],"properties":{"enabled":{"type":"boolean"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"TimeGroup":{"type":"string","enum":["hour","day","week","month","total"]},"VideoPlacementForm":{"type":"object","required":["playmethod","mime","api","ctype","rqddurs","delivery","comp","comptype","expdir","overlayexpdir","ext"],"properties":{"api":{"type":"object"},"boxing":{"type":"integer","format":"int32","nullable":true},"clktype":{"type":"integer","format":"int32","nullable":true},"comp":{"type":"object"},"comptype":{"type":"object"},"ctype":{"type":"object"},"delay":{"type":"integer","format":"int32","nullable":true},"delivery":{"type":"object"},"expdir":{"type":"object"},"ext":{"type":"object"},"h":{"type":"integer","format":"int32","nullable":true},"linear":{"type":"integer","format":"int32","nullable":true},"maxbitr":{"type":"integer","format":"int32","nullable":true},"maxdur":{"type":"integer","format":"int32","nullable":true},"maxext":{"type":"integer","format":"int32","nullable":true},"maxseq":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"minbitr":{"type":"integer","format":"int32","nullable":true},"mincpmpersec":{"type":"number","format":"double","nullable":true},"mindur":{"type":"integer","format":"int32","nullable":true},"overlayexpdir":{"type":"object"},"placement_id":{"type":"string","format":"uuid","nullable":true},"playend":{"type":"integer","format":"int32","nullable":true},"playmethod":{"type":"object"},"poddur":{"type":"integer","format":"int32","nullable":true},"podseq":{"type":"integer","format":"int32","nullable":true},"pos":{"type":"integer","format":"int32","nullable":true},"rqddurs":{"type":"object"},"skip":{"type":"integer","format":"int32","nullable":true},"skipafter":{"type":"integer","format":"int32","nullable":true},"skipmin":{"type":"integer","format":"int32","nullable":true},"slotinpod":{"type":"integer","format":"int32","nullable":true},"unit":{"type":"integer","format":"int32","nullable":true},"w":{"type":"integer","format":"int32","nullable":true}}},"VideoPlacementListOutput":{"type":"object","required":["page","page_size","total_pages","total_items"],"properties":{"items":{"type":"object","description":"List of items.","required":["items"],"properties":{"items":{"type":"object","required":["id","name","bidder_name"],"properties":{"alias_demand_partner_id":{"type":"string","format":"uuid","nullable":true},"bidder_name":{"type":"string"},"config_json_schema":{"type":"object","nullable":true},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}}}},"page":{"type":"integer","format":"int64","minimum":0},"page_size":{"type":"integer","format":"int64","minimum":0},"total_items":{"type":"integer","format":"int64","minimum":0},"total_pages":{"type":"integer","format":"int64","minimum":0}}},"VideoPlacementOutput":{"type":"object","required":["id","placement_id","playmethod","mime","api","ctype","rqddurs","delivery","comp","comptype","expdir","overlayexpdir","ext"],"properties":{"api":{"type":"object"},"boxing":{"type":"integer","format":"int32","nullable":true},"clktype":{"type":"integer","format":"int32","nullable":true},"comp":{"type":"object"},"comptype":{"type":"object"},"ctype":{"type":"object"},"delay":{"type":"integer","format":"int32","nullable":true},"delivery":{"type":"object"},"expdir":{"type":"object"},"ext":{"type":"object"},"h":{"type":"integer","format":"int32","nullable":true},"id":{"type":"string","format":"uuid"},"linear":{"type":"integer","format":"int32","nullable":true},"maxbitr":{"type":"integer","format":"int32","nullable":true},"maxdur":{"type":"integer","format":"int32","nullable":true},"maxext":{"type":"integer","format":"int32","nullable":true},"maxseq":{"type":"integer","format":"int32","nullable":true},"mime":{"type":"object"},"minbitr":{"type":"integer","format":"int32","nullable":true},"mincpmpersec":{"type":"number","format":"double","nullable":true},"mindur":{"type":"integer","format":"int32","nullable":true},"overlayexpdir":{"type":"object"},"placement_id":{"type":"string","format":"uuid"},"playend":{"type":"integer","format":"int32","nullable":true},"playmethod":{"type":"object"},"poddur":{"type":"integer","format":"int32","nullable":true},"podseq":{"type":"integer","format":"int32","nullable":true},"pos":{"type":"integer","format":"int32","nullable":true},"rqddurs":{"type":"object"},"skip":{"type":"integer","format":"int32","nullable":true},"skipafter":{"type":"integer","format":"int32","nullable":true},"skipmin":{"type":"integer","format":"int32","nullable":true},"slotinpod":{"type":"integer","format":"int32","nullable":true},"unit":{"type":"integer","format":"int32","nullable":true},"w":{"type":"integer","format":"int32","nullable":true}}}},"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-relay-secret"}}},"security":[{"api_key":[]}],"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}