-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hello!
I'm not sure if I'm just being an idiot, but I can't get batches to work. Any idea why this code would always return an error 400, 'Schema describes object, array found instead'?
public function update(Request $request) {
$orders = $request->orders;
$list = $request->list;
$operations = [];
foreach($orders as $order) {
$data = [
'email_address' => $order['email'],
'status' => 'Subscribed'
];
$operations[] = [
'method' => 'POST',
'path' => 'lists/' . $list . '/members',
'body' => json_encode($data)
];
}
$response = $this->mc->request('batches', [
$operations
], 'post');
return Response::json([
'message' => $response
], 200);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels