Update Event Template
Overview
The Arianee event template update enables you to modify and enhance existing event templates to ensure they remain accurate, engaging, and relevant.
Let's start π
URL
Required rights:
admin
orcertCreate
To update an event template, use the /arianeeEventTemplate
.
PUT - https://{{nmpUrl}}/arianeeEventTemplate
Body
Field | Type | Required | Description |
---|---|---|---|
metadata | Object | β | Contains additional information about the event template. |
name | String | β | The display name of the event template. Example: "Service Event". |
icon | String | β | A URL pointing to an icon that visually represents the event template. |
content | String | β | Contains the core event information respecting the Event Schema. |
{
"deleted": false,
"metadata": {
"name": "Activation de la garantie",
"icon": "https://img.freepik.com/vecteurs-premium/vecteur-conception-modele-logo-service_20029-568.jpg"
},
"content": "{\"eventType\":\"warranty\",\"language\":\"fr-FR\",\"title\":\"Activation de la garantie\",\"description\":\"La garantie de votre produit a été activée ou mise à jour avec succès. Pour une durée de %duree%.\",\"i18n\":[],\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\"}",
"attributes": [
{
"field": "%duree%",
"label": "DurΓ©e",
"freeEntry": true,
"required": true,
"type": "select",
"options": [
{
"label": "1 an",
"value": "1 an"
},
{
"label": "2 ans",
"value": "2 ans"
},
{
"label": "4 ans",
"value": "4 ans"
}
]
}
]
}
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The event template has been updated. |
{
"_id": "67a08e452ef96f911a194989",
"deleted": false,
"metadata": {
"name": "Activation de la garantie",
"icon": "https://img.freepik.com/vecteurs-premium/vecteur-conception-modele-logo-service_20029-568.jpg"
},
"content": "{\"eventType\":\"warranty\",\"language\":\"fr-FR\",\"title\":\"Activation de la garantie\",\"description\":\"La garantie de votre produit a été activée ou mise à jour avec succès. Pour une durée de %duree%.\",\"i18n\":[],\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\"}",
"attributes": [
{
"field": "%duree%",
"label": "DurΓ©e",
"freeEntry": true,
"required": true,
"type": "select",
"options": [
{
"label": "1 an",
"value": "1 an"
},
{
"label": "2 ans",
"value": "2 ans"
},
{
"label": "4 ans",
"value": "4 ans"
}
]
}
],
"__v": 0,
"id": "67a08e452ef96f911a194989"
}
Errors
Status Code | Success | Error Message |
---|---|---|
500 | false | The event template ID may be wrong. |
{
"stringValue": "\"67a08e452ef96f911a19498\"",
"valueType": "string",
"kind": "ObjectId",
"value": "67a08e452ef96f911a19498",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"67a08e452ef96f911a19498\" (type string) at path \"_id\" for model \"ArianeeEventTemplate\""
}
Updated 2 days ago