Response deserialization error

I am attempting to display a card under contacts using the CRM Extensions API but getting a Response deserialization error. This is the JSON response of my Data fetch URI.

{
 "results":[{
 "objectId":1,
 "link":"",
 "title":"Engagement Details",
 "total_calls":0,
 "connected_calls":0,
 "total_notes":0,
 "total_emails":0
 }
]}

My Object Type

{
"id":98242,
"applicationId":191360,
"baseUris":[],
"dataFetchUri":"xxx",
"title":"ListingSpark 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"]}
}

related question:

https://community.hubspot.com/t5/APIs-Integrations/Hubspot-adding-quot-BOOLEAN-quot-dataType-to-propertyDefinitions/m-p/261430

Hey, @jvdesu.

Apologies for the delayed response. We endured an outage late last week which shifted our attention away from this forum.

I’m investigating your two posts more closely now.

Hey, @jvdesu.

Thanks for bearing with me.

After reviewing the CRM Extensions documentation and related forum posts, I currently suspect the empty "link" : "" fields you return are causing the “Response deserialization” errors.

Per thelink property’s description in this article, it is:

The URI the user can follow to get more details about this object. This property is optional, but if not all objects have a link you should provide a value of null.

I couldn’t find any requests that returned values, so I recommend trying to either:

  • Replace the empty string"" withnull.
  • Remove thelink property from your app’s responses entirely.

Let me know if either of these work.

No problem @IsaacTakushi!

I initially had no `link` field in the response but there was also no `objectId` in the response that time which also caused error.

I will try a response removing the `link` field only and let you know if it works!

Thank You!

Thank you @IsaacTakushi! I finally got to make it working.

I totally removed the `link` field and it fixed the error.

Hey, @jvdesu.

Glad to hear it!