{"components":{"callbacks":{},"examples":{},"headers":{},"links":{},"parameters":{"AccountIdHeader":{"description":"The identifier of an Amazon Ads Advertiser Account.","in":"header","name":"Amazon-Ads-AccountId","required":true,"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"}},"MaxResultsQuery":{"in":"query","name":"maxResults","schema":{"default":100,"format":"int32","maximum":100,"minimum":1,"type":"integer"}},"NextTokenQuery":{"in":"query","name":"nextToken","schema":{"type":"string"}}},"requestBodies":{},"responses":{},"schemas":{"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"},"CreateDealPreferenceRequest":{"properties":{"dealPreferences":{"items":{"$ref":"#/components/schemas/DealPreferenceCreate"},"maxItems":20,"minItems":1,"type":"array"}},"required":["dealPreferences"],"type":"object"},"CreateDealPreferenceTarget":{"description":"A targeting reference that identifies a specific supplier target item within a destination and publisher.","properties":{"groupId":{"description":"The string identifying a group of targets. Targets sharing the same groupId are combined with OR logic. Different groupIds are combined with AND logic. If absent, the target is treated as its own implicit group (ANDed with all other groups).","type":"string"},"negative":{"description":"Indicates whether this target is negative (excluded). If not present, defaults to false (inclusive).","type":"boolean"},"supplierPublisherId":{"description":"The publisher that owns the target item.","nullable":true,"type":"string"},"supplierTargetDestinationId":{"description":"The supplier destination for this target (e.g., AmazonMedia, AmazonSP, AdX).","type":"string"},"supplierTargetItemId":{"description":"The specific target item to include or exclude.","type":"string"},"supplierTargetType":{"$ref":"#/components/schemas/SupplierTargetType"}},"required":["groupId","negative","supplierTargetDestinationId","supplierTargetItemId","supplierTargetType"],"type":"object"},"DealPreference":{"properties":{"advertiserAccountId":{"description":"The advertiser account that owns this deal preference.","type":"string"},"creationDateTime":{"description":"The date and time the deal preference was created.","format":"date-time","type":"string"},"dealPreferenceId":{"description":"Unique identifier for the deal preference.","type":"string"},"dealPreferenceTargets":{"description":"The targeting settings inherited by deals created under this advertiser account. Targets with the same groupId are combined with OR logic; different groupIds are combined with AND logic. Targets with negative set to true are excluded.","items":{"$ref":"#/components/schemas/DealPreferenceTarget"},"maxItems":20,"minItems":0,"type":"array"},"lastUpdatedDateTime":{"description":"The date and time the deal preference was last updated.","format":"date-time","type":"string"}},"required":["advertiserAccountId","creationDateTime","dealPreferenceId","lastUpdatedDateTime"],"type":"object"},"DealPreferenceCreate":{"properties":{"dealPreferenceTargets":{"description":"The targeting settings inherited by deals created under this advertiser account. Targets with the same groupId are combined with OR logic; different groupIds are combined with AND logic. Targets with negative set to true are excluded.","items":{"$ref":"#/components/schemas/CreateDealPreferenceTarget"},"maxItems":20,"minItems":0,"type":"array"}},"type":"object"},"DealPreferenceMultiStatusResponse":{"properties":{"error":{"items":{"$ref":"#/components/schemas/ErrorsIndex"},"maxItems":20,"minItems":0,"type":"array"},"success":{"items":{"$ref":"#/components/schemas/DealPreferenceMultiStatusSuccess"},"maxItems":20,"minItems":0,"type":"array"}},"type":"object"},"DealPreferenceMultiStatusSuccess":{"properties":{"dealPreference":{"$ref":"#/components/schemas/DealPreference"},"index":{"format":"int32","maximum":19,"minimum":0,"type":"integer"}},"required":["dealPreference","index"],"type":"object"},"DealPreferenceSuccessResponse":{"properties":{"dealPreferences":{"items":{"$ref":"#/components/schemas/DealPreference"},"maxItems":100,"minItems":0,"type":"array"},"nextToken":{"type":"string"}},"type":"object"},"DealPreferenceTarget":{"description":"A targeting reference that identifies a specific supplier target item within a destination and publisher.","properties":{"groupId":{"description":"The string identifying a group of targets. Targets sharing the same groupId are combined with OR logic. Different groupIds are combined with AND logic. If absent, the target is treated as its own implicit group (ANDed with all other groups).","type":"string"},"negative":{"description":"Indicates whether this target is negative (excluded). If not present, defaults to false (inclusive).","type":"boolean"},"supplierPublisherId":{"description":"The publisher that owns the target item.","type":"string"},"supplierTargetDestinationId":{"description":"The supplier destination for this target (e.g., AmazonMedia, AmazonSP, AdX).","type":"string"},"supplierTargetItemId":{"description":"The specific target item to include or exclude.","type":"string"},"supplierTargetType":{"$ref":"#/components/schemas/SupplierTargetType"}},"required":["groupId","negative","supplierTargetDestinationId","supplierTargetItemId","supplierTargetType"],"type":"object"},"Error":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"fieldLocation":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ErrorCode":{"description":"**ErrorCode Enum:**\n\n| ErrorCode | Description |\n|------|------|\n| `BAD_REQUEST` | The request is not valid considering the documented schema. |\n| `FORBIDDEN` | The caller is not authorized to make the given request. |\n| `INTERNAL_ERROR` | The server encountered an unexpected condition that prevented it from fulfilling the request. |\n| `NOT_FOUND` | The requested resource does not exist. |\n| `TOO_MANY_REQUESTS` | There have been too many requests, please slow down your call rate. |\n| `UNAUTHORIZED` | The request lacks the necessary credentials. |\n","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_ERROR","NOT_FOUND","TOO_MANY_REQUESTS","UNAUTHORIZED"],"type":"string"},"ErrorsIndex":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/Error"},"maxItems":20,"minItems":1,"type":"array"},"index":{"format":"int32","maximum":19,"minimum":0,"type":"integer"}},"required":["errors","index"],"type":"object"},"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"},"ServiceUnavailableErrorResponseContent":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"SupplierTargetType":{"enum":["CONTENT_CATEGORY"],"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":"DealPreferences API","version":"3.0"},"openapi":"3.0.1","paths":{"/adsApi/v1/create/dealPreferences":{"post":{"description":"Creates one or more deal preferences for a DSP advertiser account.\n\n**Requires one of these permissions**:\n[\"campaign_edit\"]","operationId":"CreateDealPreference","parameters":[{"$ref":"#/components/parameters/AccountIdHeader"},{"$ref":"#/components/parameters/ClientIdHeader"}],"requestBody":{"content":{"application/json":{"examples":{"CreateDealPreferencesRequest":{"summary":"Create deal preference with inclusion and exclusion targets","value":{"dealPreferences":[{"dealPreferenceTargets":[{"groupId":"0","negative":false,"supplierPublisherId":"a1b2c3d4e5f6g7h8i9j0k1l2","supplierTargetDestinationId":"8b595dd4-1234-5678-abcd-ef0123456789","supplierTargetItemId":"PPW3MGSK39BT7VHPBA4J","supplierTargetType":"CONTENT_CATEGORY"},{"groupId":"0","negative":false,"supplierPublisherId":"a1b2c3d4e5f6g7h8i9j0k1l2","supplierTargetDestinationId":"8b595dd4-1234-5678-abcd-ef0123456789","supplierTargetItemId":"QRS7NHTK42CX8WKLMD5P","supplierTargetType":"CONTENT_CATEGORY"},{"groupId":"1","negative":false,"supplierPublisherId":"a1b2c3d4e5f6g7h8i9j0k1l2","supplierTargetDestinationId":"8b595dd4-1234-5678-abcd-ef0123456789","supplierTargetItemId":"ABC1DEF2GHI3JKL4MN5O","supplierTargetType":"CONTENT_CATEGORY"},{"groupId":"0","negative":true,"supplierPublisherId":"a1b2c3d4e5f6g7h8i9j0k1l2","supplierTargetDestinationId":"8b595dd4-1234-5678-abcd-ef0123456789","supplierTargetItemId":"N001PZRECPEP","supplierTargetType":"CONTENT_CATEGORY"}]}]}}},"schema":{"$ref":"#/components/schemas/CreateDealPreferenceRequest"}}},"required":true},"responses":{"207":{"content":{"application/json":{"examples":{"CreateDealPreferencesResponse":{"summary":"Multi-status create response","value":{"success":[{"dealPreferenceId":"amzn1.adsp.dp.5f3c1a9e","index":0}]}}},"schema":{"$ref":"#/components/schemas/DealPreferenceMultiStatusResponse"}}},"description":"CreateDealPreference 207 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":["DealPreferences"]}},"/adsApi/v1/dealPreferences":{"get":{"description":"Lists deal preferences for a DSP advertiser account.\n\n**Requires one of these permissions**:\n[\"campaign_view\", \"campaign_edit\"]","operationId":"ListDealPreference","parameters":[{"$ref":"#/components/parameters/NextTokenQuery"},{"$ref":"#/components/parameters/MaxResultsQuery"},{"$ref":"#/components/parameters/AccountIdHeader"},{"$ref":"#/components/parameters/ClientIdHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealPreferenceSuccessResponse"}}},"description":"ListDealPreference 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":["DealPreferences"]}}},"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"}]}