Email Template API v2

From Memsource
Jump to: navigation, search

List

action: api/v2/emailTemplate/list
    token                    string                             
    type                     enum(EmailTemplateType)       O

response: JSON
   [
     {
       "id":1,
       "body":"Dear {linguist.firstName},\n\nWe have new work for you:\n\n{jobInfo}\nFile: ...",
       "ccAddress":null,
       "subject":"New Work",
       "name":"New Work (en)",
       "type":"JobAssigned"
     },
     {
       "id":2,
       "body":"Dear {recipient.firstName},\n\nYour linguist user {linguist.firstName} {linguist.lastName} ...",
       "ccAddress":null,
       "subject":"Project {project.name}: {jobs.count} Job(s) {jobs.newStatus}",
       "name":"Job Status Changed (en)",
       "type":"JobStatusChanged"
     }
   ]

Get

action: api/v2/emailTemplate/get
    token                    string                             
    template                 domain(EmailTemplate)

response: JSON
   {
     "id":1,
     "body":"Dear user,\n\nWe have new work for you:\n\n ...",
     "ccAddress":null,
     "subject":"New Work",
     "name":"New Work (en)",
     "type":"JobAssigned"
   }