Identities

Filter identities

Filter identities with structured query filters using the Go SDK.

POST/identities/filter

Use 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,
 },
)
FieldTypeDescription
Filters[]blnkgo.FilterArray of filter conditions, each with a Field, Operator, and a Value or Values.
SortBystringField to sort by. Defaults to created_at.
SortOrderstringSort direction, asc or desc. Defaults to desc.
IncludeCountboolReturn TotalCount in the response. Defaults to false.
LimitintMaximum records to return. Defaults to 20, max 100.
OffsetintRecords 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)

FieldTypeDescription
Datainterface{}Array of matching *blnkgo.
IdentityResponse records.
TotalCount*int64Total matching records. Only present when IncludeCount is true.