Hello everybody,
I’m integrating a popup for newsletter susbscription on a Prestashop website and I want to send the email registered to the API “list subscription”.
I already have an hook which is call after a newsletter subscription and call the “subscribeCustomer” function of the KlaviyoApiWrapper class with params: “email” => customer@mail.com and ‘customerProperties’ => r]
The function is succefully called, but the problem is on API call I think, on “subscribeMemberToList” function, i have a request to:
url: https://a.klaviyo.com/api/v2/list/(my_list_id)/subscribe
with this body:
{
"profiles":p
{
"email":"exemple@mymail.com",
"$phone_number":null,
"$first_name":null,
"$last_name":null,
"$source":"PrestaShop",
"$consent":l
"email"
]
}
]
}
And the request return an empty response with the status code 200 (success), but nothing is add on my list. I already tried to change the body on postman but i have the same problem:
{
"profiles":0
{
"email":"exemple@mymail.com"
}
]
}
someone have an idea ?
Thanks in advance,
Julien