{"components":{"callbacks":{},"examples":{},"headers":{},"links":{},"parameters":{"AccountIdHeaderOptional":{"description":"The identifier of an Amazon Ads Advertiser Account.","in":"header","name":"Amazon-Ads-AccountId","schema":{"type":"string"}},"ClientIdHeader":{"description":"The identifier of a client associated with a \u0027Login with Amazon\u0027 account.","in":"header","name":"Amazon-Ads-ClientId","required":true,"schema":{"type":"string"}},"ManagerAccountIdHeaderOptional":{"description":"The identifier of an Amazon Ads Manager Account.","in":"header","name":"Amazon-Ads-Manager-AccountId","schema":{"type":"string"}}},"requestBodies":{},"responses":{},"schemas":{"AdProduct":{"description":"**AdProduct Enum:**\n| AdProduct | Description |\n| --- | --- |\n| `AMAZON_DSP` | Amazon Demand-Side Platform ad product. |","enum":["AMAZON_DSP"],"type":"string"},"BadGatewayResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"BadRequestResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ContentTooLargeResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"CurrencyCode":{"description":"**CurrencyCode Enum:**\n| CurrencyCode | Description |\n| --- | --- |\n| `AED` | United Arab Emirates Dirham |\n| `AUD` | Australian Dollar |\n| `BRL` | Brazilian Real |\n| `CAD` | Canadian Dollar |\n| `CNY` | Chinese Yuan |\n| `EUR` | Euro |\n| `GBP` | British Pound Sterling |\n| `INR` | Indian Rupee |\n| `JPY` | Japanese Yen |\n| `MXN` | Mexican Peso |\n| `SAR` | Saudi Riyal |\n| `SEK` | Swedish Krona |\n| `SGD` | Singapore Dollar |\n| `TRY` | Turkish Lira |\n| `USD` | United States Dollar |","enum":["AED","AUD","BRL","CAD","CNY","EUR","GBP","INR","JPY","MXN","SAR","SEK","SGD","TRY","USD"],"type":"string"},"DealPlanningMetrics":{"properties":{"adProduct":{"$ref":"#/components/schemas/AdProduct"},"advertisingDealId":{"description":"Reference to the associated advertising deal.","type":"string"},"clickThroughRate":{"description":"Rate of delivered ad impressions that users clicked on.","format":"double","type":"number"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"dealPlanningMetricsId":{"description":"A unique identifier for the planning metrics record.","type":"string"},"effectiveCPM":{"description":"Effective CPM actually cleared for impressions.","format":"double","type":"number"},"measuredRate":{"description":"Rate of impressions that were measurable for viewability.","format":"double","type":"number"},"videoCompletionRate":{"description":"Rate of video ad views that were viewed to completion (video end).","format":"double","type":"number"},"viewRate":{"description":"Rate of ad impressions that were measured as viewable.","format":"double","type":"number"},"viewableCPM":{"description":"Average CPM actually cleared for impressions that were deemed in view.","format":"double","type":"number"}},"required":["adProduct","advertisingDealId","dealPlanningMetricsId"],"type":"object"},"DealPlanningMetricsAdProductFilter":{"properties":{"include":{"description":"**AdProduct Enum:**\n| AdProduct | Description |\n| --- | --- |\n| `AMAZON_DSP` | Amazon Demand-Side Platform ad product. |","items":{"$ref":"#/components/schemas/AdProduct"},"maxItems":1,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealPlanningMetricsAdvertisingDealIdFilter":{"properties":{"include":{"items":{"type":"string"},"maxItems":10000,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealPlanningMetricsClickThroughRateFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"DealPlanningMetricsCurrencyCodeFilter":{"properties":{"include":{"description":"**Currency Enum:**\n| Currency | Description |\n| --- | --- |\n| `AED` | United Arab Emirates Dirham |\n| `AUD` | Australian Dollar |\n| `BRL` | Brazilian Real |\n| `CAD` | Canadian Dollar |\n| `CNY` | Chinese Yuan |\n| `EUR` | Euro |\n| `GBP` | British Pound Sterling |\n| `INR` | Indian Rupee |\n| `JPY` | Japanese Yen |\n| `MXN` | Mexican Peso |\n| `SAR` | Saudi Riyal |\n| `SEK` | Swedish Krona |\n| `SGD` | Singapore Dollar |\n| `TRY` | Turkish Lira |\n| `USD` | United States Dollar |","items":{"$ref":"#/components/schemas/CurrencyCode"},"maxItems":1,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealPlanningMetricsEffectiveCPMFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"DealPlanningMetricsMeasuredRateFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"DealPlanningMetricsSortOption":{"properties":{"by":{"$ref":"#/components/schemas/DealPlanningMetricsSortOptionsFields"},"direction":{"$ref":"#/components/schemas/SortDirection"}},"required":["by"],"type":"object"},"DealPlanningMetricsSortOptionsFields":{"description":"Specify which field to order by.\n| Field Name | Supported Ordering |\n| --- | --- |\n| clickThroughRate | ASCENDING,DESCENDING |\n| effectiveCPM | ASCENDING,DESCENDING |\n| measuredRate | ASCENDING,DESCENDING |\n| videoCompletionRate | ASCENDING,DESCENDING |\n| viewRate | ASCENDING,DESCENDING |\n| viewableCPM | ASCENDING,DESCENDING |","enum":["clickThroughRate","effectiveCPM","measuredRate","videoCompletionRate","viewRate","viewableCPM"],"type":"string"},"DealPlanningMetricsSuccessResponse":{"properties":{"dealPlanningMetricses":{"items":{"$ref":"#/components/schemas/DealPlanningMetrics"},"maxItems":2000,"minItems":0,"type":"array"},"nextToken":{"type":"string"}},"type":"object"},"DealPlanningMetricsVideoCompletionRateFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"DealPlanningMetricsViewRateFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"DealPlanningMetricsViewableCPMFilter":{"properties":{"max":{"format":"double","type":"number"},"min":{"format":"double","type":"number"}},"type":"object"},"ErrorCode":{"description":"**ErrorCode Enum:**\n| ErrorCode | Description |\n| --- | --- |\n| `INTERNAL_ERROR` | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n| `UNAUTHORIZED` | The request lacks the necessary credentials. |\n| `FORBIDDEN` | The caller is not authorized to make the given request. |\n| `TOO_MANY_REQUESTS` | There have been too many requests, please slow down your call rate. |\n| `NOT_FOUND` | The requested resource does not exist. |\n| `BAD_REQUEST` | The request is not valid considering the documented schema. |","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED"],"type":"string"},"ForbiddenResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"GatewayTimeoutResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"InternalServerErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"NotFoundResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"QueryDealPlanningMetricsRequest":{"properties":{"adProductFilter":{"$ref":"#/components/schemas/DealPlanningMetricsAdProductFilter"},"advertisingDealIdFilter":{"$ref":"#/components/schemas/DealPlanningMetricsAdvertisingDealIdFilter"},"clickThroughRateFilter":{"$ref":"#/components/schemas/DealPlanningMetricsClickThroughRateFilter"},"currencyFilter":{"$ref":"#/components/schemas/DealPlanningMetricsCurrencyCodeFilter"},"effectiveCPMFilter":{"$ref":"#/components/schemas/DealPlanningMetricsEffectiveCPMFilter"},"maxResults":{"default":100,"format":"int32","maximum":2000,"minimum":1,"type":"integer"},"measuredRateFilter":{"$ref":"#/components/schemas/DealPlanningMetricsMeasuredRateFilter"},"nextToken":{"type":"string"},"sort":{"items":{"$ref":"#/components/schemas/DealPlanningMetricsSortOption"},"maxItems":1,"minItems":0,"type":"array"},"videoCompletionRateFilter":{"$ref":"#/components/schemas/DealPlanningMetricsVideoCompletionRateFilter"},"viewRateFilter":{"$ref":"#/components/schemas/DealPlanningMetricsViewRateFilter"},"viewableCPMFilter":{"$ref":"#/components/schemas/DealPlanningMetricsViewableCPMFilter"}},"required":["adProductFilter","advertisingDealIdFilter"],"type":"object"},"ServiceUnavailableErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"SortDirection":{"description":"**SortDirection Enum:**\n| SortDirection | Description |\n| --- | --- |\n| `ASCENDING` | Sort in ascending order |\n| `DESCENDING` | Sort in descending order |","enum":["ASCENDING","DESCENDING"],"type":"string"},"TooManyRequestsResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"UnauthorizedResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"securitySchemes":{"OAuth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://www.amazon.com/ap/oa","scopes":{"advertising::audiences":"Grants access to data provider APIs","advertising::campaign_management":"Grants write access to campaign management.","advertising::test:create_account":"Grants write access to create test accounts functionality","cpc_advertising:campaign_management":"Grants write access to campaign management. Legacy name (no difference from advertising::campaign_management)"},"tokenUrl":"https://api.amazon.com/auth/o2/token"}},"type":"oauth2"}}},"info":{"description":"Amazon Ads API v1 is a reimagined approach to our Ads API, built to provide a seamless experience across all Amazon advertising products through a common model. [Learn more about Ads API v1.](https://advertising.amazon.com/API/docs/en-us/reference/amazon-ads/overview) To learn about prerequisites and header values, see [Getting started with Amazon Ads API v1](https://advertising.amazon.com/API/docs/en-us/reference/amazon-ads/getting-started).\n\n**Download Amazon Ads API V1 OpenAPI Spec** ([All Products](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIALLMerged_prod_3p.json) | [SP](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISPMerged_prod_3p.json) | [SP Global](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISPGLOBALMerged_prod_3p.json) | [SB](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISBMerged_prod_3p.json) | [DSP](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPIDSPMerged_prod_3p.json) | [ST](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISTMerged_prod_3p.json) | [SD](https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/AmazonAdsAPISDMerged_prod_3p.json))","title":"DealPlanningMetricses API","version":"3.0"},"openapi":"3.0.1","paths":{"/adsApi/v1/query/dealPlanningMetricses":{"post":{"description":"Query deal planning metrics for specified deals, with optional metric range filters and sort.\n\n**Requires one of these permissions**:\n[\"inventory_view\"]","operationId":"QueryDealPlanningMetrics","parameters":[{"$ref":"#/components/parameters/AccountIdHeaderOptional"},{"$ref":"#/components/parameters/ClientIdHeader"},{"$ref":"#/components/parameters/ManagerAccountIdHeaderOptional"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDealPlanningMetricsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealPlanningMetricsSuccessResponse"}}},"description":"QueryDealPlanningMetrics 200 response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestResponseContent"}}},"description":"BadRequest 400 response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedResponseContent"}}},"description":"Unauthorized 401 response"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenResponseContent"}}},"description":"Forbidden 403 response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponseContent"}}},"description":"NotFound 404 response"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentTooLargeResponseContent"}}},"description":"ContentTooLarge 413 response"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsResponseContent"}}},"description":"TooManyRequests 429 response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorResponseContent"}}},"description":"InternalServerError 500 response"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadGatewayResponseContent"}}},"description":"BadGateway 502 response"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceUnavailableErrorResponseContent"}}},"description":"ServiceUnavailableError 503 response"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTimeoutResponseContent"}}},"description":"GatewayTimeout 504 response"}},"security":[{"OAuth2":["advertising::campaign_management"]}],"tags":["DealPlanningMetricses"]}}},"servers":[{"description":"Production server for NA","url":"https://advertising-api.amazon.com"},{"description":"Production server for EU","url":"https://advertising-api-eu.amazon.com"},{"description":"Production server for FE","url":"https://advertising-api-fe.amazon.com"}]}