APIs & Integrations

iperalta
Member

PROPERTY_DOESNT_EXIST when using API for created properties

Hi,

I’m receiving this message for all the properties I created a few minutes ago in the portal, I saw some other threads for this situation but without the answer if this was fixed, or If there is something that needs to be changed into the Hub ID settings.

Otherwise, I want to be able to upload a Date value, for example for the birthday, but in the documentation all the values are for string, May I upload a date through the API, which date format should we use for the date?

Thank you!

0 Upvotes
4 Replies 4
iperalta
Member

PROPERTY_DOESNT_EXIST when using API for created properties

The issue was the following:

  • We had a pro hubspot portal account. Hub ID A
  • We created a developer account associated to my pro hubspot portal account. Hub ID B
  • We got the HapiID in the developer account
  • We setup custom properties in Hub ID A

The point is, when you create the developer account, the system create another portal, with another id. So, when we tried to set the properties we were trying to do it in the Hub ID B, when we were create those in the Hub ID A.

For gettting the HubSpot API of your account, instead of creating a developer account, you just need to go to integrations > Hub Spot API Key, as explained here.

Hope it helps,

Ivan Peralta

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

PROPERTY_DOESNT_EXIST when using API for created properties

Hi @iperalta,

Can you direct message me with your portal ID so that I can take a look at the properties you’re including in your request?

0 Upvotes
iperalta
Member

PROPERTY_DOESNT_EXIST when using API for created properties

Hi Derek,

thanks for your feedback.

Is providing PROPERTY_DOESNT_EXIST when try to createOrUpdate a contact.

var url = https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/${email}/?hapikey=${config.hubspot.api_key};
var body = {properties: [{“property”:“firstname”,“value”:“Name”},{“property”:“lastname”,“value”:“Surname”},{“property”:“email”,“value”:“NameSurname@gmail.com”},{“property”:“city”,“value”:“Barcelona”},{“property”:“bida_state”,“value”:“signedup”},{“property”:“lead_by_code”,“value”:“CODE”},{“property”:“welcome_flow”,“value”:“XXX”},{“property”:“referral_code”,“value”:“CODESS”},{“property”:“first_drink_claimed”,“value”:“true”},{“property”:“no_claim_last_15_days”,“value”:“true”},{“property”:“no_access_last_15_days”,“value”:“false”}]}

		request({
			url: url,
			method: "POST",
			json: true,
			headers: headers,
			body: body
		}, function(err, response, body) { ... });

All the properties has been setup by using the web dashboard

Sorry, I miss to include also the error message

{“statusCode”:400,“body”:{“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“xx_token_xx”,“validationResults”:[{“isValid”:false,“message”:“Property “no_claim_last_15_days” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“no_claim_last_15_days”},{“isValid”:false,“message”:“Property “bida_state” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“bida_state”},{“isValid”:false,“message”:“Property “no_access_last_15_days” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“no_access_last_15_days”},{“isValid”:false,“message”:“Property “lead_by_code” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“lead_by_code”},{“isValid”:false,“message”:“Property “welcome_flow” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“welcome_flow”},{“isValid”:false,“message”:“Property “referral_code” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“referral_code”},{“isValid”:false,“message”:“Property “first_drink_claimed” does not exist”,“error”:“PROPERTY_DOESNT_EXIST”,“name”:“first_drink_claimed”}],“requestId”:“23433d8cde40617229d6ccad71fe8a75”},“headers”:{“access-control-allow-credentials”:“false”,“content-type”:“application/json; charset=UTF-8”,“vary”:“Accept-Encoding, Accept-Encoding”,“content-length”:“1110”,“date”:“Mon, 28 Aug 2017 16:48:36 GMT”,“connection”:“close”},“request”:{“uri”:{“protocol”:“https:”,“slashes”:true,“auth”:null,“host”:“api.hubapi.com”,“port”:443,“hostname”:“api.hubapi.com”,“hash”:null,“search”:“XX_token_XX”,“query”:“hapikey=XX_token_XX”,“pathname”:"/contacts/v1/contact/createOrUpdate/email/NameSurname@gmail.com/",“path”:"/contacts/v1/contact/createOrUpdate/email/NameSurname@gmail.com/?hapikey=XX_token_XX",“href”:“https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/NameSurname@gmail.com/?hapikey=XX_to... charset=utf-8”,“accept”:“application/json”,“content-length”:554}}}

Looking forward your feedback,

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

PROPERTY_DOESNT_EXIST when using API for created properties

Hi @iperalta,

Just to make sure that we’re on the same page, you’re seeing a PROPERTY_DOESNT_EXIST error when updating recently created properties via the API? Can you give me the request you’re making, as well as the error response body? There’s usually some more information on the error there.

With regard to your second question; date properties in HubSpot are formatted as Unix formatted timestamps in milliseconds. The following document discusses how timestamps should be formatted in HubSpot.

How should timestamps be formatted for HubSpot's APIs?

HubSpot API endpoints accept UNIX formatted timestamps in milliseconds. Most scripting languages have built-in functions or existing libraries that handle time conversion, but you must ensure that your timestamp values are in the correct UNIX...

0 Upvotes