APIs & Integrations

b_ecr
Member

Custom properties and API

Hi,

I am reopening a ticket concerning an issue we had some days ago while building an API and is still not fixed.
The former ticket opened by my colleague is the following one: About the Contacts category

This is the last status we received:

“this is the hash that I’m trying to post. All the properties are in our contacts data
{:properties=>
[{:property=>“email”, :value=>"claudiu.garba@gmail.com”},
{:property=>“firstname”, :value=>“Ollie”},
{:property=>“lastname”, :value=>“Pesto”},
{:property=>“company”, :value=>“Jimmy Pesto Pizza”},
{:property=>“language”, :value=>“en”},
{:property=>“new_ecratum_company_id”, :value=>3},
{:property=>“gender”, :value=>nil},
{:property=>“jobtitle”, :value=>nil}]}

and this is the result from the call
{“status”=>“error”,
“message”=>“Property values were not valid”,
“correlationId”=>“84dff80b-49dc-4cbb-bb9a-28d60e81001c”,
“validationResults”=>
[{“isValid”=>false, “message”=>“Property “language” does not exist”, “error”=>“PROPERTY_DOESNT_EXIST”, “name”=>“language”},
{“isValid”=>false, “message”=>“Property “new_ecratum_company_id” does not exist”, “error”=>“PROPERTY_DOESNT_EXIST”, “name”=>“new_ecratum_company_id”},
{“isValid”=>false, “message”=>“Property “gender” does not exist”, “error”=>“PROPERTY_DOESNT_EXIST”, “name”=>“gender”}],
“requestId”=>“eccd1766-1f71-443a-b745-40cf66d1d227”}

Could you please have a look at it and come back to us ?
Thanks,

0 Upvotes
17 Replies 17
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Custom properties and API

Hi @pkhacker,

Developer portals don’t have access to any of the tools that ‘regular’ (Marketing/CRM) portals do, but it appears that requests made to developer portals to create contacts will still work. I’ll touch base with the team about that, since I can see how it can be confusing when getting started.

The portal in that image is your developer portal. As a general rule, your developer portal is where your app lives, your production portal (if you have one) is your paid HubSpot portal where you conduct your marketing/sales, and your test portals (if you have any) are sandbox portals where you can test your application. Check out the Developer Doc below for more info on creating test portals:

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Custom properties and API

Hi @pkhacker,

Are you using the hapikey from your developer portal? You’ll need to use the hapikey from your test/production portal instead:

0 Upvotes
pkhacker
Member

Custom properties and API

hello @Derek_Gervais! Thank you for your reply! :smiley:

May I ask what is the difference between developer portal and the test/production portal?

In any case, I got my hapikey from this place… not sure if it counts as developer portal or test/production portal…


I clicked on the Get HAPIkey button. Can you advise if I got my hapikey from the wrong place?

Also, why did this hapikey work for the https://developers.hubspot.com/docs/methods/contacts/create_contact
and not the
http://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property
when it is the same hapikey?

Are they from different “products” or “categories”? Because when I checked they belonged to the same “Marketing/CRM” category. Thanks!

0 Upvotes
aram
Member

Custom properties and API

I’m having the same issue with my Hub 3270170 what is the problem here? :disappointed:

0 Upvotes
Not applicable

Custom properties and API

I had the same problem. I found a hack around it. I created a form on hubspot and submitted the data through the forms endpoint. It’s not the most ideal way but works for what I wanted to do.

0 Upvotes
Not applicable

Custom properties and API

Re-checked properties again, seems that everything is fine.
Sorry for disturbing.
Thanks!

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Custom properties and API

@carlos.botero @rozhok the original issue here was something specific to the account in question and not a general issue with the API or properties.

Do you have any more details for the issues you’re seeing? Are you able to see the properties you’re trying to set if you pull all of the properties through the API?

0 Upvotes
Not applicable

Custom properties and API

@dadams
+1, Having the same problem. Custom fields are rather important for us and this ticket is 6 months old. Is there any estimates for fix?

0 Upvotes
Not applicable

Custom properties and API

We are having the exact same problem. We created a “Property Group” and we added some custom properties to it with the intention of filling them via the API.

The problem is that when we send the request to update those custom properties, the API response is that the properties do not exist.

@dadams do you have any update on this issue? Is it there any information that you would need from us to find out more about the problem?

alpipego
Member

Custom properties and API

I am having the same problem. I triple checked that the property exists but the API still responds with

{
  "status": "error",
  "message": "Property values were not valid",
  "correlationId": "xxxx",
  "validationResults": [
    {
      "isValid": false,
      "message": "Property \"heins\" does not exist",
      "error": "PROPERTY_DOESNT_EXIST",
      "name": "heins"
    }
  ],
  "requestId": "e971121a421508d9792499ecc75c662f"
}

Thanks in advance.
Alex

b_ecr
Member

Custom properties and API

My Hub ID is the following one: 462640
Thanks for your help!

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Custom properties and API

Thanks @b_ecr, taking a look at this now and I’ll message you directly when I get a better idea for what the problem is here.

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Custom properties and API

Hi @b_ecr

Those error messages indicate that those properties do not exist in the portal that you’re trying to create the contact in. You’ll need to create the properties in HubSpot before you’ll be able to create or update contacts using those properties.

You can either create the properties through the API: http://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property

or through the UI:

A quick tour of contacts and companies

Learn about how to use your contacts and companies database and use properties to store information about your records.

0 Upvotes
pkhacker
Member

Custom properties and API

Hi there @dadams!

I have tried to create the new properties through the API:
http://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property

However, I received a 403 error. :frowning:

It looks something like this: body: '{"status":"error","message":"This hapikey (...) does not have proper permissions! (requires all of [properties-settings-read])","correlationId":"...","requestId":"..."}' }

Strangely enough… I used the same hapikey to create contact with the standard properties and it worked fine… (this API: https://developers.hubspot.com/docs/methods/contacts/create_contact ) and there was no 403 error…

Am I missing something? Please let me know! It is rather urgent thanks! :smiley:

Andrew_tk
Participant

Custom properties and API

I have same trouble. Do you find the solution?

0 Upvotes
b_ecr
Member

Custom properties and API

Hi @dadams,

The problem is that all property actually already exist in our portal but somehow cannot be found by the API.
Is there any other possible cause ?

Thank you for your help,
B.

Dadams
HubSpot Employee
HubSpot Employee

Custom properties and API

Can you send me your Hub ID so I can take a look at your portal settings?

0 Upvotes