Hi everyone.
I am trying to filter contact information based on a custom property, which has a Date format (in the UI I see it as a date picker format).
Its name is “fecha_inicio_suscripcion”.
I am running it through the API endpoint: https://api.hubapi.com/crm/v3/objects/contacts/search
The filters I apply are:
{
"filterGroups": [
{
"filters": [{
"propertyName": "fecha_inicio_suscripcion",
"operator": "HAS_PROPERTY"
},
{
"propertyName": "fecha_inicio_suscripcion",
"operator": "EQ",
"value": '2020-12-2'
}
]
}
],
"properties": ["associated_deal_id", "fecha_inicio_suscripcion"],
"limit": 10,
}
When I run my query with this parameters, I get this error:
Error fetching contacts: 400 Client Error: Bad Request for url: https://api.hubapi.com/crm/v3/objects/contacts/search
which is quite generic.
If I comment the part of the “EQ” filter, I do get a response and a contact list. In this contact list, I see the field “fecha_inicio_suscripcion”. An example of what I get is this:
{'total': 1,
'results': [{'id': '28755',
'properties': {'createdate': '2021-05-25T12:34:47.784Z',
'fecha_inicio_suscripcion': '2020-12-02',
'hs_object_id': '28755',
'lastmodifieddate': '2025-03-25T20:49:21.333Z'},
'createdAt': '2021-05-25T12:34:47.784Z',
'updatedAt': '2025-03-25T20:49:21.333Z',
'archived': False}]}
I do not understand why I cannot filter by the “fecha_inicio_suscripcion” field if it is present in the records I get and the format is normal YYYY-MM-DD date format.
Any help would mean a lot! Thanks!
