We have an event that is not linked to profiles, but rather is transactional, can be sent to any email, even if it is not a profile in the system. Our current event code is as follows:
$event = '{
"token" : "blabla",
"event" : "Send VPA Customer Review",
"customer_properties" : {
"$email" : "'.$send->email.'",
"$first_name" : "'.$send->first_name.'",
"$last_name" : "'.$send->last_name.'"
},
"properties" : {
"reviewUrl" : "'.URL::to('/').'/savereview/'.urlencode(Crypt::encryptString($send->uuid)).'",
"first_name" : "'.$send->first_name.'",
"last_name" : "'.$send->last_name.'",
"products": '.$out_json.'
},
"time" : '.time().'
}';
file_get_contents('https://a.klaviyo.com/api/track?data=' . urlencode(base64_encode($event)));
I need to know how to convert this to the new events API found at https://developers.klaviyo.com/en/reference/create_event