Create Filter with custom field

Relative novice here… I’m looking to create a filter based on a number of criteria but I’m getting various errors around the use of field_ID and custom fields IDs not being right. Are you able to create a filter through the API with custom fields? This is what I’m using atm:

{
“name”: “Filter Title”,
“conditions”: {
“glue”: “and”,
“conditions”: [
{
“glue”: “and”,
“conditions”: [
{
“object”: “deal”,
“field_id”: “556xxxxxxxxxxxxxxxxxxxxxxx”,
“operator”: “=”
“value”: “ABC_123”
},
{
“object”: “deal”,
“field_id”: “status”,
“operator”: “=”,
“value”: “open”
},
{
“object”: “deal”,
“field_id”: “pipeline_id”,
“operator”: “=”,
“value”: “3”
}
]
}
]
},
“type”: “deals”
}

Hey, @Louisa_Plint and welcome to the community! :wave:

Here’s a more extensive tutorial (with code examples) on adding a new filter.

From the example that you’ve provided, I see a couple of field_id values that should be fixed. The field_id should point to the id value (numerical) of that field. You can find details on different deal fields and their ids from the GET /dealFields endpoint.

Let us know if you have additional questions!

Sincerely,
Helena