I’m trying to pull a list of Deals using a custom property. I’m using this endpoint:
POST/crm/v3/objects/deals/batch/read
The documentation is too vague but states that one can “Read a batch of deals by internal ID, or unique property values”. I’m trying to pass a list of values for a custom property in order to get a list of deals that match that property value. Here’s what I’m passing:
curl --request POST \
--url 'https://api.hubapi.com/crm/v3/objects/deals/batch/read?archived=false&hapikey=*-*-*-*-*' \
--header 'content-type: application/json' \
--data '{
"inputs": [
{
"id": "51349"
},
{
"id": "51350"
}
],
"idProperty": "vboe_quote_id",
"properties": [
"amount",
"hubspot_owner_id",
"dealname",
"dealstage"
]
}'
I get the following error message back:
{
"completedAt": "2021-04-13T13:24:04.105Z",
"errors": [
{
"category": "OBJECT_NOT_FOUND",
"context": {
"ids": [
"51350",
"51349"
]
},
"message": "Could not get some DEAL objects, they may be deleted or not exist. Check that ids are valid.",
"status": "error"
}
],
"numErrors": 1,
"results": [],
"startedAt": "2021-04-13T13:24:04.088Z",
"status": "COMPLETE"
}
Note that ‘vboe_quote_id’ is my custom property but has nothing to do with HubSpot quotes. So, don’t let that mislead you. ![]()
What’s the correct way to use this endpoint?
Thanks
-Scot

