APIs & Integrations

jvdesu
Participant

Response deserialization error

SOLVE

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"]}
}
0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Response deserialization error

SOLVE

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.

Isaac Takushi

Associate Certification Manager

View solution in original post

6 Replies 6
jvdesu
Participant

Response deserialization error

SOLVE
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Response deserialization error

SOLVE

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.

Isaac Takushi

Associate Certification Manager
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Response deserialization error

SOLVE

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.

Isaac Takushi

Associate Certification Manager
jvdesu
Participant

Response deserialization error

SOLVE

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

 

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

IsaacTakushi
HubSpot Employee
HubSpot Employee

Response deserialization error

SOLVE

Hey, @jvdesu.

 

Glad to hear it!

Isaac Takushi

Associate Certification Manager
0 Upvotes
jvdesu
Participant

Response deserialization error

SOLVE

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!

0 Upvotes