APIs & Integrations

matthew2
Member

Sidecard Loading Error

SOLVE

HI I'm trying to load data from my dataFetchURI for my custom side card.

My api current returns

   {
        "results": [
           {
                "objectId": "51",
                "title": "Last updated",
                "properties": [
                    {
                        "lastUpdated": "1536710400000"
                    }
                ]
            }
        ]
    }

For the endpoint:

https://mysiteurl.com/contact?userId=6545462&userEmail=user@user.com&associatedObjectId=51&associate...

But for some reason I get the error
Sorry, but there's been an error loading the Side Card extension. Please try again or contact Support.

I'm trying to display some user data here pulled from another source. Is my response data formatted correctly? For the object type itself I created a custom object type

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Sidecard Loading Error

SOLVE

Hi @matthew,

Also, the properties array is an optional list of custom properties which does not support key-value pairs. Instead, it requires the format:

{
  "label": "Last updated",
  "dataType": "DATETIME",
  "value": "1536710400000"
}

Instead of placing the lastUpdated property in the properties array, I recommend defining it on the object type. For example:

{
  "results": [
    {
      "objectId": 51,
      "title": "Last updated",
      "lastUpdated": "1536710400000"
    }
  ]
}

Isaac Takushi

Associate Certification Manager

View solution in original post

2 Replies 2
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Sidecard Loading Error

SOLVE

Hi @matthew,

Also, the properties array is an optional list of custom properties which does not support key-value pairs. Instead, it requires the format:

{
  "label": "Last updated",
  "dataType": "DATETIME",
  "value": "1536710400000"
}

Instead of placing the lastUpdated property in the properties array, I recommend defining it on the object type. For example:

{
  "results": [
    {
      "objectId": 51,
      "title": "Last updated",
      "lastUpdated": "1536710400000"
    }
  ]
}

Isaac Takushi

Associate Certification Manager
IsaacTakushi
HubSpot Employee
HubSpot Employee

Sidecard Loading Error

SOLVE

Hi @matthew,

This may be due to a slight formatting issue. I see that your endpoint returns objectId as a string instead of a number. The CRM Extensions API documentation and this similar topic indicate that 51 should be returned instead of "51".

Isaac Takushi

Associate Certification Manager
0 Upvotes