POST /contacts/v1/addresses/count
Retrieve the number of contacts who meet a set of search criteria.
The JSON request body contains this property.
Name | Type | Description |
---|---|---|
queryFilter | Object | Required. An object that defines the criteria to search for. |
The queryFilter
object has the properties described in this table.
Name | Type | Description |
---|---|---|
hasCriteria | Boolean | Required. Indicates whether the filter specifies search criteria. If the value is false , the response contains a count of all contacts in the account. |
rootExpressionSet | Object | An object that contains the filter expressions. |
The rootExpressionSet
object has the properties described in this table.
Name | Type | Description |
---|---|---|
expressions | Array | An array of objects that define the search criteria. This resource supports only one expression. |
The object in the expressions
array has the properties described in this table.
Name | Type | Description |
---|---|---|
customerDataDefinitionID | Short | An integer that represents the attribute type to use in the filter. Possible values:
|
operator | String | The condition operator to use in the filter. The only possible value is Equal . |
values | Array | An array of strings that define the values to filter results by. If the value of CustomerDataDefinitionID is 104 , these values are supported
|
A successful request returns a 200 OK
result. The response contains the properties in this table.
Name | Type | Description |
---|---|---|
requestServiceMessageID | String | A unique ID for the request. |
responseDateTime | Datetime | The date and time when the API generated the response. |
resultMessages | Array | An array of objects that contains messages generated while processing the request. The array is typically empty in a successful request. |
serviceMessageID | String | A unique ID for the response. |
totalCount | Integer | The number of contacts that meet the search criteria. |
If an error occurs while processing the request, the response contains an additional property, hasErrors
, with a value of true
. In this situation, the objects in the resultMessages
have the properties listed in this table.
Name | Type | Description |
---|---|---|
resultClass | String | A description of the result. If an error occurs, the value is Error . |
resultCode | String | An error code. |
message | String | A message that explains the error that occurred. |
resultType | String | A description of the type of result. |
You can use this resource to obtain a count of contacts with or without providing a filter.
To retrieve the number of contacts without specifying a filter, set the value of queryFilter.hasCriteria
to false
. You can also omit the rootExpressionSet
object from the request.
The response contains the total number of contacts in the account.
This request returns the number of contacts who have a Channel attribute of Push
. The value of customerDataDefinitionID
(104
) indicates that the results are filtered by the Channel attribute.
The response indicates the number of contacts that meet the filter criteria.