I am using https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert api to insert/update data to Hubspot.
Request Body be like this
{
“inputs”: [
{
“id”: “isabella@futureconnect.com”,
“idProperty”: “email”,
“properties”: {
“interest”: “EventNetworking, ProfessionalDevelopment”,
“hs_lead_status”: “NEW”,
“country”: “Algeria”,
“firstname”: “Isabella”,
“lastname”: “Andersonvv”,
“email”: “isabella@futureconnect.com”
}
},
{
“id”: “appstore@apple.com”,
“idProperty”: “email”,
“properties”: {
“bio”: “Algeria”,
“company”: “Algeria”,
“seniority”: “Algeria”,
“phone”: “Algeria”,
“date_of_birth”: “Algeria”,
“hs_facebook_click_id”: “Algeria”,
“twitterhandle”: “Algeria”,
“hs_linkedin_url”: “Algeria”,
“instagram”: “Algeria”,
“hs_whatsapp_phone_number”: “Algeria”,
“text”: “Algeria”,
“number_input”: “Algeria”,
“multi_line_input”: “Algeria”,
“firstname”: “Don’t”,
“lastname”: “Delete”,
“email”: “appstore@apple.com”
}
},
{
“id”: “dipika.kundu@teks.co.in”,
“idProperty”: “email”,
“properties”: {
“interest”: “EventNetworking, IdeasThatShapeOurWorld”,
“firstname”: “Cepheid”,
“lastname”: “fdef”,
“email”: “dipika.kundu@teks.co.in”
}
},
{
“id”: “vinay.kumar@teks.co.in”,
“idProperty”: “email”,
“properties”: {
“interest”: “EventNetworking, NetworkingOpportunity, KnowledgeExchange”,
“hs_lead_status”: “NEW”,
“country”: “Afghanistan”,
“firstname”: “Vinay Kumar”,
“lastname”: “Pathak”,
“email”: “vinay.kumar@teks.co.in”
}
},
{
“id”: “k@n.com”,
“idProperty”: “email”,
“properties”: {
“bio”: “Afghanistan”,
“company”: “Afghanistan”,
“seniority”: “Afghanistan”,
“phone”: “Afghanistan”,
“date_of_birth”: “Afghanistan”,
“interest”: “NetworkingOpportunity, KnowledgeExchange, IdeasThatShapeOurWorld”,
“hs_facebook_click_id”: “Afghanistan”,
“twitterhandle”: “Afghanistan”,
“hs_linkedin_url”: “Afghanistan”,
“instagram”: “Afghanistan”,
“hs_whatsapp_phone_number”: “Afghanistan”,
“text”: “Afghanistan”,
“number_input”: “Afghanistan”,
“multi_line_input”: “Afghanistan”,
“firstname”: “kyle”,
“lastname”: “nick”,
“email”: “k@n.com”
}
},
{
“id”: “dk@test.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “Dk”,
“lastname”: “test”,
“email”: “dk@test.com”
}
},
{
“id”: “s@s.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “spon”,
“lastname”: “1”,
“email”: “s@s.com”
}
},
{
“id”: “a1@a.io”,
“idProperty”: “email”,
“properties”: {
“firstname”: “Exbit”,
“lastname”: “1”,
“email”: “a1@a.io”
}
},
{
“id”: “a3@a.io”,
“idProperty”: “email”,
“properties”: {
“firstname”: “A”,
“lastname”: “3”,
“email”: “a3@a.io”
}
},
{
“id”: “a5@a.io”,
“idProperty”: “email”,
“properties”: {
“firstname”: “A”,
“lastname”: “5”,
“email”: “a5@a.io”,
“interest”: “KnowledgeExchange”
}
},
{
“id”: “k@k.com”,
“idProperty”: “email”,
“properties”: {
“interest”: “EventNetworking, KnowledgeExchange, IdeasThatShapeOurWorld, InspiringLeaders”,
“firstname”: “Test”,
“lastname”: “Test”,
“email”: “k@k.com”
}
},
{
“id”: “new@test.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “dffd”,
“lastname”: “hghg”,
“email”: “new@test.com”,
“interest”: “EventNetworking, KnowledgeExchange, ProfessionalDevelopment”
}
},
{
“id”: “app@test.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “app”,
“lastname”: “test”,
“email”: “app@test.com”
}
},
{
“id”: “web@test.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “web”,
“lastname”: “test”,
“email”: “web@test.com”
}
},
{
“id”: “teks.teks2nd@gmail.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “Teks”,
“lastname”: “Teks2nd”,
“email”: “teks.teks2nd@gmail.com”,
“interest”: “NetworkingOpportunity, IdeasThatShapeOurWorld”
}
},
{
“id”: “db@eventify.io”,
“idProperty”: “email”,
“properties”: {
“interest”: “EventNetworking, NetworkingOpportunity, KnowledgeExchange, IndustryInsights, ProfessionalDevelopment”,
“checkbox”: [
“C2”,
“C3”
],
“hs_lead_status”: “OPEN”,
“country”: “Albania”,
“firstname”: “B”,
“lastname”: “Dips”,
“email”: “db@eventify.io”
}
},
{
“id”: “dkspk@test.com”,
“idProperty”: “email”,
“properties”: {
“firstname”: “Dipikaspk”,
“lastname”: “Dipikaspk”,
“email”: “dkspk@test.com”
}
},
{
“id”: “new@at.com”,
“idProperty”: “email”,
“properties”: {
“bio”: “Albania”,
“company”: “Albania”,
“seniority”: “Albania”,
“phone”: “Albania”,
“date_of_birth”: “Albania”,
“hs_facebook_click_id”: “Albania”,
“twitterhandle”: “Albania”,
“hs_linkedin_url”: “Albania”,
“instagram”: “Albania”,
“hs_whatsapp_phone_number”: “Albania”,
“text”: “Albania”,
“number_input”: “Albania”,
“multi_line_input”: “Albania”,
“firstname”: “new”,
“lastname”: “Attendee”,
“email”: “new@at.com”
}
}
]
}
I am getting error like
{
“status”: “error”,
“message”: “Invalid input JSON on line 1, column 3301: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)”,
“correlationId”: “ace72d1f-79cd-4bb9-aab7-79a654c05178”
}
Can somebody please please help on this?
Hey, @TTeks
It’s helpful for our community members if you include an example request that returns this error. It’s difficult to give an educated guess or definitive answer without more details.
Thanks! — Jaycee