CRM Object Properties

Hello,

I am trying to use the hubspot API to call a list of custom objects and their properties. Doc is here, and I am using the LIST function:

I am able to query the API without issue, but I can’t put out any details. Right now I am sending this in as as the body:

{

“results”: [

{

  "properties": {

    "additionalProp1": "email",

    "additionalProp2": "string",

    "additionalProp3": "string"

  }

}

]

}

When I send this in, hubspot accepts it, but does not return the email. How exactly do I return this data from hubspot for custom objects?

Here is the example they give me:

{
“paging”: {
“next”: {
“link”: “?after=NTI1Cg%3D%3D”,
“after”: “NTI1Cg%3D%3D”
}
},
“results”: [
{
“associations”: {
“additionalProp1”: {
“paging”: {
“next”: null,
“prev”: {
“before”: “string”,
“link”: “string”
}
},
“results”: [
{
“id”: “string”,
“type”: “string”
}
]
},
“additionalProp2”: {
“paging”: {
“next”: null,
“prev”: {
“before”: “string”,
“link”: “string”
}
},
“results”: [
{
“id”: “string”,
“type”: “string”
}
]
},
“additionalProp3”: {
“paging”: {
“next”: null,
“prev”: {
“before”: “string”,
“link”: “string”
}
},
“results”: [
{
“id”: “string”,
“type”: “string”
}
]
}
},
“createdAt”: “2024-11-18T19:35:03.347Z”,
“archived”: true,
“archivedAt”: “2024-11-18T19:35:03.347Z”,
“propertiesWithHistory”: {
“additionalProp1”: [
{
“sourceId”: “string”,
“sourceType”: “string”,
“sourceLabel”: “string”,
“updatedByUserId”: 0,
“value”: “string”,
“timestamp”: “2024-11-18T19:35:03.347Z”
}
],
“additionalProp2”: [
{
“sourceId”: “string”,
“sourceType”: “string”,
“sourceLabel”: “string”,
“updatedByUserId”: 0,
“value”: “string”,
“timestamp”: “2024-11-18T19:35:03.347Z”
}
],
“additionalProp3”: [
{
“sourceId”: “string”,
“sourceType”: “string”,
“sourceLabel”: “string”,
“updatedByUserId”: 0,
“value”: “string”,
“timestamp”: “2024-11-18T19:35:03.347Z”
}
]
},
“id”: “string”,
“properties”: {
“additionalProp1”: “string”,
“additionalProp2”: “string”,
“additionalProp3”: “string”
},
“updatedAt”: “2024-11-18T19:35:03.347Z”
}
]
}

Hi @CSwanson65 ,

You need to define the properties in query params whichever you needed .

For example if i need email and name fields i will add that in url query param like this :

https://api.hubapi.com/crm/v3/objects/?limit=10&**properties=email&properties=name**&archived=false

:check_mark: Mark this question as answer if it answers your question . To help other community members.

Hello,

I appreciate the response. I tried sending in email as a parameter in a few different ways, but I am getting errors.

https://api.hubapi.com/crm/v3/objects/&properties=email

{
“status”: “error”,
“message”: “Unable to infer object type from: &properties=email”,
“correlationId”: “08e81f9a-831d-478b-b90d-22355657fd0a”
}

please remove /& and write /? before properties = email
https://api.hubapi.com/crm/v3/objects/?properties=email

I am still stuck on this issue. Here is the image from postman: