Skip to main content

Register Interaction

With the Register Interaction endpoint you can store user interactions made during a search, like clicks, feedback, etc.

https://api.ploogins.com/v1/interactions/register

Interaction Types​

There are different types of interactions: click and feedback, which store different interaction metadata.

The Click Interaction​

The click interaction stores the plugin which has been clicked, its URL, and the type of button which has been clicked.

A metadata example would be:

{
"plugin": "modular-connector",
"url": "https://playground.wordpress.net/?plugin=modular-connector",
"click_type": "playground"
}

The Feedback Interaction​

The feedback interaction stores the rating of a user for a given performed search. It stores the user message (if provided), and if it is positive or negative.

A metadata example would be:

{
"message": "Great!",
"positive": true
}

Body Params​

The parameters passed to the interactions/register endpoint need to be encoded in a JSON format.

NameTypeDescriptionExample
search_id*string (UUID)The search intent ID in which the interaction was performed072c2b17-4f8d-4e69-9814-5fdf598ce759
type*stringThe interaction type (click, feedback or plugin)feedback
metadata*JSONThe interaction metadata{"message": "Great!", "positive": true}

Request Example​

In order to register an interaction with the Ploogins API, it is necessary to call the register endpoint using the POST method, with all required parameters.

curl    --location 'api.ploogins.com/v1/interactions/register' \
--header 'Authorization: Bearer YOUR-API-TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"search_id": "55253fe5-3368-4520-9b4b-86689e204204",
"type": "feedback",
"metadata": {
"message": "Good Results",
"positive": true
}
}'

Response Example​

{
"interaction_id": "55259ak3-3368-4520-9b4b-86689e204204"
}