Hey, @ACarr3
Thanks for the great question. I set up a test like yours and got the same result, a 200 response and an empty array. Challenging and not a lot to work with.
Here’s the issue — the IN search operator only accepts values in lowercase (even if the value is mixed-case on the object record, like your examples). It’s mentioned in the documentation, but should be bolded or flagged explicitly. From the documentation — “This operator is case-sensitive, so inputted values must be in lowercase”.
Here’s what I did using your example and my test portal:
Request
POST https://api.hubapi.com/crm/v3/objects/contacts/search
Body
{
"properties": [
"customproperty"
],
"filterGroups": [
{
"filters": [
{
"propertyName": "customproperty",
"operator": "IN",
"values": ["7y087xerdlsi8hsb3","76f3gdtsxerdlsi8hsb3"]
}
]
}
]
}
Response
{
"total": 4,
"results": [
{
"id": "801",
"properties": {
"createdate": "2022-11-03T21:42:31.255Z",
"customproperty": "7Y087XErdLsi8hsb3",
"hs_object_id": "801",
"lastmodifieddate": "2023-04-05T17:40:19.990Z"
},
"createdAt": "2022-11-03T21:42:31.255Z",
"updatedAt": "2023-04-05T17:40:19.990Z",
"archived": false
},
{
"id": "901",
"properties": {
"createdate": "2022-11-03T21:42:31.255Z",
"customproperty": "7Y087XErdLsi8hsb3",
"hs_object_id": "901",
"lastmodifieddate": "2023-04-05T17:39:40.188Z"
},
"createdAt": "2022-11-03T21:42:31.255Z",
"updatedAt": "2023-04-05T17:39:40.188Z",
"archived": false
},
{
"id": "951",
"properties": {
"createdate": "2022-11-03T21:42:31.255Z",
"customproperty": "76f3gdtsXErdLsi8hsb3",
"hs_object_id": "951",
"lastmodifieddate": "2023-04-05T17:41:04.990Z"
},
"createdAt": "2022-11-03T21:42:31.255Z",
"updatedAt": "2023-04-05T17:41:04.990Z",
"archived": false
},
{
"id": "1001",
"properties": {
"createdate": "2022-11-03T21:42:31.255Z",
"customproperty": "76f3gdtsXErdLsi8hsb3",
"hs_object_id": "1001",
"lastmodifieddate": "2023-04-05T17:41:31.949Z"
},
"createdAt": "2022-11-03T21:42:31.255Z",
"updatedAt": "2023-04-05T17:41:31.949Z",
"archived": false
}
]
}
Which matches what I see in-app:
I hope this helps get you moving forward. Have fun building! — Jaycee