Since a recent update to the beta endpoints this endpoint has stopped working. In postman I can run this:
import hubspot
from pprint import pprint
from hubspot.crm.contacts import PublicObjectSearchRequest, ApiException
client = hubspot.Client.create(api_key="MY API KEY")
public_object_search_request = PublicObjectSearchRequest(filter_groups={"filters":[{"value":"1630047583930","propertyName":"lastmodifieddate","operator":"GT"}]}, sorts="lastmodifieddate", properties=["email","lastname"], limit=100, after=0)
try:
api_response = client.crm.contacts.search_api.do_search(public_object_search_request=public_object_search_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling search_api->do_search: %s\n" % e)
Moving this code to python yields this error:
Exception when calling search_api->do_search: (400)
Reason: Bad Request
HTTP response body: {"status":"error","message":"Invalid input JSON on line 1, column 18: Cannot deserialize instance of `java.util.HashSet` out of START_OBJECT token","correlationId":"10e2f094-6cf0-4470-b006-202883cc687e"}
Hey, I’m facing the same error using the search API endpoint. Can you confirm that the error message is correctly pointing at the JSON?
I tried several variations of JSON input. Every time with the same error. Unfortunately, the API description is not clear to me. Can you please share a valid JSON example that responses something?