Amazon Ads Connector
Documentation
Version: 1
Documentation

Amazon Ads Connector - Source Code


<?xml version="1.0" encoding="utf-8"?>
<ApiConfig Name="Amazon Ads"
  Id="4d19dabe-6cba-422f-a307-6d9843127fa9"
	Slug="amazon-ads-connector"
	EngineVersion="2"
	Desc="Amazon Ads Connector can be used to get Amazon advertisements using Amazon Advertisements API, download various advertisement-related reports."
	Logo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5gMfEQgSZZddIQAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlvbiB0aW1lADX3DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAh0RVh0V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVudAD2zJa/AAAABnRFWHRUaXRsZQCo7tInAAAgAElEQVR4nO2deZhU1Z33P3eppauq94WmbVpoQGSX0CyCTQfouETBGZHIGDWaMRMZH6ODZEwkrwsyMfhGzTIR48wrT0gixLgBKjGPqNiK0GwCIiCrNDRNQ++1V9173z+Kc6nqrl6AqgZNfZ+nHpqqe889y/f81nPPkcaNG2eQQgoJhnyhK5DC1xMpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCklBilgpJAUpYqWQFKSIlUJSkCJWCkmB2hsPkeVY/uq6ft5lSpIEgGF0vaeJJEndXtPZfeIZ4jnnUk6icK7t6K3y2iNpxJJlGV3XCYVChMNh83tJklAUBavViiRJcUnWFWlkWSYcDptlKoqC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E40fP96M63Smgi0WC5s3b2b//v2d2nbRQcOCggIqKiqYMGECpaWl9OnTxxxQt9vN4cOHWb9+PX//+9+pqakxI/uSJDF69OhOJYIIl3zxxRfU1tZ2KbkFSURQtn///pSVlTFixAgGDBhAnz59zOXVQhv4fD7q6+s5cuQIO3fuZNOmTezbt49wOGzGDJMdiU8IsQR0Xcfj8XR5jSBXIjPpwr7rbqcZw4i8Dt8Th0F4rmJ3P5fLZb43CBG7TbxuJcqMJpHf7+/2GWIP0570g3huMBg0Ja7T6cRms2GxWJBlGVVVzfcM/X6/mdEQW0R25wgkEgklVvtFaJ0hGW+IJOvZIowRz6bpatPYntTnXPtBeHHRNpQoTzyzfXqnt5HQAGmyXym6EM+ONn7jobNBS2ZfiGcKO6ozCPJdCKSOc0ghKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4WkIEWsFJKCFLFSSApSxEohKUgRK4Wk4P8DEnzG8cKPFSgAAAAASUVORK5CYII=">

  <VersionHistory>
    <Change Date="2022-10-12" Desc="Added 'Profiles' table" />
    <Change Date="2022-04-15" Desc="Initial version" />
  </VersionHistory>

  <ServiceUrls>
    <ServiceUrl Name="North America" Url="https://advertising-api.amazon.com/v2"/>
    <ServiceUrl Name="Europe" Url="https://advertising-api-eu.amazon.com/v2"/>
    <ServiceUrl Name="Far East" Url="https://advertising-api-fe.amazon.com/v2"/>
    <ServiceUrl Name="Testing" Url="https://advertising-api-test.amazon.com/v2"/>

    <ServiceUrl Name="North America (Beta)" Url="https://advertising-api.amazon.com"/>
    <ServiceUrl Name="Europe (Beta)" Url="https://advertising-api-eu.amazon.com"/>
    <ServiceUrl Name="Far East (Beta)" Url="https://advertising-api-fe.amazon.com"/>
    <ServiceUrl Name="Testing (Beta)" Url="https://advertising-api-test.amazon.com"/>
  </ServiceUrls>

  <Auths>
    <Auth Type="OAuth" Name="oauth" Label="OAuth Authentication" Desc="OAuth App must be created in Atlassian Developer Console. It is found at https://developer.atlassian.com/console/myapps/"
        HelpLink="https://developer.amazon.com/"
        ConnStr="Provider=Custom;OAuthVersion=OAuth2;AuthUrl=[$AuthorizationUrl$];ClientId=[$AppId$];Scope=[$Scope$];TokenUrl=https://api.amazon.com/auth/o2/token;ScopeSeparator={space};ContentType=application/x-www-form-urlencoded;"
        TestEndPoint="test_connection">
      <Notes>
        <![CDATA[<p>Firstly, login into Amazon Developer portal:<p />
<ol>
  <li>Visit <a target="_blank" href="https://developer.amazon.com">https://developer.amazon.com</a>.</li>
  <li>Then click <a target="_blank" href="https://developer.amazon.com/settings/console/registration?return_to=/">Sign in</a>.</li>
  <li>If you don't have an account, press the button <a target="_blank" href="https://www.amazon.com/ap/register?clientContext=131-5720164-7942448&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&siteState=clientContext%3D145-8718276-2516328%2CsourceUrl%3Dhttps%253A%252F%252Fdeveloper.amazon.com%252Fsettings%252Fconsole%252Fregistration%253Freturn_to%253D%252F%2Csignature%3DKQfa9xgpp5oGgNseoEDkI20k6x4j3D&marketPlaceId=ATVPDKIKX0DER&language=en_US&pageId=amzn_developer_portal&openid.return_to=https%3A%2F%2Fdeveloper.amazon.com%2Fsettings%2Fconsole%2Fregistration%3Freturn_to%3D%252F&prevRID=JSXT7JP943ENEF9HN6Q7&openid.assoc_handle=mas_dev_portal&openid.mode=checkid_setup&prepopulatedLoginId=&failedSignInCount=0&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0">Create your Amazon Developer account</a>.</li>
  <li>Once logged in, click on your profile icon on the right-top of the window.</li>
  <li>A menu appears, and then click 'Settings'.</li>
  <li>Then click <a target="_blank" target="https://developer.amazon.com/settings/console/securityprofile/overview.html">Security Profiles</a>.</li>
  <li>Proceed with creating a new <a target="_blank" href="https://developer.amazon.com/settings/console/securityprofile/create-security-profile.html">Security Profile</a>.</li>
  <li>Once you named it, click 'Save'.</li>
  <li>After that, click 'Web Settings' subtab.</li>
  <li>A window refreshes, click 'Show Secret' button and write down <strong>Client ID</strong> and <strong>Client Secret</strong>, you will need them later.</li>
  <li>Then press 'Edit' and add <strong>Allowed Return URLs</strong>. It can be your domain or you can use <strong>https://zappysys.com/oauth</strong>. Note it, you will need it in configuration.</li>
  <li>Close web browser.</li>
  <li>Now it's time to configure Amazon Ads API data source.</li>
  <li>Fill in all blank <strong>Required Parameters:</strong>
    <ol>
      <li>ClientId</li>
      <li>ClientSecret</li>
      <li>ReturnUrl</li>      
    </ol>
  </li>
  <li>Click <b>Generate Token</b> to generate tokens.</li>
  <li>Now you can select the 'Profile' to work with.</li>
  <li>That's it!</li>
</ol>
]]>
      </Notes>
      <Params>
        <Param Name="AppId" Label="ClientId" Required="True" Type="Placeholder" />
        <Param Name="ClientSecret" Secret="True" Required="True"/>
        <Param Name="AuthorizationUrl" Value="https://www.amazon.com/ap/oa" Options="North America=https://www.amazon.com/ap/oa;Europe=https://eu.account.amazon.com/ap/oa;Far East=https://apac.account.amazon.com/ap/oa" Required="True"/>
        <Param Name="ReturnUrl" Value="" Required="True"/>
        <Param Name="Scope" Value="" Required="True" Type="Placeholder" />
        <Param Name="Profile" Label="Profile (click 'Generate Token' before this)" Value="" Required="True" Type="Placeholder"
               OptionsEndPoint="get_profiles"
               OptionsEndPointLabelColumn="CurrencyCode"
               OptionsEndPointValueColumn="ProfileId" />
        <Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
        <Param Name="RetryStatusCodeList" Value="429" Hidden="True" />
        <Param Name="RetryCountMax" Value="5" Hidden="True" />
        <Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />
      </Params>
    </Auth>
  </Auths>


  <Template></Template>


  <EndPoints>

    <EndPoint Name="test_connection"
              Url="/sp/keywords?count=1"
              Method="GET"
              Headers="Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]"
              Desc="Endpoint to test connection."
              CachedTtl="30">
    </EndPoint>


    <EndPoint Name="get_profiles"
              Url="/profiles"
              Method="GET"
              Headers="Amazon-Advertising-API-ClientId:[$AppId$]"
              Desc="Gets your Amazon Ads profiles"
              ContentType="application/json"
              CachedTtl="30"
              DotAsPath="True">
      <OutputColumns>
        <Column Name="profileId" Label="ProfileId" DataType="DT_WSTR" />
        <Column Name="countryCode" Label="CountryCode" DataType="DT_WSTR" />
        <Column Name="currencyCode" Label="CurrencyCode" DataType="DT_WSTR" />
        <Column Name="dailyBudget" Label="DailyBudget" DataType="DT_DECIMAL" />
        <Column Name="timezone" Label="Timezone" DataType="DT_WSTR" />
        <Column Name="accountInfo.marketplaceStringId" Label="AccountInfoMarketPlaceStringId" DataType="DT_WSTR" />
        <Column Name="accountInfo.id" Label="AccountInfoId" DataType="DT_WSTR" />
        <Column Name="accountInfo.type" Label="AccountInfoType" DataType="DT_WSTR" />
        <Column Name="accountInfo.name" Label="AccountInfoName" DataType="DT_WSTR" />
        <Column Name="accountInfo.validPaymentMethod" Label="AccountInfoValidPaymentMethod" DataType="DT_BOOL" />
        <Column Name="accountInfo.subType" Label="UserId" DataType="DT_WSTR" />
      </OutputColumns>
    </EndPoint>


    <EndPoint Name="get_report"
              Label="Get Report"
              ResponseFormat="Json"
              Url="/sp/[$RecordType$]/report"
              Method="POST"
              NoOutputColumns="True"
              MetaScanRows="3000"
              CachedTtl="600"
              Headers="Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]"
              Desc="Downloads an Amazon Ads report."
              HelpLink="https://advertising.amazon.com/API/docs/en-us/sponsored-products/2-0/openapi#/Reports"
              ContentType="application/json">
      <Params>
        <Param Name="RecordType" Label="Record Type" Value="keywords" Required="True" Options="campaigns;adGroups;keywords;productAds;asins"/>
        <Param Name="StateFilter" Label="State Filter" Required="False" ValueTemplate="&quot;stateFilter&quot;: &quot;{$value$}&quot;," Options=";enabled;paused;archived"/>
        <Param Name="CampaignType" Label="Campaign Type" Required="False" ValueTemplate="&quot;campaignType&quot;: &quot;{$value$}&quot;," Options=";sponsoredProducts;headlineSearch"/>
        <Param Name="Segment" Label="Segment" Required="False" ValueTemplate="&quot;segment&quot;: &quot;{$value$}&quot;," Options=";query;placement"/>
        <Param Name="ReportDate" Label="Report Date (yyyyMMdd)"
        Value="today" Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" Required="True" Desc="The date for which to retrieve the report in YYYYMMDD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)"
        ValueTemplate="&lt;&lt;{$value$}||yyyyMMdd,FUN_TO_DATE&gt;&gt;" />
        <Param Name="Metrics" MultiSelect="True" MultiSelectSeparator = "," Required="True" Options="adGroupId;adGroupName;attributedConversions14d;attributedConversions14dSameSKU;attributedConversions1d;attributedConversions1dSameSKU;attributedConversions30d;attributedConversions30dSameSKU;attributedConversions7d;attributedConversions7dSameSKU;attributedKindleEditionNormalizedPagesRead14d;attributedKindleEditionNormalizedPagesRoyalties14d;attributedSales14d;attributedSales14dSameSKU;attributedSales1d;attributedSales1dSameSKU;attributedSales30d;attributedSales30dSameSKU;attributedSales7d;attributedSales7dSameSKU;attributedUnitsOrdered14d;attributedUnitsOrdered14dSameSKU;attributedUnitsOrdered1d;attributedUnitsOrdered1dSameSKU;attributedUnitsOrdered30d;attributedUnitsOrdered30dSameSKU;attributedUnitsOrdered7d;attributedUnitsOrdered7dSameSKU;campaignBudget;campaignBudgetType;campaignId;campaignName;campaignStatus;clicks;cost;currency;impressions;keywordBid;keywordId;keywordStatus;keywordText;matchType;query" />
      </Params>
      <Body>
        <![CDATA[{           
            [$StateFilter$]
            [$CampaignType$]
            [$Segment$]
            "reportDate": "[$ReportDate$]", 
            "metrics": "[$Metrics$]"            
          }]]>
      </Body>
      <EndPoint Name="CheckStatus"
                Url="/sp/reports/[$parent.reportId$]"
                Method="GET"
                NoOutputColumns="True"
                Headers="Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="10" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="3600" />
          <Param Name="StatusCheckForFailedValue" Type="Property" Value="True" />
          <Param Name="StatusContinueValue" Type="Property" Value="IN_PROGRESS" />
          <Param Name="StatusFailedValue" Type="Property" Value="FAILURE" />
          <Param Name="StatusSuccessValue" Type="Property" Value="SUCCESS" />
        </Params>
        <EndPoint Name="DownloadReport"
                  Url="/sp/reports/[$parent.reportId$]/download"
                  Method="GET"
                  Headers="Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]"
                  CachedTtl="30">
          <Params>
            <Param Name="EnableStatusCheck" Type="Property" Value="false" />
            <Param Name="FileCompressionType" Value="GZip" />
          </Params>
        </EndPoint>
      </EndPoint>
    </EndPoint>


    <EndPoint Name="get_beta_report"
              Label="Get Beta Report"
              ResponseFormat="Json"
              Url="/reporting/reports"
              Method="POST"
              NoOutputColumns="True"
              MetaScanRows="3000"
              CachedTtl="600"
              Headers="ContentType:application/vnd.createasyncreportrequest.v3+json||Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]"
              Desc="Generates and downloads an Amazon Ads report."
              HelpLink="https://advertising.amazon.com/API/docs/en-us/guides/reporting/v3/get-started">
      <Params>
        <Param Name="ReportName" Label="Report Name" Required="True"
               Desc="" Value="Test Name" />
        <Param Name="ReportType" Label="Report Type" Value="spCampaigns" Required="True"
               Desc=""
               Options="Campaigns=spCampaigns;Targeting=spTargeting;Search Term=spSearchTerm;Advertised Product=spAdvertisedProduct;Purchased Product=spPurchasedProduct" />
        <Param Name="TimeUnit" Label="Time Unit" Value="SUMMARY" VisibleIf="ReportType==spCampaigns" RequiredIf="ReportType==spCampaigns"
               Desc=""
               Options="Summary=SUMMARY;Daily=DAILY" />
        <Param Name="GroupByCampaignReportType" Label="Group By" Value="campaign" VisibleIf="ReportType==spCampaigns" RequiredIf="ReportType==spCampaigns"
               Desc=""
               Options=";Campaign=campaign;Ad Group=adGroup;Campaign Placement=campaignPlacement" />
        <Param Name="GroupByTargetingReportType" Label="Group By" Value="targeting" VisibleIf="ReportType==spTargeting" RequiredIf="ReportType==spTargeting"
               Desc=""
               Options=";Targeting=targeting" />
        <Param Name="GroupBySearchTermReportType" Label="Group By" Value="searchTerm" VisibleIf="ReportType==spSearchTerm" RequiredIf="ReportType==spSearchTerm"
               Desc=""
               Options=";Search Term=searchTerm" />
        <Param Name="GroupByAdvertisedProductReportType" Label="Group By" Value="advertiser" VisibleIf="ReportType==spAdvertisedProduct" RequiredIf="ReportType==spAdvertisedProduct"
               Desc=""
               Options=";Advertiser=advertiser" />
        <Param Name="GroupByPurchasedProductReportType" Label="Group By" Value="asin" VisibleIf="ReportType==spPurchasedProduct" RequiredIf="ReportType==spPurchasedProduct"
               Desc=""
               Options=";ASIN=asin;Purchased ASIN=purchasedAsin" />        
        <Param Name="StartDatePurchasedProductReportTypeGroupByAsin" Label="Report Start Date (yyyy-MM-dd) Maximum date range: 31 days" Required="True" Value="today-30d" ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;"
               VisibleIf="GroupByPurchasedProductReportType==asin" RequiredIf="GroupByPurchasedProductReportType==asin"
               Desc="The start date for the data to retrieve in YYYY-MM-DD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3 days from month start)"
               Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" />
        <Param Name="EndDatePurchasedProductReportTypeGroupByAsin" Label="Report End Date (yyyy-MM-dd) Maximum date range: 31 days" Required="True" Value="today" ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;"
               VisibleIf="GroupByPurchasedProductReportType==asin" RequiredIf="GroupByPurchasedProductReportType==asin"
               Desc="The end date for the data to retrieve in YYYY-MM-DD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3 days from month start)"
               Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" />
        <Param Name="StartDatePurchasedProductReportTypeGroupByPurchasedAsin" Label="Report Start Date (yyyy-MM-dd) Maximum date range: 731 days" Required="True" Value="today-365d" ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;"
               VisibleIf="GroupByPurchasedProductReportType==purchasedAsin" RequiredIf="GroupByPurchasedProductReportType==purchasedAsin"
               Desc="The start date for the data to retrieve in YYYY-MM-DD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3 days from month start)"
               Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" />
        <Param Name="EndDatePurchasedProductReportTypeGroupByPurchasedAsin" Label="Report End Date (yyyy-MM-dd) Maximum date range: 731 days" Required="True" Value="today" ValueTemplate="&lt;&lt;{$value$}||yyyy-MM-dd,FUN_TO_DATE&gt;&gt;"
               VisibleIf="GroupByPurchasedProductReportType==purchasedAsin" RequiredIf="GroupByPurchasedProductReportType==purchasedAsin"
               Desc="The end date for the data to retrieve in YYYY-MM-DD format. Supported functions now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3 days from month start)"
               Options="today;yesterday;monthstart;monthend;yearstart;yearend;weekstart;weekend;yearstart-1y;yearend-1y;monthstart-1d;monthend+1d;2022-01-31" />
        <Param Name="GroupByCampaignMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==campaign" RequiredIf="GroupByCampaignReportType==campaign"
               Options="impressions;clicks;cost;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;date;startDate;endDate;campaignBiddingStrategy;costPerClick;clickThroughRate;spend;campaignName;campaignId;campaignStatus;campaignBudgetAmount;campaignBudgetType;campaignRuleBasedBudgetAmount;campaignApplicableBudgetRuleId;campaignApplicableBudgetRuleName;campaignBudgetCurrencyCode;topOfSearchImpressionShare" />
        <Param Name="GroupByAdGroupMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==adGroup" RequiredIf="GroupByCampaignReportType==adGroup"
               Options="impressions;clicks;cost;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;date;startDate;endDate;campaignBiddingStrategy;costPerClick;clickThroughRate;spend;adGroupName;adGroupId;adStatus" />
        <Param Name="GroupByCampaignPlacementMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==campaignPlacement" RequiredIf="GroupByCampaignReportType==campaignPlacement"
               Options="impressions;clicks;cost;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;date;startDate;endDate;campaignBiddingStrategy;costPerClick;clickThroughRate;spend;placementClassification" />
        <Param Name="GroupByTargetingMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==targeting" RequiredIf="GroupByCampaignReportType==targeting"
               Options="impressions;clicks;costPerClick;clickThroughRate;cost;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;salesOtherSku7d;unitsSoldOtherSku7d;acosClicks7d;acosClicks14d;roasClicks7d;roasClicks14d;keywordId;keyword;campaignBudgetCurrencyCode;date;startDate;endDate;portfolioId;campaignName;campaignId;campaignBudgetType;campaignBudgetAmount;campaignStatus;keywordBid;adGroupName;adGroupId;keywordType;matchType;targeting;topOfSearchImpressionShare;adKeywordStatus" />
        <Param Name="GroupBySearchTermMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==searchTerm" RequiredIf="GroupByCampaignReportType==searchTerm"
               Options="impressions;clicks;costPerClick;clickThroughRate;cost;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;salesOtherSku7d;unitsSoldOtherSku7d;acosClicks7d;acosClicks14d;roasClicks7d;roasClicks14d;keywordId;keyword;campaignBudgetCurrencyCode;date;startDate;endDate;portfolioId;searchTerm;campaignName;campaignId;campaignBudgetType;campaignBudgetAmount;campaignStatus;keywordBid;adGroupName;adGroupId;keywordType;matchType;targeting;adKeywordStatus" />
        <Param Name="GroupByAdvertiserMetrics" Label="Metrics" MultiSelect="True" MultiSelectSeparator=","
               Desc="" Value="clicks"
               VisibleIf="GroupByCampaignReportType==advertiser" RequiredIf="GroupByCampaignReportType==advertiser"
               Options="date;startDate;endDate;campaignName;campaignId;adGroupName;adGroupId;adId;portfolioId;impressions;clicks;costPerClick;clickThroughRate;cost;spend;campaignBudgetCurrencyCode;campaignBudgetAmount;campaignBudgetType;campaignStatus;advertisedAsin;advertisedSku;purchases1d;purchases7d;purchases14d;purchases30d;purchasesSameSku1d;purchasesSameSku7d;purchasesSameSku14d;purchasesSameSku30d;unitsSoldClicks1d;unitsSoldClicks7d;unitsSoldClicks14d;unitsSoldClicks30d;sales1d;sales7d;sales14d;sales30d;attributedSalesSameSku1d;attributedSalesSameSku7d;attributedSalesSameSku14d;attributedSalesSameSku30d;salesOtherSku7d;unitsSoldSameSku1d;unitsSoldSameSku7d;unitsSoldSameSku14d;unitsSoldSameSku30d;unitsSoldOtherSku7d;kindleEditionNormalizedPagesRead14d;kindleEditionNormalizedPagesRoyalties14d;acosClicks7d;acosClicks14d;roasClicks7d;roasClicks14d" />
      </Params>
      <Body>
        <![CDATA[{
          "name":"[$ReportName$]",
          "startDate":"[$StartDate$]",
          "endDate":"[$EndDate$]",
          "configuration":{
            "adProduct":"SPONSORED_PRODUCTS",
            "groupBy":["[$GroupBy$]"],
            "columns":["adGroupId","campaignId","keywordId","matchType","keyword","impressions", "clicks", "cost", "purchases1d", "purchases7d", "purchases14d", "purchases30d","startDate","endDate"],
            "filters": [
              {
                "field": "keywordType",
                "values": [
                "BROAD",
                "PHRASE",
                "EXACT"
                ]
              }
            ],
            "reportTypeId":"[$ReportType$]",
            "timeUnit":"[$TimeUnit$]",
            "format":"GZIP_JSON"
          }
        }]]>
      </Body>
      <EndPoint Name="CheckReportStatus"
                Url="/reporting/reports/[$parent.reportId$]"
                Method="GET"
                NoOutputColumns="True"
                Headers="ContentType:application/vnd.createasyncreportrequest.v3+json||Amazon-Advertising-API-ClientId:[$AppId$]||Amazon-Advertising-API-Scope:[$Profile$]">
        <Params>
          <Param Name="EnableStatusCheck" Type="Property" Value="true" />
          <Param Name="StatusCheckIterationWaitSeconds" Type="Property" Value="10" />
          <Param Name="StatusCheckMaxWaitSeconds" Type="Property" Value="3600" />
          <Param Name="StatusCheckForFailedValue" Type="Property" Value="True" />
          <Param Name="StatusContinueValue" Type="Property" Value="PENDING|PROCESSING" />
          <Param Name="StatusFailedValue" Type="Property" Value="FAILURE" />
          <Param Name="StatusSuccessValue" Type="Property" Value="COMPLETED" />
        </Params>
        
        <EndPoint Name="DownloadGeneratedReport"
                  Url="[$parent.url$]"
                  Method="GET"
                  CachedTtl="60"
                  Filter="$">
          <Params>
            <Param Name="HttpConnection" Type="Property" />
            <Param Name="EnableStatusCheck" Type="Property" Value="false" />
            <Param Name="FileCompressionType" Value="GZip" />
          </Params>
        </EndPoint>

    </EndPoint>
    </EndPoint>


  </EndPoints>


  <!-- TABLES -->
  <Tables>
    <Table Name="Profiles" SelectEndPoint="get_profiles" />
  </Tables>


</ApiConfig>