GetReport
Creates and/or returns data for a specific report.
Execute
We can use GetReport stored procedure in two ways:
To create and download a report in which case you must at least set ReportType, StartDate and DownloadPath attributes. The stored procedure will wait until the report is processed server side.
EXEC GetReport @ReportType = '_GET_FLAT_FILE_ORDERS_DATA_', @StartDate = '08-27-2020', @DownloadPath = 'C:\Tests\AmazonMarketplaceTest'To download an existing report in which case you must at least set ReportID and DownloadPath attributes for ex:
EXEC GetReport @ReportID = '50815018501', @DownloadPath = 'C:\Tests\AmazonMarketplaceTest'
Note: This procedure makes use of indexed parameters. These input parameters are denoted with a '#' character at the end of their names.
Indexed parameters facilitate providing multiple instances a single parameter as inputs for the procedure.
Suppose there is an input parameter named Param#. Input multiple instances of an indexed parameter like this:
EXEC ProcedureName Param#1 = "value1", Param#2 = "value2", Param#3 = "value3"
Input
Name | Type | Required | Description |
ReportId | String | False | Unique ID of the report to download. |
DownloadPath | String | True | The File path to write the report data. |
CheckSum | Boolean | False | Boolean used to check sum of the report.
The default value is false. |
ReportType | String | False | Indicates the report type to request. |
StartDate | Datetime | False | The start date of the date range used to select the data to report. By default it is the current date. If specified, it must be before the current date. |
EndDate | Datetime | False | End date of the date range used to select the data to report. By default it is the current date. If specified, it must be before the current date. |
ReportOptions | String | False | Additional information to pass to the report. If the report accepts ReportOptions, the information is displayed in the report description in the ReportType enumerator section. |
MarketplaceIdList# | String | False | One or more marketplace IDs for the marketplace that registered the listing account. Default: The marketplace where you first registered your Selling Account. |
Result Set Columns
Name | Type | Description |
Success | Boolean | Boolean indicating the result of the operation. |
MD5SUM | String | The MD5 Sum of the report content. |
GeneratedReportId | String | A unique identifier for the report. |
ReportRequestId | String | A unique identifier for the report request. |
ReportProcessingStatus | String | The processing status of the request. |