openapi: 3.0.1 info: title: Amazon Attribution description: "**Amazon Attribution**
Amazon Attribution is an advertising\ \ measurement product that enables advertisers to understand the impact that their\ \ non-Amazon ads (i.e. Google Ads, Facebook, Microsoft Ads) have in driving shopping\ \ activity on Amazon. Measuring ads using Amazon Attribution is done through implementing\ \ Attribution tags on non-Amazon ads. Amazon Attribution is currently available\ \ in beta for US, CA, UK, DE, FR, IT, and ES vendors and professional sellers\ \ enrolled in Brand Registry.

**Amazon Attribution API**
\ \ The Amazon Attribution API enables agencies and integrators to easily retrieve\ \ their advertiser client's non-Amazon publisher attribution tags to automate\ \ tag implementation on their non-Amazon ads that link to an Amazon product or\ \ Stores page. The API also enables agencies and integrators to create and retrieve\ \ reporting on behalf of their advertiser clients to better understand Amazon\ \ conversion performance on their campaigns.

Note that you must pass\ \ a header named **Amazon-Advertising-Api-Scope** with each call to an Amazon\ \ Attribution API URI, including GET /advertisers. The value for this header is\ \ the **profileId** available from the **Profiles resource (/v2/profiles)**.

\ \ For more information on the functionality, see the [Amazon Attribution API\ \ help topic](amazon-attribution/overview). For API onboarding information, see\ \ the [account setup](setting-up/account-setup) topic.

**

