I am trying to use an IN Filter for getting all deals from a list of deal_ids when trying this I get an invalid JSON error:
HTTP response body: {
"status":"error",
"message":"Invalid input JSON on line 1, column 42: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token",
"correlationId":"dd4d7def-6cc8-4b7e-a48d-658e0330e8cd"
}
I am using the Python API as such to do the IN filter operation with a list of deal_id strings in deal_ids:
Will you confirm you sucessfully got your second search option from you reply using the IN operator working outside of Postman? HubSpot api returns: "...problem: operator IN requires values." when using the following filter & operator:
Feb 11, 20228:44 AM - edited Feb 11, 20228:44 AM
Participant
[Hubspot API] How do you use IN filter operator?
SOLVE
Teun,
It seems that your last example doesn't work for me, I am getting this error:
{"status":"error","message":"Invalid input JSON on line 9, column 17: Cannot construct instance of `com.hubspot.inbounddb.publicobject.core.v3.search.Filter`, problem: operator IN requires values","correlationId":"c0f97d27-fd9c-4e21-a476-ed9ee20a2000"}
This is what I have in Postman. Any input would highly be appreciated. Thank you.
For future reference, it looks like you have a typo in your sample. It should be "values" (plural) instead of "value". Also, it is looking for a string[] (see picture).