APIs & Integrations

WernerD
Member

Error creating contacts (HubSpot.NET) - Property \"properties\" does not exist

Have there been any changes in Hubspot-ContactApi since November 2019?

 

I try to upload contacts by use of the HubSpot.NET - wrapper (actual download from https://github.com/hubspot-net/HubSpot.NET), but this doesn't work for me.

 

First I had several mismatches with custom properties and could fix them, but I can't locate the last problem "Property \"properties\" does not exist" (see exception below).

 

When I try to run the code-example from the library which is very simple,  I still get the same error. There seems to be some trouble with the return properties-structure ... but I can't get it.

 

This is the example-code:

/**
* Create a contact
*/
var contact = api.Contact.Create(new ContactHubSpotModel()
{
Email = "another@person.com",
FirstName = "John",
LastName = "Smith",
Phone = "00000 000000",
Company = "Oliver & Co"
});


HubSpot.NET.Core.HubSpotException
HResult=0x80131500
Nachricht = Error from HubSpot, Response = {"validationResults":[{"isValid":false,"message":"Property \"properties\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"properties"}],"status":"error","message":"Property values were not valid","correlationId":"997e3ca5-7972-470e-901d-8dba6d606a78","requestId":"aeb8477dadf2831cdba652a03a6c90ea"}
Quelle = HubSpot.NET
Stapelüberwachung:
bei HubSpot.NET.Core.HubSpotBaseClient.SendReceiveRequest[T,K](String path, Method method, K entity) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET\Core\HubSpotBaseClient.cs: Zeile121
bei HubSpot.NET.Core.HubSpotBaseClient.Execute[T,K](String absoluteUriPath, K entity, Method method) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET\Core\HubSpotBaseClient.cs: Zeile45
bei HubSpot.NET.Api.Contact.HubSpotContactApi.Create(ContactHubSpotModel entity) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET\Api\Contact\HubSpotContactApi.cs: Zeile48
bei HubSpot.NET.Examples.Contacts.Example(HubSpotApi api) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET.Examples\Contacts.cs: Zeile26
bei HubSpot.NET.Examples.Examples.RunApiKeyExamples(HubSpotApi hapiApi) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET.Examples\Program.cs: Zeile103
bei HubSpot.NET.Examples.Examples.Main(String[] args) in d:\Prog\Projekte\Hubspot\HubSpot.NET-master\HubSpot.NET.Examples\Program.cs: Zeile84

0 Upvotes
1 Reply 1
Willson
HubSpot Employee
HubSpot Employee

Error creating contacts (HubSpot.NET) - Property \"properties\" does not exist

Hi @WernerD,

 

Taking a look at this wrapper, I can see that this is not an official HubSpot wrapper and so is something we do not directly support. 

 

With that said, taking a look into the response, it appears our API is unable to identify the properties being passed as they are not in a "properties" parameter as outlined in our documentation, here: https://developers.hubspot.com/docs/methods/contacts/create_contact

 

I'd recommend attempting to alter how the payload is being passed to ensure the properties parameter is included so that our API can properly process the incoming data. 

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes