Sep 27, 20239:31 AM - edited Sep 27, 20239:32 AM
Member
Error using "NOT_IN" on Deals Search API method
Hello everybody,
I'm trying to perform a search on Deals, using the API's Search method. The search requires 3 parameters in the filters. However, one of these parameters uses the "NOT_IN" operator, as I need the return of all deals from the conditional, except deals that are in specific dealstages, as shown in the body of the request:
When calling the method, HubSpot responds with a 400 error, with the message: "Invalid input JSON on line 1, column 214: operator NOT_IN requires values."
When I use Postman, I get the expected result. I can't see where the error is.
Yes, I tried breaking the filters. Without the "NOT_IN" parameter everything works normally. The code above returns deals without problems, but of course, because it doesn't have the third parameter, it returns the wrong deals.
And as mentioned, when I print the request body and use it in Postman (including with the "NOT_IN" operator), the endpoint returns status 200 and I get exactly the response I need.