{"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"},"AppListTargetingEntry":{"description":"An app list targeting entry. All entries must share the same negative value.","properties":{"appListId":{"description":"The app list to target.","type":"string"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["appListId","groupId"],"type":"object"},"AppTargetingEntry":{"description":"An app targeting entry. All entries must share the same negative value.","properties":{"appId":{"description":"The app to target.","type":"string"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["appId","groupId"],"type":"object"},"AudienceTargetingEntry":{"description":"An individual audience targeting entry. Entries sharing the same groupId are OR\u0027d (union). Included groups (negative\u003dfalse) are AND\u0027d (intersection) across groups. All audiences in a negative group are OR\u0027d, then excluded (AND NOT).","properties":{"audienceId":{"description":"The audience segment to target.","type":"string"},"groupId":{"description":"Identifies the group this audience belongs to. Audiences sharing the same groupId are OR\u0027d together. Use any unique string per group (e.g. \u00271\u0027, \u00272\u0027).","type":"string"},"negative":{"description":"When true, this audience belongs to a negative (exclusion) group. Defaults to false when omitted.","type":"boolean"}},"required":["audienceId","groupId"],"type":"object"},"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"},"CountryCode":{"enum":["AE","AT","AU","BE","BH","BR","CA","CH","CN","DE","DK","ES","FI","FR","GB","IE","IL","IN","IT","JP","KW","LU","MA","MX","NL","NO","NZ","OTHER","OTHER_EEA","SA","SE","TR","US","ZZ"],"type":"string"},"CreativeSizeTargetingEntry":{"description":"A creative size targeting entry. All entries must share the same negative value.","properties":{"creativeSize":{"$ref":"#/components/schemas/Size"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["creativeSize","groupId"],"type":"object"},"DealAvails":{"properties":{"adProduct":{"$ref":"#/components/schemas/AdProduct"},"advertisingDealId":{"description":"The advertising deal this avails record belongs to.","type":"string"},"appId":{"description":"App for this avails slice.","type":"string"},"audienceId":{"description":"Audience segment for this avails slice.","type":"string"},"countryCode":{"$ref":"#/components/schemas/CountryCode"},"creativeSize":{"$ref":"#/components/schemas/Size"},"dealAvailsId":{"description":"A unique identifier for the deal avails record.","type":"string"},"deviceType":{"$ref":"#/components/schemas/DeviceType"},"domainEntry":{"$ref":"#/components/schemas/DomainEntry"},"eligibleAvails":{"description":"Bid opportunities over the last 7 days eligible for bidding (bids and no-bids, excluding punts). Filtered by the EligibleAvailsTargeting when provided.","format":"int64","maximum":9223372036854776000,"minimum":0,"type":"integer"},"eligibleAvailsTargeting":{"$ref":"#/components/schemas/EligibleAvailsTargeting"},"groupByAttributes":{"description":"Attributes to break results down by. When empty or omitted, results are aggregated to one entry per deal. APP, DOMAIN, SUPPLIER_SELLER, and CREATIVE_SIZE are high-cardinality attributes. At most one high-cardinality attribute may be requested, unless every requested high-cardinality attribute is one of APP, DOMAIN, or SUPPLIER_SELLER, which may be combined with each other. A request that groups by any high-cardinality attribute is limited to a single advertisingDealId.","items":{"$ref":"#/components/schemas/DealAvailsAttributeField"},"maxItems":10,"minItems":0,"type":"array"},"inventoryType":{"$ref":"#/components/schemas/InventoryType"},"supplierSellerId":{"description":"The supplier seller associated with this avails record.","type":"string"},"totalAvails":{"description":"Total bid opportunities over the last 7 days for this deal, including bids, no-bids, and punts. Not filtered by the EligibleAvailsTargeting.","format":"int64","maximum":9223372036854776000,"minimum":0,"type":"integer"}},"required":["adProduct","advertisingDealId","dealAvailsId","eligibleAvails","totalAvails"],"type":"object"},"DealAvailsAdProductFilter":{"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"},"DealAvailsAdvertisingDealIdFilter":{"properties":{"include":{"items":{"type":"string"},"maxItems":1000,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealAvailsAttributeField":{"description":"Available attributes for aggregating deal avails results.\n**DealAvailsAttributeField Enum:**\n| DealAvailsAttributeField | Description |\n| --- | --- |\n| `INVENTORY_TYPE` | Break down by inventory type (e.g. display, video, audio). |\n| `CREATIVE_SIZE` | Break down by creative size (width x height in DIPS). |\n| `SUPPLIER_SELLER` | Break down by supplier seller. |\n| `AUDIENCE` | Break down by audience. |\n| `APP` | Break down by app. |\n| `DOMAIN` | Break down by domain. |\n| `DEVICE_TYPE` | Break down by device type. |\n| `COUNTRY_CODE` | Break down by location (country code, ISO 3166-1 alpha-2). |","enum":["APP","AUDIENCE","COUNTRY_CODE","CREATIVE_SIZE","DEVICE_TYPE","DOMAIN","INVENTORY_TYPE","SUPPLIER_SELLER"],"type":"string"},"DealAvailsDealAvailsAttributeFieldFilter":{"properties":{"include":{"description":"**GroupByAttributes Enum:**\n| GroupByAttributes | Description |\n| --- | --- |\n| `INVENTORY_TYPE` | Break down by inventory type (e.g. display, video, audio). |\n| `CREATIVE_SIZE` | Break down by creative size (width x height in DIPS). |\n| `SUPPLIER_SELLER` | Break down by supplier seller. |\n| `AUDIENCE` | Break down by audience. |\n| `APP` | Break down by app. |\n| `DOMAIN` | Break down by domain. |\n| `DEVICE_TYPE` | Break down by device type. |\n| `COUNTRY_CODE` | Break down by location (country code, ISO 3166-1 alpha-2). |","items":{"$ref":"#/components/schemas/DealAvailsAttributeField"},"maxItems":8,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealAvailsEligibleAvailsTargetingFilter":{"properties":{"include":{"items":{"$ref":"#/components/schemas/EligibleAvailsTargeting"},"maxItems":1,"minItems":1,"type":"array"}},"required":["include"],"type":"object"},"DealAvailsSortOption":{"properties":{"by":{"$ref":"#/components/schemas/DealAvailsSortOptionsFields"},"direction":{"$ref":"#/components/schemas/SortDirection"}},"required":["by"],"type":"object"},"DealAvailsSortOptionsFields":{"description":"Specify which field to order by.\n| Field Name | Supported Ordering |\n| --- | --- |\n| eligibleAvails | DESCENDING |\n| totalAvails | DESCENDING |","enum":["eligibleAvails","totalAvails"],"type":"string"},"DealAvailsSuccessResponse":{"properties":{"dealAvailses":{"items":{"$ref":"#/components/schemas/DealAvails"},"maxItems":1000,"minItems":0,"type":"array"},"nextToken":{"type":"string"}},"type":"object"},"DeviceType":{"description":"**DeviceType Enum:**\n| DeviceType | Description |\n| --- | --- |\n| `DESKTOP` | Desktop computers and laptops. |\n| `MOBILE` | Mobile phones and tablets. |\n| `CONNECTED_TV` | Connected TV devices. |\n| `CONNECTED_DEVICE` | Connected TV, smart speakers. Used for audio AdGroup type. |\n| `UNKNOWN` | Unknown or unrecognized device type. |","enum":["CONNECTED_DEVICE","CONNECTED_TV","DESKTOP","MOBILE","UNKNOWN"],"type":"string"},"DeviceTypeTargetingEntry":{"description":"A device type targeting entry. All entries must share the same negative value.","properties":{"deviceType":{"$ref":"#/components/schemas/DeviceType"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["deviceType","groupId"],"type":"object"},"DomainEntry":{"description":"A single domain entry in a domain list.","properties":{"domainName":{"description":"The domain name (e.g., example.com).","type":"string"}},"required":["domainName"],"type":"object"},"DomainListTargetingEntry":{"description":"A domain list targeting entry. All entries must share the same negative value.","properties":{"domainListId":{"description":"The domain list to target.","type":"string"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["domainListId","groupId"],"type":"object"},"DomainTargetingEntry":{"description":"A domain targeting entry. All entries must share the same negative value.","properties":{"domainEntry":{"$ref":"#/components/schemas/DomainEntry"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["domainEntry","groupId"],"type":"object"},"EligibleAvailsTargeting":{"description":"Targeting that filters eligible avails. All targeting dimensions are AND\u0027d together, except app and domain entries (including list variants) which are OR\u0027d together since a bid contains either an app or a domain, never both. Within a dimension, entries are composed via groupId (see individual entry descriptions). The combined total of entries across all targeting dimensions must not exceed 1000.","properties":{"appListTargetingEntries":{"description":"App list targeting entries. App, domain, app list, and domain list targeting entries are always combined with OR logic because a bid contains either an app or a domain, never both.","items":{"$ref":"#/components/schemas/AppListTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"appTargetingEntries":{"description":"App targeting entries. App, domain, app list, and domain list targeting entries are always combined with OR logic because a bid contains either an app or a domain, never both.","items":{"$ref":"#/components/schemas/AppTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"audienceTargetingEntries":{"description":"Audience targeting entries. Entries are grouped by groupId. Within a group, audiences are OR\u0027d (union). Across included groups, groups are AND\u0027d (intersection).","items":{"$ref":"#/components/schemas/AudienceTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"creativeSizeTargetingEntries":{"description":"Creative size targeting entries.","items":{"$ref":"#/components/schemas/CreativeSizeTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"deviceTypeTargetingEntries":{"description":"Device type targeting entries.","items":{"$ref":"#/components/schemas/DeviceTypeTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"domainListTargetingEntries":{"description":"Domain list targeting entries. App, domain, app list, and domain list targeting entries are always combined with OR logic because a bid contains either an app or a domain, never both.","items":{"$ref":"#/components/schemas/DomainListTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"domainTargetingEntries":{"description":"Domain targeting entries. App, domain, app list, and domain list targeting entries are always combined with OR logic because a bid contains either an app or a domain, never both.","items":{"$ref":"#/components/schemas/DomainTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"inventoryTypeTargetingEntries":{"description":"Inventory type targeting entries.","items":{"$ref":"#/components/schemas/InventoryTypeTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"locationTargetingEntries":{"description":"Location targeting entries.","items":{"$ref":"#/components/schemas/LocationTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"},"supplierSellerTargetingEntries":{"description":"Supplier seller targeting entries.","items":{"$ref":"#/components/schemas/SupplierSellerTargetingEntry"},"maxItems":1000,"minItems":0,"type":"array"}},"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"},"InventoryType":{"description":"**InventoryType Enum:**\n| InventoryType | Description |\n| --- | --- |\n| `DISPLAY` |  |\n| `VIDEO` |  |\n| `STREAMING_TV` |  |\n| `ONLINE_VIDEO` |  |\n| `AUDIO` | Audio ads that serve on streaming audio inventory. |","enum":["AUDIO","DISPLAY","ONLINE_VIDEO","STREAMING_TV","VIDEO"],"type":"string"},"InventoryTypeTargetingEntry":{"description":"An inventory type targeting entry. All entries must share the same negative value.","properties":{"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"inventoryType":{"$ref":"#/components/schemas/InventoryType"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["groupId","inventoryType"],"type":"object"},"LocationTargetingEntry":{"description":"A location targeting entry. Currently only country-level targeting is supported. All entries must share the same negative value.","properties":{"countryCode":{"$ref":"#/components/schemas/CountryCode"},"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"}},"required":["countryCode","groupId"],"type":"object"},"NotFoundResponseContent":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"QueryDealAvailsRequest":{"properties":{"adProductFilter":{"$ref":"#/components/schemas/DealAvailsAdProductFilter"},"advertisingDealIdFilter":{"$ref":"#/components/schemas/DealAvailsAdvertisingDealIdFilter"},"eligibleAvailsTargetingFilter":{"$ref":"#/components/schemas/DealAvailsEligibleAvailsTargetingFilter"},"groupByAttributesFilter":{"$ref":"#/components/schemas/DealAvailsDealAvailsAttributeFieldFilter"},"maxResults":{"default":100,"format":"int32","maximum":1000,"minimum":1,"type":"integer"},"nextToken":{"type":"string"},"sort":{"items":{"$ref":"#/components/schemas/DealAvailsSortOption"},"maxItems":2,"minItems":0,"type":"array"}},"required":["adProductFilter","advertisingDealIdFilter"],"type":"object"},"ServiceUnavailableErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"Size":{"properties":{"height":{"description":"The height of the creative placement.","format":"int32","type":"integer"},"width":{"description":"The width of the creative placement.","format":"int32","type":"integer"}},"required":["height","width"],"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"},"SupplierSellerTargetingEntry":{"description":"A supplier seller targeting entry. All entries must share the same negative value.","properties":{"groupId":{"description":"Identifies the group this entry belongs to. Entries sharing the same groupId are OR\u0027d together.","type":"string"},"negative":{"description":"When true, this entry is a negative (exclusion) target. Defaults to false when omitted.","type":"boolean"},"supplierSellerId":{"description":"The supplier seller to target.","type":"string"}},"required":["groupId","supplierSellerId"],"type":"object"},"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":"DealAvailses API","version":"3.0"},"openapi":"3.0.1","paths":{"/adsApi/v1/query/dealAvailses":{"post":{"description":"Query deal avails by advertising deal ID. Returns avails records aggregated by selected attributes over the last 7 days, sorted by eligible avails descending.\n\n**Requires one of these permissions**:\n[\"inventory_view\"]","operationId":"QueryDealAvails","parameters":[{"$ref":"#/components/parameters/AccountIdHeaderOptional"},{"$ref":"#/components/parameters/ClientIdHeader"},{"$ref":"#/components/parameters/ManagerAccountIdHeaderOptional"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryDealAvailsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealAvailsSuccessResponse"}}},"description":"QueryDealAvails 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":["DealAvailses"]}}},"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"}]}