Identities
Filter identities
Filter identities with structured query filters using the Go SDK.
POST
/identities/filterUse client.Identity.Filter to query identities with structured filters.
Call the method
result, _, _ := client.Identity.Filter(
blnkgo.FilterParams{
Filters: []blnkgo.Filter{
{
Field: "email_address",
Operator: blnkgo.OpEqual,
Value: "[email protected]",
},
{
Field: "category",
Operator: blnkgo.OpEqual,
Value: "customer",
},
},
Limit: 20,
Offset: 0,
IncludeCount: true,
},
)
| Field | Type | Description |
|---|---|---|
Filters | []blnkgo.Filter | Array of filter conditions, each with a Field, Operator, and a Value or Values. |
SortBy | string | Field to sort by. Defaults to created_at. |
SortOrder | string | Sort direction, asc or desc. Defaults to desc. |
IncludeCount | bool | Return TotalCount in the response. Defaults to false. |
Limit | int | Maximum records to return. Defaults to 20, max 100. |
Offset | int | Records to skip for pagination. Defaults to 0. |
Response
{
"data": [
{
"identity_id": "idt_3b63c8da-af29-4cc3-ad38-df17d87456e6",
"identity_type": "individual",
"first_name": "John",
"last_name": "Doe",
"email_address": "[email protected]",
"category": "customer",
"created_at": "2024-11-26T08:36:36.238244338Z"
}
],
"total_count": 1
}Go response (*blnkgo.FilterResponse)
| Field | Type | Description |
|---|---|---|
Data | interface{} | Array of matching *blnkgo.IdentityResponse records. |
TotalCount | *int64 | Total matching records. Only present when IncludeCount is true. |