Update Interaction
With the Update Interaction endpoint you can update the metadata of a previously stored interaction.
https://api.ploogins.com/v1/interactions/update
Body Params
The parameters passed to the interactions/update
endpoint need to be encoded in a JSON format.
Name | Type | Description | Example |
---|---|---|---|
interaction_id* | string (UUID) | The ID of the stored interaction | 072c2b17-4f8d-4e69-9814-5fdf598ce759 |
metadata* | JSON | The interaction metadata | {"message": "Great!", "positive": true} |
Request Example
In order to register an interaction with the Ploogins API, it is necessary to call the update endpoint using the POST method, with all required parameters.
- CURL
- Javascript
- Python
curl --location 'api.ploogins.com/v1/interactions/register' \
--header 'Authorization: Bearer YOUR-API-TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"interaction_id": "55253fe5-3368-4520-9b4b-86689e204204",
"metadata": {
"message": "Good Results",
"positive": true
}
}'
const headers = new Headers();
headers.append("Authorization", "Bearer YOUR-API-TOKEN");
headers.append("Content-Type", "application/json");
const data = JSON.stringify({
"interaction_id": "55253fe5-3368-4520-9b4b-86689e204204",
"metadata": {
"message": "Good Results",
"positive": true
}
});
const requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("api.ploogins.com/v1/interactions/register", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import requests
import json
url = "api.ploogins.com/v1/interactions/register"
payload = json.dumps({
"interaction_id": "55253fe5-3368-4520-9b4b-86689e204204",
"metadata": {
"message": "Good Results",
"positive": True
}
})
headers = {
'Authorization': 'Bearer YOUR-API-TOKEN',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)