# Hubspot adding "BOOLEAN" dataType to propertyDefinitions in Object Type

**URL:** <https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691>\
**Category:** APIs & Integrations\
**Tags:** cms-content\
**Created:** [March 26, 2019, 2:20pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691 "2019-03-26T14:20:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvdesu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jvdesu/32/31851_2.png) [@jvdesu](https://community.hubspot.com/u/jvdesu)\
**Post date:** [March 26, 2019, 2:20pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/1 "2019-03-26T14:20:49Z")

</div>

Here’s a sample response when getting my Object type via the API

`{"id":98242,"applicationId":191360,"baseUris":[],"dataFetchUri":"xxx","title":"Test Data","propertyDefinitions":[{"dataType":"BOOLEAN","name":"total_calls","label":"Total Calls","dataType":"NUMERIC"},{"dataType":"BOOLEAN","name":"connected_calls","label":"Connected Calls","dataType":"NUMERIC"},{"dataType":"BOOLEAN","name":"total_notes","label":"Total Notes","dataType":"NUMERIC"},{"dataType":"BOOLEAN","name":"total_emails","label":"Total Emails","dataType":"NUMERIC"}],"associatedHubSpotObjectTypes":["CONTACT"],"associatedHubSpotObjectTypeProperties":{"CONTACT":["associatedObjectId","associatedObjectType"]}}`

Each propertyDefinition contains 2 dataTypes. I have tried modifying the Object Type from their website and via the Modify Object type API but the BOOLEAN datatype is still added somehow.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 28, 2019, 3:43pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/2 "2019-03-28T15:43:42Z")

</div>

Welcome, @jvdesu.

Apologies for the delayed response.

That’s strange, indeed. Are you still encountering this behavior?

I haven’t been able to replicate the issue. When I call `extensions/sales-objects/v1/object-types/98242`, I receive the following:

```auto
{
id:98242,
applicationId:191360,
baseUris:[],
dataFetchUri:"xxx",
title:"Test Data",
propertyDefinitions:[
{
dataType:"NUMERIC",
name:"total_calls",
label:"Total Calls"},
{
dataType:"NUMERIC",
name:"connected_calls",
label:"Connected Calls"},
{
dataType:"NUMERIC",
name:"total_notes",
label:"Total Notes"},
{
dataType:"NUMERIC",
name:"total_emails",
label:"Total Emails"}],
associatedHubSpotObjectTypes:["CONTACT"],
associatedHubSpotObjectTypeProperties:{
CONTACT:[
"associatedObjectId",
"associatedObjectType"]}}

```

---

<div class="post-metadata">

**Author:** ![jvdesu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jvdesu/32/31851_2.png) [@jvdesu](https://community.hubspot.com/u/jvdesu)\
**Post date:** [March 28, 2019, 4:46pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/3 "2019-03-28T16:46:22Z")

</div>

Thank you for replying @IsaacTakushi !

Yes I am still having this error,

[https://api.hubapi.com/extensions/sales-objects/v1/object-types/98242?hapikey=](https://api.hubapi.com/extensions/sales-objects/v1/object-types/98242?hapikey=ac7099fb-64fe-49ec-a0db-3237e599b515)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [March 28, 2019, 4:51pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/4 "2019-03-28T16:51:19Z")

</div>

Hi, @jvdesu.

Please don’t include your API key in posts on this public forum. I’ve edited the key out of your last message.

I am still not getting those results… I clicked the link you provided and the following `GET` request rendered in my browser:

 ![What I see.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/b/5b75ed1f2eb8760f0fbf0c80e33b87b6f5546fa8.jpeg)

How are you making these requests? Can you send me a screenshot of the response in your browser or in a REST client? (Please redact all sensitive information.)

---

<div class="post-metadata">

**Author:** ![jvdesu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jvdesu/32/31851_2.png) [@jvdesu](https://community.hubspot.com/u/jvdesu)\
**Post date:** [March 28, 2019, 4:56pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/5 "2019-03-28T16:56:36Z")

</div>

Thank you @IsaacTakushi,

We’ve just realized that the bug only occurs when openning the link in Chrome but not in firefox.

 ![Screen Shot 2019-03-29 at 12.46.47 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/a/2aa2b9921e5e1ee1c7c0b935f3290299996a3a9f.png)

---

<div class="post-metadata">

**Author:** ![jvdesu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jvdesu/32/31851_2.png) [@jvdesu](https://community.hubspot.com/u/jvdesu)\
**Post date:** [March 28, 2019, 5:17pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/6 "2019-03-28T17:17:43Z")

</div>

Our real problem is that we’re getting a Response deserilization error and I’m only guessing that this is the one causing it. I’ve posted another question here

[https://community.hubspot.com/t5/APIs-Integrations/Response-deserialization-error/m-p/261927](https://community.hubspot.com/t5/APIs-Integrations/Response-deserialization-error/m-p/261927)

Thank You!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [April 1, 2019, 4:55pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/7 "2019-04-01T16:55:33Z")

</div>

Hey, @jvdesu.

I’ve been able to reproduce this behavior in Chrome Incognito mode with my JSON viewer extensions disabled:

 ![Chrome Incognito - dataType NUMERIC.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/b/3bc108da0906af6cb14fbbe6f6219de2d0822750.jpeg)

This seems to be more of a quirk with data formatting than an issue with HubSpot’s APIs.

JSON viewers and REST clients remove the `"dataType":"BOOLEAN"` field. In Firefox, for example, you can compare the results of the _Raw Data_ tab:

 ![Firefox - Raw Data.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/9/8908bd448c9a3a4e5192409280e1c8b762a43233.jpeg)

to those in the _JSON_ tab:

 ![Firefox - JSON.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/c/cc73a47425e640d69ef821e5ee9729ceeb58275f.jpeg)

To this point, I’ve been seeing formatted JSON responses and those in REST clients.

I do _not_ believe this formatting inconsistency is causing the “Response deserialization” error you report in [this post](https://community.hubspot.com/t5/APIs-Integrations/Response-deserialization-error/m-p/261927), however.

When I retrieve an object type from my colleague @cbarley’s account, the `"dataType":"BOOLEAN"` field also appears in Chrome Incognito results, but does not trigger “Response deserialization” errors in his app:

 ![Chrome - Connor Test.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/b/3b40258580d4f67e34f18096d1e74fddcbb7915f.jpeg)

---

<div class="post-metadata">

**Author:** ![jvdesu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jvdesu/32/31851_2.png) [@jvdesu](https://community.hubspot.com/u/jvdesu)\
**Post date:** [April 2, 2019, 10:12am UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/8 "2019-04-02T10:12:22Z")

</div>

You are right @IsaacTakushi, this wasn’t the cause of the “Deserialization error” but due to the contents of my CRM response. Your solution on the other post has fixed it.

Thank You for helping!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [April 2, 2019, 12:11pm UTC](https://community.hubspot.com/t/hubspot-adding-boolean-datatype-to-propertydefinitions-in-object-type/13691/9 "2019-04-02T12:11:38Z")

</div>

So glad I could help, @jvdesu!
