Get Interaction by ID

Description

This service retrieves all interactions of a specific type for the currently logged-in party. The results can be filtered by date.


Request

Restrictions

This service requires an authenticated user and can only be called after a successful party login.

Endpoint

GET https://<server-url>/api/v4/interaction/forParty/{interaction_type_id}

Path Parameters

Parameter
Type
Description

interaction_type_id

Integer

The ID of the interaction type to retrieve.

Parameters

Parameter
Location
Description

touchpoint

Query / Header

The identifier for the touchpoint. Use Thalamus-Touchpoint for the header.

token

Query / Header

The authentication token for the API session. Use Thalamus-Token for the header.

fired_date_from

Query

Optional. A date in yyyy-mm-dd format to filter interactions from this date forward.

fired_date_to

Query

Optional. A date in yyyy-mm-dd format to filter interactions up to this date.

Full URL Example

# Retrieve all interactions for a given type
https://<server-url>/api/v4/interaction/forParty/52?touchpoint=TPREST01&token=...

# Filter by a date range
https://<server-url>/api/v4/interaction/forParty/52?fired_date_from=2023-06-22&fired_date_to=2024-02-24&touchpoint=TPREST01&token=...

Request Body

This request does not have a body.


Response

✅ Successful Response: 200 OK

A JSON object is returned containing an array of interactions that match the specified criteria.

Key Interaction Fields

Field
Type
Description

id

Number

The unique ID of the interaction record.

creationDate

Timestamp

The date the interaction was created.

personId

Number

The ID of the party associated with the interaction.

interactionTypeId

Number

The ID of the interaction type.

tag01-tag25

String

Custom tags associated with the interaction.

context

Object

An object containing contextual information like activityId and touchpointId.

JSON

{
  "interactions": [
    {
      "id": 10,
      "creationDate": 1687522248000,
      "personId": 1,
      "interactionTypeId": 56,
      "tag01": null,
      "tag02": null,
      "context": {
        "activityId": 1,
        "touchpointId": 1,
        "additionalInfo": null
      }
    }
  ]
}

❌ Unsuccessful Response: 400 Bad Request

Returned if the provided interaction_type_id is invalid or if the date filters are malformed (e.g., fired_date_from is after fired_date_to).

JSON

{
    "errors": {
        "interaction": "InvalidInteractionTypeId",
        "execution.interaction": "execution.interaction: InvalidInteractionTypeId"
    }
}
{
  "errors": {
    "interaction": "InvalidFiredDateFromLaterFiredDateTo",
    "execution.interaction": "execution.interaction: InvalidFiredDateFromLaterFiredDateTo"
  }
}

❌ Unsuccessful Response: 404 Not Found

Returned if the specified interaction_type_id does not exist.

JSON

{
  "errors": {
    "error.message": "NOT_FOUND"
  }
}

Last updated

Was this helpful?