Tutorial: Request a report
Request reports from Amazon to help selling partners manage their business.
API Version: 2021-06-30
Tutorial: Request and retrieve a report
To request a report:
-
Call the
createReport
operation. Specify the type of report, the marketplaces, and any optional parameters you want to include. If your request is successful, the response includes areportId
value. -
Periodically poll the Amazon SQS queue for a
REPORT_PROCESSING_FINISHED
notification event, which provides information about when the report processing isCANCELLED
,DONE
, orFATAL
. If report data is available, the notification event includes areportDocumentId
value. -
Call the
getReportDocument
operation and include thereportDocumentId
value from the previous step.Amazon returns a pre-signed URL for the location of the report document. If the report document contents have been compressed, the compression algorithm is provided.
-
Download the report.
Prerequisites
To complete this tutorial, you need:
-
The report type that you will request. Refer to Report Type Values for a list of the available report types.
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
A working Java Development Kit (JDK) installation to run sample code.
Step 1. Request a report
To request a report, specify the report type and marketplaces that you are requesting, and any optional parameters.
- Call the
createReport
operation, passing the following parameters:
Name | Description | Required |
---|---|---|
reportOptions | Additional information passed to reports. This varies by report type. Type: ReportOptions | No |
reportType | The report type. For more information, refer to Report Type Values. Type: string | Yes |
dataStartTime | The start of a date and time range, in ISO 8601 date-time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. Type: string (date-time) | No |
dataEndTime | The end of a date and time range, in ISO 8601 date-time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. Type: string (date-time) | No |
marketplaceIds | A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. Type: < string > array | Yes |
createReport
request example
createReport
request examplePOST https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports
{
"reportType": "GET_MERCHANT_LISTINGS_ALL_DATA",
"dataStartTime": "2019-12-10T20:11:24.000Z",
"marketplaceIds": [
"A1PA6795UKMFR9",
"ATVPDKIKX0DER"
]
}
createReport
response
createReport
responseA successful response includes the following:
Name | Description |
---|---|
reportId | The identifier for the report. This identifier is unique only in combination with a seller ID. Type: string |
createReport
response example
createReport
response example{
"reportId": "ID323"
}
Step 2. Confirm that the report processing is complete
To confirm that the report processing is complete, refer to Verify that the report processing is complete.
Step 3. Retrieve the report
To retrieve the report, refer to Retrieve a report.
Tutorial: Request and retrieve a bulk invoice report for MCF orders (India only)
To request a report:
-
Call the
createReport
operation. Specify the type of report, the marketplaces, and any optional parameters you want to include. If your request is successful, the response includes areportId
value. -
Periodically poll the Amazon SQS queue for a
REPORT_PROCESSING_FINISHED
notification event, which provides information about when the report processing isCANCELLED
,DONE
, orFATAL
. If report data is available, the notification event includes areportDocumentId
value. -
Call the
getReportDocument
operation and include thereportDocumentId
value from the previous step.Amazon returns a pre-signed URL for the location of the report document. If the report document contents have been compressed, the compression algorithm is provided.
-
Download the report.
Prerequisites
To complete this tutorial, you need:
-
The report type that you will request. Refer to reportType values for a list of the available report types.
-
Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
-
A working Java Development Kit (JDK) installation to run sample code.
Step 1. Request a report
To request a report, specify the report type and marketplaces that you are requesting, and any optional parameters.
- Call the
createReport
operation, passing the following parameters:
Name | Description | Required |
---|---|---|
reportOptions | Additional information passed to reports. This varies by report type. Type: ReportOptions | No |
reportType | The report type. The value must be FBA_BULK_INVOICE . For more information, refer to Regulatory Compliance Report Type Values.Type: string | Yes |
dataStartTime | The start of a date and time range, in ISO 8601 date-time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. Type: string (date-time) | No |
dataEndTime | The end of a date and time range, in ISO 8601 date-time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. Type: string (date-time) | No |
marketplaceIds | A list of marketplace identifiers. The report document's contents will contain data for all of the specified marketplaces, unless the report type indicates otherwise. Type: < string > array | Yes |
createReport
request example
createReport
request examplePOST https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports
{
"marketplaceIds": [
"A2XZLSVIQ0F4JT"
],
"reportType": "FBA_BULK_INVOICE",
"dataEndTime": "2023-05-27T23:59:59+00:00",
"dataStartTime": "2023-05-22T00:00:00+00:00"
}
createReport
response
createReport
responseA successful response includes the following:
Name | Description |
---|---|
reportId | The identifier for the report. This identifier is unique only in combination with a seller ID. Type: string |
createReport
response example
createReport
response example{
"reportId": "51665019712"
}
Step 2. Confirm that the report processing is complete
To confirm that the report processing is complete, refer to Verify that the report processing is complete.
Step 3. Retrieve the report
To retrieve the report, refer to Retrieve a report.
Updated 3 days ago