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

createSubscription error: Request has missing or invalid parameters and cannot be parsed.

Open nerijustt opened this issue 2 years ago • 0 comments

Hello,

I am getting the following error:

Uncaught SellingPartnerApi\ApiException: [400] { "errors": [ { "code": "InvalidInput", "message": "Request has missing or invalid parameters and cannot be parsed.", "details": "" } ] }

$api = new NotificationsV1Api($config);
$body= new \SellingPartnerApi\Model\NotificationsV1\CreateSubscriptionRequest();
$body->setDestinationId('e5bb284d-....');
$body->setPayloadVersion('1.0');
$result = $api->createSubscription('LISTINGS_ITEM_STATUS_CHANGE', $body);
$res = json_decode($result->toHeaderValue(), true);
var_dump($res);

What am I doing wrong? Thanks for this tool!

nerijustt avatar Feb 09 '24 07:02 nerijustt