E-mail templates¶
With the following request you are able to get the email templates and edit them. This is only allowed when you have the corresponding rights to do so!
Get email template¶
Get the email template content/attachments.
Request¶
{
"Name": "{{name}}",
"Key": "{{key}}",
"Target": "{{target}}",
"Method": "GetMailTemplate",
"type": "NameOfTheTemplate"
}
Parameters
type
: Email template to get, you can use the following options:AccountGeblokkeerd
AccountGemaakt
BerichtOntvangen
BevestigAfspraakAfzegging
BevestigAfspraak
BevestigAnoniemeAfspraak
BevestigHerhaalrecept
BevestigInschrijving
EconsultBeantwoord
MedlabVrijgegeven
MedradVrijgegeven
MedrecVrijgegeven
MedspeVrijgegeven
MedvriVrijgegeven
MedvryVrijgegeven
NieuwWachtwoord
Response¶
{
"settings": {
"Type": "AccountGeblokkeerd",
"SenderAddress": "no-reply@mijngezondheidsapp.nl",
"SenderDisplay": "Tetra demo",
"TemplateSubject": "Welkom bij uw praktijk",
"TemplateBody": "<!DOCTYPE html>\n<html>\n<head>\n\t<title></title>\n\t<style type=\"text/css\">* {\n font-family: arial;\n font-size: 12px;\n color: #000;\n }\n \n th, td {\n text-align: left;\n vertical-align: top;\n }\n\t</style>\n</head>\n<body><p>Example</p></body>\n</html>",
"Bijlagen": null
},
"ReturnValue": {
"ResponseCode": 200,
"ResponseText": "OK",
"Melding": "OK",
"Gelukt": true
}
}
Data
Type
: Template type/nameSenderAddress
: Email address of the sender, we overrule this with no-reply@mijngezondheidsapp.nl when sending the messageSenderDisplay
: From name of the emailTemplateSubject
: Subject of the emailTemplateBody
: Content of the email, this is the same for all receiversBijlagen
: When available you will receive an array with the following data:FileName
: FilenameContentType
: File mime type (alwaysapplication/octet-stream
)File
: Base64 encoded string of the fileDateTime
: Storage datetime of the file
Set email template¶
Set the email template content/attachments or create a new one when the type does not exists.
Request¶
{
"Name": "{{name}}",
"Key": "{{key}}",
"Target": "{{target}}",
"Method": "SetMailTemplate",
"type": "MedlabVrijgegeven",
"settings": {
"Type": "MedlabVrijgegeven",
"SenderAddress": "no-reply@mijngezondheidsapp.nl",
"SenderDisplay": "Tetra demo",
"TemplateSubject": "Labresults",
"TemplateBody": "We've received your lab results, login to your portal to take a look.",
"Bijlagen": [
{
"FileName": "example.txt",
"ContentType": "text/plain",
"File": "ZGl0IGlzIGVlbiB2b29yYmVlbGQ=",
"DateTime": "2023-06-01T00:00:00"
}
]
}
}
Parameters
Type
: Template type/nameSenderAddress
: Email address of the sender, we overrule this with no-reply@mijngezondheidsapp.nl when sending the messageSenderDisplay
: From name of the emailTemplateSubject
: Subject of the emailTemplateBody
: Content of the email, this is the same for all receiversBijlagen
: Set value to null to delete all attachments, or use an array with the following for easy file:FileName
: FilenameContentType
: File mime typeFile
: Base64 encoded string of the fileDateTime
: Storage datetime of the file
Response¶
{
"ReturnValue": {
"ResponseCode": 200,
"ResponseText": "OK",
"Melding": "OK",
"Gelukt": true
}
}