[Amazon\ \ Advertising API Support JIRA Service Desk - Website](https://amzn-clicks.atlassian.net/servicedesk/customer/user/login?destination=portals)
[Amazon\ \ Advertising API License Agreement](https://advertising.amazon.com/API/docs/license-agreement)" version: "3.0" servers: - url: / paths: /attribution/advertisers: get: tags: - Advertisers summary: Gets a list of advertisers associated with an Amazon Attribution account. description: "For sellers, an attribution profile has one associated advertiser.\ \ For vendors, an attribution profile may have more than one associated advertiser." operationId: getAdvertisersByProfile parameters: - name: Amazon-Advertising-API-ClientId in: header description: The identifier of a client associated with a "Login with Amazon" account. required: true style: simple explode: false schema: type: string - name: Amazon-Advertising-API-Scope in: header description: The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. required: true style: simple explode: false schema: type: string responses: "200": description: success content: application/json: schema: $ref: '#/components/schemas/AdvertiserResponse' /attribution/publishers: get: tags: - Publishers summary: Gets a list of all available publishers. description: Use the response to determine whether to use either the macroTags or nonMacroTemplateTags resource to get tags for a certain publisher. operationId: getPublishers parameters: - name: Amazon-Advertising-API-ClientId in: header description: The identifier of a client associated with a "Login with Amazon" account. required: true style: simple explode: false schema: type: string - name: Amazon-Advertising-API-Scope in: header description: The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. required: true style: simple explode: false schema: type: string responses: "200": description: Success. content: application/json: schema: $ref: '#/components/schemas/PublishersResponse' /attribution/report: post: tags: - Reports summary: Gets an attribution report for a specified list of advertisers. operationId: getAttributionTagsByCampaign parameters: - name: Amazon-Advertising-API-ClientId in: header description: The identifier of a client associated with a "Login with Amazon" account. required: true style: simple explode: false schema: type: string - name: Amazon-Advertising-API-Scope in: header description: The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ReportRequestBody' required: true responses: "200": description: Successful operation. content: application/json: schema: $ref: '#/components/schemas/ReportResponse' "400": description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "403": description: Forbidden. Request failed because user does not have access to a specified resource. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "500": description: Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved. content: application/json: schema: $ref: '#/components/schemas/MaaSError' /attribution/tags/macroTag: get: tags: - Attribution Tags summary: Gets a list of attribution tags for third-party publisher campaigns that support macros. description: "Third-party publishers, such as Google Ads, Facebook, Microsoft\ \ Ads, and Pinterest support tags that include macro parameters. Using macro\ \ parameters, campaign tracking information is dynamically inserted into the\ \ click-through URL when an ad is clicked. This resource is a tag pre-populated\ \ with campaign, ad group, and ad level publisher macros with the values associated\ \ with your campaign.

For example, a Google Ads macro tag is \"\ ?maas=maas_adg_api_123456789_1_99&ref_=aa_maas&tag=maas&aa_campaignid={campaignid}&aa_adgroupid={adgroupid}&aa_creativeid=ad-{creative}_{targetid}\"" operationId: getPublisherAttributionTagTemplate parameters: - name: Amazon-Advertising-API-ClientId in: header description: The identifier of a client associated with a "Login with Amazon" account. required: true style: simple explode: false schema: type: string - name: Amazon-Advertising-API-Scope in: header description: The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. required: true style: simple explode: false schema: type: string - name: publisherIds in: query description: A list of publisher identifiers for which to request tags. required: true style: form explode: true schema: type: array items: type: string - name: advertiserIds in: query description: |- List of advertiser identifiers for which to request tags. If no values are passed, all advertisers are returned. required: false style: form explode: true schema: type: array items: type: integer format: int64 responses: "200": description: Successful operation. content: application/json: schema: $ref: '#/components/schemas/AttributionTagResponse' example: advertiserA: "1": tag1A "2": tag2A "3": tag3A advertiserB: "1": tag2B "2": tag2B "3": tag3B "400": description: "Invalid request, publisher not supported, or invalid advertiser\ \ identifier." content: application/json: schema: $ref: '#/components/schemas/MaaSError' "401": description: Unauthorized. Request failed because user is not authenticated or is not allowed to invoke the operation. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "403": description: Forbidden. Request failed because user does not have access to a specified resource. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "429": description: Too Many Requests. Request was rate-limited. Retry later. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "500": description: Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved. content: application/json: schema: $ref: '#/components/schemas/MaaSError' /attribution/tags/nonMacroTemplateTag: get: tags: - Attribution Tags summary: Gets a list of attribution tags for third-party publisher campaigns that do not support macros. description: "Some third-party publishers do not support tags that include macro\ \ parameters. In this case, the attribution tag includes a set of '**insertValue**'\ \ placeholder values. Replace these placeholder values with your campaign,\ \ ad group, and ad identifiers to create unique ad-level tags.

For\ \ example: \"?maas=maas_adg_api_123456789_static_9_99&ref_=aa_maas&tag=maas&aa_campaignid={**insertCampaignId**}&aa_adgroupid={**insertAdGroupId**}&aa_creativeid={**insertAdiD**}\"\

An example of an integrator nonMacro tag with filled campaign,\ \ ad group, and ad ID values is \"?maas=maas_adg_api_123456789_static_9_99&ref_=aa_maas&tag=maas&aa_campaignid=**12345**&aa_adgroupid=**5678**&aa_creativeid=**1357**\"" operationId: getPublisherMacroAttributionTag parameters: - name: Amazon-Advertising-API-ClientId in: header description: The identifier of a client associated with a "Login with Amazon" account. required: true style: simple explode: false schema: type: string - name: Amazon-Advertising-API-Scope in: header description: The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. required: true style: simple explode: false schema: type: string - name: publisherIds in: query description: A list of publisher identifiers for which to request tags. required: true style: form explode: true schema: type: array items: type: string - name: advertiserIds in: query description: |- List of advertiser identifiers for which to request tags. If no values are passed, all advertisers are returned. required: false style: form explode: true schema: type: array items: type: string responses: "200": description: Successful operation. content: application/json: schema: $ref: '#/components/schemas/AttributionTagResponse' example: advertiserA: "5": tag1A "6": tag2A "7": tag3A advertiserB: "5": tag2B "6": tag2B "7": tag3B "400": description: "Invalid request, publisher not supported, or invalid advertiser\ \ identifier." content: application/json: schema: $ref: '#/components/schemas/MaaSError' "401": description: Unauthorized. Request failed because user is not authenticated or is not allowed to invoke the operation. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "403": description: Forbidden. Request failed because user does not have access to a specified resource. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "429": description: Too Many Requests. Request was rate-limited. Retry later. content: application/json: schema: $ref: '#/components/schemas/MaaSError' "500": description: Internal Server Error. Something went wrong on the server. Retry later and report an error if unresolved. content: application/json: schema: $ref: '#/components/schemas/MaaSError' components: schemas: AdvertiserResponse: type: object properties: advertisers: type: array items: $ref: '#/components/schemas/advertiser' example: advertisers: - advertiserName: advertiserName advertiserId: advertiserId - advertiserName: advertiserName advertiserId: advertiserId AttributionTagResponse: type: object properties: advertiserAttributionTagMap: type: object additionalProperties: $ref: '#/components/schemas/attributionTagMap' description: A list of advertisers and associated attribution tags. example: advertiserA: "1": tag1A "2": tag2A advertiserB: "1": tag2B "2": tag2B example: advertiserAttributionTagMap: advertiserA: "1": tag1A "2": tag2A advertiserB: "1": tag2B "2": tag2B MaaSError: type: object properties: code: type: string description: "The HTTP status code of the response. Possible value of code\ \ is \"200\", \"207\", \"400\", \"401\", \"429\", \"403\", or \"500\"." details: type: string description: A human-readable description of the response. description: The error response object. Publisher: type: object properties: id: type: object description: The identifier of a publisher. allOf: - type: string description: The identifier of a macro publisher. x-amazon-advertising-package: MaaSPublicAPIAPISwagger - type: string description: The identifier of a publisher that does not support macros. x-amazon-advertising-package: MaaSPublicAPIAPISwagger macroEnabled: type: boolean description: Set to 'true' if Amazon Attribution provides macro tags for the given publisher. name: type: string description: The name of the publisher. example: macroEnabled: true name: name id: "" PublishersResponse: type: object properties: publisher: type: array description: A list of publishers. items: $ref: '#/components/schemas/Publisher' example: publisher: - macroEnabled: true name: name id: "" - macroEnabled: true name: name id: "" ReportEntry: type: object properties: adGroupId: type: string description: An ad group external identifier. Applies to `PERFORMANCE` and `PRODUCTS` reportType. advertiserName: type: string description: Name of advertiser. Applies to `PERFORMANCE` and `PRODUCTS` reportType. brandName: type: string description: Name of the advertiser's brand. Applies only to `PRODUCTS` reportType. campaignId: type: string description: A campaign external identifier. Applies to `PERFORMANCE` and `PRODUCTS` reportType. creativeId: type: string description: A creative external identifier. Applies only to `PERFORMANCE` reportType date: type: string description: Date on which the events took place. Applies to `PERFORMANCE` and `PRODUCTS` reportType. marketplace: type: string description: The Amazon-owned site the product is sold on. Applies only to `PRODUCTS` reportType. productAsin: type: string description: A unique block of letters and/or numbers that identify all products sold on Amazon. Applies only to `PRODUCTS` reportType. productCategory: type: string description: A classification for the type of product being sold which determines its place in the Amazon retail catalog. Contains categories of products. Applies only to `PRODUCTS` reportType. productConversionType: type: string description: The conversion type describes whether the conversion happened on a promoted or a brand halo ASIN. Applies only to `PRODUCTS` reportType. productGroup: type: string description: A distinct product grouping distinguishing products like watches from video games from toys. Contains groups of products. Applies only to `PRODUCTS` reportType. productName: type: string description: The name of the product. Applies only to `PRODUCTS` reportType. productSubcategory: type: string description: A classification for the type of product being sold which determines its place in the Amazon retail catalog. Contains subcategories of products. Applies only to `PRODUCTS` reportType publisher: type: string description: The publisher name. Applies to `PERFORMANCE` and `PRODUCTS` reportType description: Report entry object in GetReport reports list. example: date: date brandName: brandName marketplace: marketplace campaignId: campaignId productAsin: productAsin productConversionType: productConversionType adGroupId: adGroupId advertiserName: advertiserName creativeId: creativeId productName: productName productCategory: productCategory productSubcategory: productSubcategory productGroup: productGroup publisher: publisher ReportRequestBody: type: object properties: advertiserIds: type: string description: "One or more advertiser Ids to filter reporting by. If requesting\ \ reporting for multiple advertiser Ids, input via a comma-delimited list." count: maximum: 5000.0 minimum: 1 type: integer description: The number of entries to include in the report. cursorId: type: string description: "The value of `cursorId` must be set to `null` without `\"\"\ `, or set to `\"\"` for the first request. For each following request,\ \ the value of `cursorId` from the previous response must be included\ \ in the current request. Note that for the cursorId values the `\"` character\ \ must be escaped with `\\`." endDate: type: string description: "The end date for the report, form as \"YYYYMMDD\"" groupBy: type: string description: "For Performance report only - controls level of aggregation.\ \ Value can be `CAMPAIGN`, `ADGROUP`, or `CREATIVE`. Default is `CREATIVE`." enum: - ADGROUP - CAMPAIGN - CREATIVE metrics: type: string description: |- A comma-delimited list of metrics to include in the report. In the report, each metric’s value reflects the events which took place on the row’s date; in other words, events are reported on the date they occurred, not on the date of the attributed click. Attribution is calculated using a 14-day last-click model. For more detail on attribution methodology, see the [Measurement](https://advertising.amazon.com/API/docs/en-us/amazon-attribution/how-to#measurement) section of the API guide. View the list of available metrics for each report type below."Promoted products" refers to products associated with the campaign. |Metrics for reportType`PERFORMANCE`| |-------------------| |Metric |Description| |--------|-----------| |Click-throughs|Ad clicks.| |attributedDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted product.| |attributedAddToCartClicks14d|Ad click-attributed add to carts for promoted products.| |attributedPurchases14d|Ad click-attributed purchases for promoted products.| |unitsSold14d|Ad click-attributed units sold for promoted products.| |attributedSales14d|Ad click-attributed sales for promoted products in local currency.| |attributedTotalDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted products plus brand halo products.| |attributedTotalAddToCartClicks14d|Ad click-attributed add to carts for promoted products plus brand halo products.| |attributedTotalPurchases14d|Ad click-attributed purchases for promoted products plus brand halo products.| |totalUnitsSold14d|Ad click-attributed units sold for promoted products plus brand halo products.| |totalAttributedSales14d|Ad click-attributed attributed sales for promoted products plus brand halo products.| |brb_bonus_amount|Estimated ad-attributed Brand Referral Bonus credit amount in local currency. Will be omitted from response if advertiser is not a BRB-enrolled seller or request does not include a ‘metrics’ list. Requests for this metric must groupBy ADGROUP or CAMPAIGN, or will result in an error 400. Please refer to to learn more about BRB program.| |kindleEditionNormalizedPagesRead14d| Number of attributed Kindle edition pages read within 14 days of ad click.| |kindleEditionNormalizedPagesRoyalties14d|The estimated royalties of attributed estimated Kindle edition normalized pages within 14 days of ad click.| |Metrics for reportType`PRODUCTS`| |-------------------| |Metric |Description| |--------|-----------| |attributedDetailPageViewsClicks14d|Ad click-attributed detail page views for promoted products.| |attributedAddToCartClicks14d|Ad click-attributed add to carts for promoted products.| |attributedPurchases14d|Ad click-attributed purchases for promoted products.| |unitsSold14d|Ad click-attributed units sold for promoted products.| |attributedSales14d|Ad click-attributed sales for promoted products in local currency.| |brandHaloDetailPageViewsClicks14d|Ad click-attributed detail page views for brand halo products.| |brandHaloAttributedAddToCartClicks14d|Ad click-attributed add to carts for brand halo products.| |brandHaloAttributedPurchases14d|Ad click-attributed purchases for brand halo products.| |brandHaloUnitsSold14d|Ad click-attributed units sold for brand halo products.| |brandHaloAttributedSales14d|Ad click-attributed attributed sales for brand halo products.| |attributedNewToBrandPurchases14d|Ad click-attributed new-to-brand purchases for promoted products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |attributedNewToBrandUnitsSold14d|Ad click-attributed units sold in new-to-brand purchases for promoted products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |attributedNewToBrandSales14d|Ad click-attributed sales of new-to-brand purchases for promoted products in local currency. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |brandHaloNewToBrandPurchases14d|Ad click-attributed new-to-brand purchases for brand halo products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |brandHaloNewToBrandUnitsSold14d|Ad click-attributed units sold in new-to-brand purchases for brand halo products. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |brandHaloNewToBrandSales14d|Ad click-attributed sales of new-to-brand purchases for brand halo products in local currency. A purchase is new-to-brand when a shopper purchases a product from the brand for the first time in the past year.| |kindleEditionNormalizedPagesRead14d| The no of pages read attributed to ad click-throughs within 14 days.| |kindleEditionNormalizedPagesRoyalties14d|The estimated royalties of attributed estimated Kindle edition normalized pages within 14 days of ad click.| reportType: type: string description: "The type of report. Either `PERFORMANCE` or `PRODUCTS`. It\ \ is an optional parameter. If not used in request body, default reportType\ \ is `PERFORMANCE`." startDate: type: string description: "The start date for the report, in \"YYYYMMDD\" format. For\ \ reportType `PRODUCTS`, startDate can only be within last 90 days from\ \ current date." description: "Report request body. \nTwo types of reports are available: Performance\ \ or Products - choose by including the `reportType` property. Performance\ \ report may be aggregated at any of three levels: campaign, ad group, or\ \ creative - choose by including the `groupBy` property. Products report is\ \ always aggregated at ad group level - when requesting a Products report,\ \ do not include the `groupBy` property or an error will occur.\n\nPagination\ \ is recommended - include the `count` and `cursorId` properties.\n\nPass\ \ a list of metrics to control which metrics appear in the response, or omit\ \ this list to receive all available metrics (except brb_bonus_amount).\n\n\ Dimensions available within each report type and aggregation level:\n| reportType\ \ | groupBy | Dimensions|\n|-------------|-------------------|-----------|\n\ |PERFORMANCE|CREATIVE|campaignId, adgroupId, creativeid, publisher|\n|PERFORMANCE|ADGROUP|campaignId,\ \ adgroupId, publisher|\n|PERFORMANCE|CAMPAIGN|campaignId|\n|PRODUCTS|N/A|campaignId,\ \ adgroupId, publisher, productName, productGroup, productCategory, productSubcategory,\ \ brandName, productAsin, productConversionType|\nExample requests:\n```\n\ \ # PerformanceReportGroupedAtCampaignLevel\n{\n \"reportType\": \"PERFORMANCE\"\ ,\n \"endDate\": \"20220601\",\n \"count\": 1000,\n \"startDate\": \"20220525\"\ ,\n \"groupBy\":\"CAMPAIGN\"\n}\n # ProductsReport \n{\n \"reportType\"\ : \"PRODUCTS\",\n \"endDate\": \"20220601\",\n \"count\": 1000,\n \"startDate\"\ : \"20220525\"\n}\n```" ReportResponse: type: object properties: cursorId: type: string description: The identifier of the pagination cursor. reports: type: array items: $ref: '#/components/schemas/ReportEntry' size: type: integer description: The size of the report. example: reports: - date: date brandName: brandName marketplace: marketplace campaignId: campaignId productAsin: productAsin productConversionType: productConversionType adGroupId: adGroupId advertiserName: advertiserName creativeId: creativeId productName: productName productCategory: productCategory productSubcategory: productSubcategory productGroup: productGroup publisher: publisher - date: date brandName: brandName marketplace: marketplace campaignId: campaignId productAsin: productAsin productConversionType: productConversionType adGroupId: adGroupId advertiserName: advertiserName creativeId: creativeId productName: productName productCategory: productCategory productSubcategory: productSubcategory productGroup: productGroup publisher: publisher size: 0 cursorId: cursorId advertiser: type: object properties: advertiserId: type: string advertiserName: type: string example: advertiserName: advertiserName advertiserId: advertiserId attributionTagMap: type: object additionalProperties: type: string description: An object representing the association between a publisher identifier and an attribution tag. x-schema-name: attributionTagMap responses: {} parameters: {} examples: {} requestBodies: {} headers: {} securitySchemes: {} links: {} callbacks: {}