Json node is missing child properties


#1

[{“properties”:
[
{“property”:“email”,
“value”:"abc@yahoo.com"},
{“property”:“firstname”,
“value”:“abc”},
{“property”:“lastname”,
“value”:“abc”},
{“property”:“phone”,
“value”:“0000000”},
{“property”:“mobilephone”,
“value”:“0000000”},
{“property”:“address”,
“value”:“abc”},
{“property”:“city”,
“value”:“abc”},
{“property”:“state”,
“value”:“abc”},
{“property”:“zip”,
“value”:“00000”},
{“property”:“average_utility_bill”,
“value”:“350.00”},
{“property”:“lifecyclestage”,
“value”:“lead”},
{“property”:“hs_lead_status”,
“value”:“New”},
{“property”:“hubspot_owner_id”,
“value”:“0000”},
{“property”:“lead_source”,
“value”:“Clean Energy Authority”}
]
}]

Response: {“status”:“error”,“message”:“Json node is missing child properties”,“correlationId”:“d3a6e364-dbcc-468b-82fd-b7f0f3d5e9f8”,“requestId”:“b4e63db1dbfd23d1f1837bbccfb3b333”}


#2

Hi @Sara_Mubideen, what endpoint were you seeing this with?


#3

Not sure what it is. This is the response I got from a third party company
that generates leads, we sent them the posting information and this is the
reply we got from them. They’ve sent it to this endpoint however:
https://api.hubapi.com/contacts/v1/contact/?hapikey=


#4

I think there are a few different issues here. First, the JSON data is incorrect for that endpoint. There’s an extra set of brackets [] around the data. The correct format would be documented here:
https://developers.hubspot.com/docs/methods/contacts/create_contact

Second, the hapikey you originally posted is a Developer HAPIkey. That key can only be used to set up the Integration Platforms APIs (such as the Timeline API or Webhook API). It should not be used to test any of the other APIs, including the Contacts API. To do that, you’d need to create a test portal from your developer portal, and then get the API key from that test portal:
https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-portal
https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key

Last, you should regenerate that hapikey as soon as possible, which you can do from the same place that you originally got the key (the Get HAPIkey button on your developer dashboard). While that developer key can’t be used to get any actual data, it could be used to view information for the setup of any apps you’ve created.


#5

We adjusted that but the response shows these errors, what to use instead? Thanks!

  • Property “average_utility_bill” does not exist
  • 23640145 was not a valid owner ID",
  • Property “lead_source” does not exist"
  • New was not one of the allowed options

FULL TEST:
Gateway: https://api.hubapi.com/contacts/v1/contact/?hapikey=

Fields to send: {“properties”:[{“property”:“email”,“value”:“gbelilah@yahoo.com”},{“property”:“firstname”,“value”:“GALE”},{“property”:“lastname”,“value”:“BELILAH”},{“property”:“phone”,“value”:“9044365100”},{“property”:“mobilephone”,“value”:“9044365100”},{“property”:“address”,“value”:“409 14TH ST”},{“property”:“city”,“value”:“SAINT AUGUSTINE”},{“property”:“state”,“value”:“FL”},{“property”:“zip”,“value”:“32084”},{“property”:“average_utility_bill”,“value”:“350.00”},{“property”:“lifecyclestage”,“value”:“lead”},{“property”:“hs_lead_status”,“value”:“New”},{“property”:“hubspot_owner_id”,“value”:“23640145”},{“property”:“lead_source”,“value”:“Clean Energy Authority”}]}

Response: {“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“a372d7d0-2c46-4181-9616-e9c223b5af64”,“validationResults”:[{“isValid”:false,“message”:“Property “average_utility_bill” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“average_utility_bill”},{“isValid”:false,“message”:“23640145 was not a valid owner ID”,“error”:“INVALID_OWNER_ID”,“name”:“hubspot_owner_id”},{“isValid”:false,“message”:“Property “lead_source” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“lead_source”},{“isValid”:false,“message”:“New was not one of the allowed options: [label: “New”\nvalue: “NEW”\ndisplay_order: 0\n, label: “Open”\nvalue: “OPEN”\ndisplay_order: 1\n, label: “In Progress”\nvalue: “IN_PROGRESS”\ndisplay_order: 2\n, label: “Open Deal”\nvalue: “OPEN_DEAL”\ndisplay_order: 2\n, label: “Unqualified”\nvalue: “UNQUALIFIED”\ndisplay_order: 3\n]”,“error”:“INVALID_OPTION”,“name”:“hs_lead_status”}],“requestId”:“6b7a46bf2437d3749831299fd85a8538”}


#6

@dadams any thoughts on this??


#7

@Sara_Mubideen properties will need to be created in the portal before you can use them with contacts, so if you haven’t created a property with the name average_utility_bill you’d need to create that first, either in HubSpot or through the API.


#8

@Sara_Mubideen also, as I mentioned before, please remove your hapikey from any URLs before posting. Posting the key from your portal will allow anyone to view data for your portal.

Even for a test portal, I’d recommend deactivating and generating a new key as soon as possible.


#9

I only posted it because it’s just a test portal and basically has nothing. will change it though… As for the properties, they were all setup in hubspot. something is wrong/ missing in the code, can’t tell what it is though


#10

Properties are specific to the portal they’re created in, so if you’re working with a test portal you’d need to recreate any custom properties in that test portal.


#11

@dadams I had it sent to a portal that has these properties for sure, I am still getting errors, is there some kind of prerequisite I had to do that might be causing this?

Response:
{
“status”:“error”,
“message”:“Property values were not valid”,
“correlationId”:"*************",
“validationResults”:
[
{
“isValid”:false,
“message”:“Property “average_utility_bill” does not exist”,
“error”:“PROPERTY_DOESNT_EXIST”,“name”:“average_utility_bill”
},
{
“isValid”:false,“message”:“23640145 was not a valid owner ID”,
“error”:“INVALID_OWNER_ID”,
“name”:“hubspot_owner_id”
},
{
“isValid”:false,
“message”:“Property “lead_source” does not exist”,
“error”:“PROPERTY_DOESNT_EXIST”,
“name”:“lead_source”
},
{
“isValid”:false,
“message”:“New was not one of the allowed options:
[
label: “New”\nvalue: “NEW”\ndisplay_order: 0\n,
label: “Open”\nvalue: “OPEN”\ndisplay_order: 1\n,
label: “In Progress”\nvalue: “IN_PROGRESS”\ndisplay_order: 2\n,
label: “Open Deal”\nvalue: “OPEN_DEAL”\ndisplay_order: 2\n,
label: “Unqualified”\nvalue: “UNQUALIFIED”\ndisplay_order: 3\n]
”,“error”:“INVALID_OPTION”,“name”:“hs_lead_status”
}],
“requestId”:“556cd982a549fd5d67c860a415e9f949”
}

Delivery Error(s): Response is not success.


#12

Can you message me with the Hub ID you’re testing this with? The test portal for the hapikey you posted earlier did not have those contact properties.