Fire Interaction

Description

This service is used to fire a specific interaction for the logged-in consumer.


Request

Restrictions

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

Endpoint

POST https://<server-url>/api/v4/interaction/fire

Parameters

Parameter
Location
Description

touchpoint

Query / Header

The identifier for the touchpoint making the request. If sent as a header, the name must be Thalamus-Touchpoint.

token

Query / Header

The authentication token for the API session. If sent as a header, the name must be Thalamus-Token.

activity

Query / Header

Optional. The activity to be used. If sent as a header, the name must be Thalamus-Activity.

tags

Query / Header

Optional. A comma-separated list of up to 25 string tags to add extra information for reporting purposes. If sent as a query parameter, use the key tags. If sent as a header, use the key Thalamus-Tags.

Content-Type

Header

Specifies the content type of the request body. Must be application/json.

Full URL Example

https://<server-url>/api/v4/interaction/fire?touchpoint=test&token=...

Example with Tags:

https://<server-url>/api/v4/interaction/fire?tags=halloween,parade,dinner&touchpoint=test&token=...

Request Body

The body of the request specifies the interaction to be fired.

Field
Type
Description

interactionTypeCode

String

The code identifying the type of interaction to be fired (e.g., "register").

additionalInfo

String

Optional. Any additional information or context related to the interaction.

JSON

{
  "interactionTypeCode": "register",
  "additionalInfo": "additional info!"
}

Response

✅ Successful Response: 201 Created

The interaction was successfully fired. The response returns the current session context.

JSON

{
  "context": {
    "links": [
      {
        "ref": "home",
        "href": "http://localhost:8080/thalamus/api/v4/people/home"
      },
      {
        "ref": "profile",
        "href": "http://localhost:8080/thalamus/api/v4/people/profile"
      },
      {
        "ref": "consumer",
        "href": "http://localhost:8080/thalamus/api/v4/people/consumer"
      }
    ],
    "activities": [
      {
        "links": [],
        "code": "EMileage",
        "name": "E Mileage",
        "message": "E Mileage. You can accumulate points by introducing the codes printed on E packs. Then you can trade those points for items in our catalogue. You will participate in raffle at the end of the activity. You can up-load your codes using your smartphone, our web page, SMS or iPad.",
        "type": "GENERIC"
      }
    ],
    "simpleProfile": {
      "firstname": "test",
      "lastname": "test",
      "email": "[email protected]"
    }
  }
}

❌ Unsuccessful Response: 400 Bad Request

Returned if the interactionTypeCode is invalid or does not exist.

JSON

{
  "errors": {
    "interaction": "InvalidCode"
  }
}

Last updated

Was this helpful?