This query returns accounts who have a domain of example.com but no external_id
Note: Remove
exactfrom the query if you wish to match on partial strings.
POST https://{{ organization}}/api/v1/search/account_report
{
"query": {
"bool": {
"filter": [
{
"terms": {
"domain.exact": [
"example.com"
]
}
}
],
"must_not": {
"exists": {
"field": "external_id"
}
}
}
}
}
{
"pagination": {
"total": 1,
"page": 1,
"pages": 1,
"per_page": 30
},
"data": [
{
"_id": "59367d6ff3829c7dfd000001",
"anonymous_ids": [ "hubspot:236264269" ],
"name": "Example",
"domain": "example.com",
"external_id": null,
"indexed_at": "2019-10-14T12:45:42+00:00",
"updated_at": "2019-08-31T02:51:58Z",
...
}
]
}