HomeDocumentationCode SamplesAPI ReferenceAnnouncementsModelsRelease NotesFAQGitHubVideos
Developer HubAPI StatusSupport
Documentation
Developer HubAPI StatusSupport

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:

  1. 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 a reportId value.

  2. Periodically poll the Amazon SQS queue for a REPORT_PROCESSING_FINISHED notification event, which provides information about when the report processing is CANCELLED, DONE, or FATAL. If report data is available, the notification event includes a reportDocumentId value.

  3. Call the getReportDocument operation and include the reportDocumentId 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.

  4. 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:
NameDescriptionRequired
reportOptionsAdditional information passed to reports. This varies by report type.
Type: ReportOptions
No
reportTypeThe report type. For more information, refer to Report Type Values.
Type: string
Yes
dataStartTimeThe 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
dataEndTimeThe 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
marketplaceIdsA 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

POST 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

A successful response includes the following:

NameDescription
reportIdThe identifier for the report. This identifier is unique only in combination with a seller ID.
Type: string

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:

  1. 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 a reportId value.

  2. Periodically poll the Amazon SQS queue for a REPORT_PROCESSING_FINISHED notification event, which provides information about when the report processing is CANCELLED, DONE, or FATAL. If report data is available, the notification event includes a reportDocumentId value.

  3. Call the getReportDocument operation and include the reportDocumentId 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.

  4. 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:
NameDescriptionRequired
reportOptionsAdditional information passed to reports. This varies by report type.
Type: ReportOptions
No
reportTypeThe report type. The value must be FBA_BULK_INVOICE. For more information, refer to Regulatory Compliance Report Type Values.
Type: string
Yes
dataStartTimeThe 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
dataEndTimeThe 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
marketplaceIdsA 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

POST 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

A successful response includes the following:

NameDescription
reportIdThe identifier for the report. This identifier is unique only in combination with a seller ID.
Type: string

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.


Did this page help you?