This query returns all accounts who match BOTH external_id=1234 AND domain=example.com
OR bar.com
Note: Remove
exact
from the query if you wish to match on partial strings.
POST https://{{ organization}}/api/v1/search/account_report
{
"query": {
"bool": {
"filter": [
{
"terms": {
"domain.exact": ["foo.com", "bar.com"]
}
},
{
"terms": {
"external_id": ["1234"]
}
}
]
}
}
}
{
"pagination": {
"total": 1,
"page": 1,
"pages": 1,
"per_page": 30
},
"data": [
{
"_id": "59367d6ff3829c7dfd000001",
"anonymous_ids": [ "hubspot:236264269" ],
"name": "Foo",
"domain": "foo.com",
"external_id": "123",
"indexed_at": "2019-10-14T12:45:42+00:00",
"updated_at": "2019-08-31T02:51:58Z",
...
}
]
}