selling-partner-api
selling-partner-api copied to clipboard
NextToken cannot be specified with other input parameters
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.