However as a result I am getting following response:
{
“id”: “<id>”,
“properties”: {
“hs_createdate”: “2022-09-15T22:28:55.910Z”,
“hs_lastmodifieddate”: “2022-09-15T22:28:55.910Z”,
“hs_object_id”: “<another_id>”
},
“createdAt”: “2022-09-15T22:28:55.910Z”,
“updatedAt”: “2022-09-15T22:28:55.910Z”,
“archived”: false
}
What am I missing? The Custom object doc doesn’t really explain this part of API much which is quite strange
I think you’ve done most of the job there.
You’re probably missing this simple thing : specify the list of properties you’d like to receive.
Have a look at the custom objects endpoint, when using the GET you need to add, as a query parameter, the list of properties you want the call to return :
It did work however the challenge for us is that we have fairly large custom objects with 100+ properties and the approach with passing every property name is quite a tedious one. On top of that it makes it unnecessarily diffucult to assemble the object from the response. Is it because you can’t de-serialize the objects as a whole and require an explicit name?
If you need to get the entire object, then it would make sense to interrogate the object schema first, and from that response, take the properties list and pass it in the get object by id call.
This way you don’t have to put up with building the call by listing the properties yourself.
Now regarding the structure of the response, I agree this doesn not make reassembling the object easy, but I really don’t think you’ve got a better shot at this.