Get interactions using groupkeys
Learn about retrieving the list of interactions for an entity using the groupKey parameter.
This operation allows you to return the latest interaction for a profile by grouping them based on the specified grouping attribute. Ensure interaction types are configured with a Grouping attribute.
- By default, interactions are sorted using the
timestampproperty in descending order. - There is a limit for reading interactions from the database. You can set the limit using the
maxInteractionsToFetchPerEntityparameter. Only the firstmaxInteractionsToFetchPerEntityinteractions are read from the database and only these interactions participate in filtering and sorting. If there are more interactions in the database for the given entity, then it means that thefetchedAllproperty is set tofalsein the response.
Request
GET /api/{tenantId}/entities/{entityId}/_interactions?groupKey={attributeName}
For more information, see Get Interactions for an entity.
| Parameter | Name | Required | Details |
|---|---|---|---|
| Headers | Authorization | Yes | This parameter provides information about the authentication access token using the format, Bearer <accessToken> (For more information see Authentication API. |
| Query | id | Yes | The entity URI or ID for the profile whose interactions you're retrieving. |
groupKey | Yes | The interaction attribute based on which interactions are to be grouped by. | |
max | No | This parameter represents a positive integer value to identify the maximum number of interactions to return in a response. Can be used to organize pagination in combination with the offset parameter. The default value is 50. |
Example request
GET https://<env>.reltio.com/api/ACME123/entities/12345/_interactions?groupKey=BookingId&sort=timestamp&order=desc
Authorization: Bearer <your_token>
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Example response
{
"interactions": [
{
"uri": "interactions/CASE-991",
"timestamp": 1718700000000,
"attributes": {
"BookingId": [{"value": "991", "ov": true}],
"Status": [{"value": "Escalated", "ov": true}]
},
"members": {
"Participants": {
"members": [
{"objectURI": "entities/10000", "label": "Frodo"}
]
}
},
"groupKey": "BookingId",
"groupValue": "991"
}
],
"totalFetched": 1,
"fetchedAll": true
}