Is there currently a way to batch triggered send requests through the REST API? All I'm finding in the documentation is triggering one at a time.
Code Sample (removing the array and only sending one element works as expected):
fuel({
method: 'POST',
url: 'https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:33/send',
json: true,
body: [{
From:{
Address:"[email protected]",
Name:"David"
},
To:{
Address:"[email protected]",
SubscriberKey:"[email protected]",
ContactAttributes:{
SubscriberAttributes:{
CusField1:"My Custom Field 1",
CusField2:"My Custom Field 2",
CusField3:"My Custom Field 3"
}
}
}
},{
From:{
Address:"[email protected]",
Name:"David"
},
To:{
Address:"[email protected]",
SubscriberKey:"[email protected]",
ContactAttributes:{
SubscriberAttributes:{
CusField1:"My Custom Field 1",
CusField2:"My Custom Field 2",
CusField3:"My Custom Field 3"
}
}
}
}]
}, function (error, request, body) {
console.log("response: " + JSON.stringify(body));
});
console: < response: {"message":"Problem initating message send during deserialization of JSON payload.","errorcode":10004,"documentation":""}
I have tried different variations of the above code like sending just the "To" section as an array and encapsulating the array in parent brackets. I used fuel for ease of example, but the same error can be achieved in Postman.