selling-partner-api icon indicating copy to clipboard operation
selling-partner-api copied to clipboard

NextToken cannot be specified with other input parameters

Open AlexeyKosov opened this issue 2 years ago • 0 comments

Pulling reports using a "next token" throws an error: NextToken cannot be specified with other input parameters

/** @var SellingPartnerApi\Api\ReportsV20210630Api $reportsApi */
$reportsApi->getReports(next_token: $nextToken);

It generates the following request:

GET /reports/2021-06-30/reports?pageSize=10&nextToken=...

The pageSize parameter is being added to the request whereas it should not be.

As a quick workaround, I use

$reportsApi->getReports(page_size: null, next_token: $nextToken)

but it would be great if "next tokens" requests worked out-of-the-box.

AlexeyKosov avatar Oct 12 '23 12:10 AlexeyKosov