Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400 when trying to call getMyFeesEstimates on productFeesV0 #736

Closed
MickDev13 opened this issue Jun 20, 2024 · 1 comment
Closed

Comments

@MickDev13
Copy link

MickDev13 commented Jun 20, 2024

Hello,

I waited for the version 7.0.0 to confirm or not my issue was still here.
It seems it is not fixed yet.
Here is my code:

$AMZConnector = SellingPartnerApi::seller(
  clientId: xxxx,
  clientSecret: xxxx,
  refreshToken: xxxxxx,
  endpoint: Endpoint::EU
);

$listing = new \SellingPartnerApi\Seller\ProductFeesV0\Dto\MoneyType("EUR", 100);

$shipping = new \SellingPartnerApi\Seller\ProductFeesV0\Dto\MoneyType("EUR", 0);

$priceToEstimateFees = new \SellingPartnerApi\Seller\ProductFeesV0\Dto\PriceToEstimateFees($listing, $shipping);

$feesRequest = new \SellingPartnerApi\Seller\ProductFeesV0\Dto\FeesEstimateRequest(xxxxxxxxxx, $priceToEstimateFees, "myidentifier-fee-" . date('YmdHis'), true);

$request = new \SellingPartnerApi\Seller\ProductFeesV0\Dto\FeesEstimateByIdRequest("SellerSKU", $sku, $feesRequest);
$body = array($request);

$apiInstance = $AMZConnector->productFeesV0();
$response = $apiInstance->getMyFeesEstimates($body);

This call raises the following exception:

Bad Request (400) Response: {
  "errors": [
    {
      "code": "InvalidInput",
      "message": "This is an invalid input",
      "details": "Missing objects [PriceToEstimateFees] in body parameters."
    }
  ]
}

Am I doing something wrong?

@MickDev13 MickDev13 changed the title Error 400 when trying to call getMyFeesEstimates Error 400 when trying to call getMyFeesEstimates on productFeesV0 Jun 20, 2024
@jlevers
Copy link
Owner

jlevers commented Jun 21, 2024

Thanks for finding this – it's fixed in v7.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants