Using PHP, we’re attempting to do a transactional email “simple send” fails, despite building my Request object using the RequestEgg.
Full error:
{"status":"error","message":"Invalid input JSON on line 1, column 67: Cannot deserialize value of type java.util.LinkedHashMap<java.lang.String,java.lang.String>from Array value (tokenJsonToken.START_ARRAY)","correlationId":"7ab5cf67-6968-476a-8b66-2e0a76c9cf9d"}
Here’s the section of code throwing the error:
$email = new \HubSpot\Client\Marketing\Transactional\Model\PublicSingleSendRequestEgg([
'email_id' => 123456789,
'message' => [
'to' => 'myemail@email.com',
],
'contact_properties' => [
[
'name' => 'firstname',
'value' => 'MyName'
]
],
'custom_properties' => [
[
'name' => 'trackingNumber',
'value' => '12345678987654321'
]
]
]);
return $HubSpot->marketing()->transactional()->singleSendApi()->sendEmail($email);
Curious if anyone can help point us in the right direction?
