Amazon Services
Amazon Marketplace Web Service (Amazon MWS) Documentation
Amazon MWS Documentation

Using NextToken to request additional pages

Describes how to use the NextToken to receive more response elements than the maximum number of response elements allowed by an operation.

If you make a request to Amazon Marketplace Web Service (Amazon MWS) that generates more response elements than the maximum number of response elements that can be returned per page, you can submit NextToken with a "ByNextToken" operation to request additional pages. NextToken works slightly differently for the Feeds and Reports API sections than it does for the other Amazon MWS API sections.

Using NextToken with the Amazon MWS Feeds and Reports API sections

  1. Submit an operation.

    If the HasNext response element returns false, there are no more response elements to return. Task is complete.

    OR

    If the HasNext response element returns true, there are more response elements to return. Continue to Step 2.

  2. Submit the “ByNextToken” operation that matches the operation you submitted in Step 1 (for example, submit GetReportListByNextToken if you submitted GetReportList) and include the NextToken value returned in Step 1.

    If the HasNext response element returns false, there are no more response elements to return. Task is complete.

    OR

    If the HasNext response element returns true, there are more response elements to return. Continue to Step 3.

  3. Continue submitting the “ByNextToken” operation until the HasNext response element returns false.
Note: When submitting the GetReportList or GetReportListByNextToken operations, be sure that HasNext returns false before submitting the UpdateReportAcknowledgements operation. This helps to ensure that all of the reports that match your query parameters are returned. For more information, see UpdateReportAcknowledgements.