There was a problem with the request - API return ambiguous error messages

I received the same exact error every time i attempt to execute a filtered search request on the

https://api.hubapi.com/crm/v3/objects/deals/search endpoint.

Through trial and error I found out that applying a filter on “id” is problematic. Can anyone please assist?

The following gives me the perfect result.

{
 "sorts": [
 "id"
 ],
 "properties": [
 "id",
 "amount",
 "description",
 "dealname",
 "dealstage",
 "pipeline",
 "offertenummer"
 ],
 "filterGroups": [
 {
 "filters": [
 {
 "propertyName": "pipeline",
 "values": [
 "default"
 ],
 "operator": "IN"
 },
 {
 "propertyName": "dealstage",
 "values": [
 "24274139"
 ],
 "operator": "IN"
 }
 ]
 }
 ],
 "query": null,
 "limit": 25,
 "after": 0
}

When I apply a filter on the IDs by adding another filter with the NOT_IN operator, the API responds with 400 “there was a problem with the request.” I understand that there might be something wrong with the request, but it would be helpful if the error message points me in the right direction.

{
 "sorts": [
 "id"
 ],
 "properties": [
 "id",
 "amount",
 "description",
 "dealname",
 "dealstage",
 "pipeline",
 "offertenummer"
 ],
 "filterGroups": [
 {
 "filters": [
 {
 "propertyName": "pipeline",
 "values": [
 "default"
 ],
 "operator": "IN"
 },
 {
 "propertyName": "dealstage",
 "values": [
 "24274139"
 ],
 "operator": "IN"
 },
 {
 "propertyName": "id",
 "values": [
 "3887945147",
 "3887945153"
 ],
 "operator": "NOT_IN"
 }
 ]
 }
 ],
 "query": null,
 "limit": 25,
 "after": 0
}

Hey, @MvanEgten :waving_hand: I’m sorry this keeps happening. I’d like to set up a quick test in my portal.

Is the logic here:

  • Deals that are in a specific Pipeline (default in this case)
  • Deals that are in a specific Deal Stage
  • Exclude two specific deals

Is that correct?

Thanks! — Jaycee