selling-partner-api
selling-partner-api copied to clipboard
createSubscription error: Request has missing or invalid parameters and cannot be parsed.
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!