Reference

Endpoint Download Report File to Local Disk


Name

download_report

Description

Returns data from the specified report type. You can check following link for various available reports (list updated frequently), you can access report based on API Key role / permission, participation (e.g. Vendor/Seller), seller market place etc http://docs.developer.amazonservices.com/en_US/reports/Reports_ReportType.html. Depending on which Report you choose, it can take upto 30 minutes to generate report. Also some reports have strict limits on how many times you can access per hour (e.g. 2 times per 30 minutes). Check documentation for call limits.

Parameters

Parameter Required Options
Name: ReportType

Label: ReportType

YES
Name: MarketplaceIds

Label: MarketplaceIds

YES
Option Value
United States of America ATVPDKIKX0DER
Brazil A2Q3Y263D00KWC
Canada A2EUQ1WTGCTBG2
Mexico A1AM78C64UM0Y8
Spain A1RKKUPIHCS9HS
United Kingdom A1F83G8C2ARO7P
France A13V1IB3VIYZZH
Belgium AMEN7PMS3EDWL
Netherlands A1805IZSGTT6HS
Germany A1PA6795UKMFR9
Italy APJ6JRA9NG5V4
Sweden A2NODRKZP88ZB9
South Africa AE08WJ6YKNBMC
Poland A1C3SOZRARQ6R3
Egypt ARBP9OOSHTCHU
Turkey A33AVAJ2PDY3EV
Saudi Arabia A17E79C6D8DWNP
United Arab Emirates (U.A.E.) A2VIGQ35RCS4UG
India A21TJRUUN4KGV
Singapore A19VAU5U5O7RUS
Australia A39IBJ37TRP1C6
Japan A1VC38T7YXB528
Name: StartDate

Label: StartDate

Report Start date if applicable - Must be UTC date in ISO format e.g. (2020-01-31T00:00:00Z). You can use static values or date functions. Supported functions are 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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: EndDate

Label: EndDate

Report End date if applicable - Must be UTC date in ISO format e.g. (2020-01-31T00:00:00Z). You can use static values or date functions. Supported functions are 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)
Option Value
2023-12-31 2023-12-31
2023-12-31T00:00:00 2023-12-31T00:00:00
now now
now-24h now-24h
today today
yesterday yesterday
yearstart-10y yearstart-10y
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
monthend+1d-1y monthend+1d-1y
Name: ReportOptions

Label: ReportOptions

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Report DT_WSTR nvarchar(4000) 4000
Status DT_WSTR nvarchar(4000) 4000
TargetFilePath DT_WSTR nvarchar(4000) 4000
StatusCode DT_I4 int
ContentType DT_WSTR nvarchar(4000) 4000
ContentLength DT_I4 int
If the column you are looking for is missing, consider customizing Amazon Selling Partner (SP-API) Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

Use Amazon Selling Partner (SP-API) Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Amazon Selling Partner (SP-API)
Read and write Amazon Selling Partner (SP-API) data effortlessly. Integrate, manage, and automate listings, orders, payments, and reports — almost no coding required.
Amazon Selling Partner (SP-API)
Download Report File to Local Disk
Required Parameters
ReportType Fill-in the parameter...
File Overwrite Mode Fill-in the parameter...
Target File Path Fill-in the parameter...
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Amazon Selling Partner (SP-API)
Read and write Amazon Selling Partner (SP-API) data effortlessly. Integrate, manage, and automate listings, orders, payments, and reports — almost no coding required.
Amazon Selling Partner (SP-API)
Download Report File to Local Disk
Required Parameters
ReportType Fill-in the parameter...
File Overwrite Mode Fill-in the parameter...
Target File Path Fill-in the parameter...
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Download report to local disk

<p>Run a report and download the resulting file to a local path. Specify the report type, target path, and optionally date range and overwrite behavior.</p>

SELECT * FROM download_report
WITH(
	  ReportType='GET_XML_BROWSE_TREE_DATA'
	, TargetFilePath='c:\temp\GET_XML_BROWSE_TREE_DATA.gz'
	, MarketplaceIds='ATVPDKIKX0DER'
  --, FileOverwriteMode='FailIfExists' (Default is 'AlwaysOverwrite')
  --, StartDate='2012-12-31'	
  --, EndDate='today-1d'  
)

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Download report to local disk

<p>Run a report and download the resulting file to a local path. Specify the report type, target path, and optionally date range and overwrite behavior.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM download_report
WITH(
	  ReportType=''GET_XML_BROWSE_TREE_DATA''
	, TargetFilePath=''c:\temp\GET_XML_BROWSE_TREE_DATA.gz''
	, MarketplaceIds=''ATVPDKIKX0DER''
  --, FileOverwriteMode=''FailIfExists'' (Default is ''AlwaysOverwrite'')
  --, StartDate=''2012-12-31''	
  --, EndDate=''today-1d''  
)';

EXEC (@MyQuery) AT [LS_TO_AMAZON_SELLING_PARTNER_SP_API_IN_GATEWAY];