Hi there @jblouvet,
I see a ticket has been opened for your case and a team has reached out to you. I would check your emails to ensure you got their solution.
Thank you!
Alex
Hi Alex,
Thanks for the reminder. The problem is solved, it was a simple mismatch in the formatting of the data, due to extreme fatigue .
Cheers,
JB
Hi
I have a similar problem
If I use:
{
"profiles":
{
"email": "john.smith@domain.com"
}
]
}
It works fine and creates the name automatically
but as soon as I try to set the first name like so
{
"profiles": :
{
"email": "john.smith@domain.com"
},
{
"first_name": "Jonathan"
}
]
}
it gives me a response of {"detail":"email or phone number is a required field for each profile"}
Note: I do not have a custom ‘first_name’ field I just want to set the default profile first name/last name with data submitted from my form
What am I doing wrong Thanks
Hello @nickstaw,
This might be a formatting issue that we can sort out quickly. If you check out our api docs, we are sending a list >] full of profile objects {}. Each set of curly brackets represents 1 profile, and should contain all the properties for that profile. In the example request you sent over, it was technically attempting to subscribe 2 separate profiles (1 of which have no email or phone number). All the fields for one profile should be encapsulated into one set of curly brackets. This is an example where I am including two profiles in the request, this shouldn't raise an error because each profile has either an email or a phone number:
Hope that helped,
Alex
Hi Alex
Thanks that worked! I did try that before but I think I had a dodgy “ in the JSON which was throwing a formatting error!
Kind Regards
Nick
I’ve just been hit by this. I think your example in the API documentation could be much clearer if you just add a second email address to the second profile - then it’s obvious it’s two profiles being registered of two different people.
I have to confess I missed it was an array and I should have guessed - but if there’s ambiguity then it has room to be clearer and save us poor devs some fingernails.
Hey @siempreSteve,
Thanks for sharing this feedback! I’ll pass it along to our documentation team!
Thanks for being a part of our Klaviyo Community.
David