我有一个活动,我用 $mj->post 将它发送到联系人列表。
但我想使用 API 中的以下代码管理测试
$response = $mj->post(Resources::$NewsletterTest, ['id' => $idNewsletter, 'body' => $body]);
但后来我用这样的personnalmessage定义了$body:
$body = [
'Recipients' => [
[
'Email' => "myemail@myemail.com",
'Name' => "John",
'Vars' => [
'personalmessage' => "Hello John this is a test"
]
]
]
];
我收到以下错误:
"Invalid json input:
object ".Recipients..item"->"TTestRecipient" has no property "Vars"" ["StatusCode"]=> int(400)
而且我不明白如何纠正这个问题