get_email_templates_m Sample Call and Response
This example retrieves the list of dunning email templates configured for a client, based on the plsql_m_r73.yml definition file for Aria release 73.
This example includes every required field and a representative set of commonly used optional fields, not every field the method accepts. The sample call filters the results to one template class, and the sample response shows a mix of global and client-custom templates within that class.
Sample call
{
"rest_call": "get_email_templates_m",
"output_format": "json",
"client_no": 100234,
"auth_key": "8f3d9c2e1b7a4f6d9e0c1a2b3d4e5f60",
"filter_template_class": "D"
}
The rest_call and output_format fields are envelope fields added by the REST layer; they are not part of the method's own documented arguments. The optional filter_template_class field narrows the response to templates of a specific Aria class; this example uses “D” for Dunning. Other allowable class values include “I” for Invoice/Statement, “A” for Account Activation, “W” for Account Welcome, and several others covering contract renewal, credit card expiry, and usage threshold notices, among other purposes. Leaving filter_template_class out of a call would return templates of every class.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"templates_by_client": [
{
"template_no": 5012,
"template_name": "First Notice - Past Due",
"template_class": "D",
"client_email_template_id": "DUN-FIRST-NOTICE",
"global_ind": 0,
"default_ind": 1
},
{
"template_no": 5013,
"template_name": "Second Notice - Account At Risk",
"template_class": "D",
"client_email_template_id": "DUN-SECOND-NOTICE",
"global_ind": 0,
"default_ind": 0
},
{
"template_no": 118,
"template_name": "Standard Dunning Notice",
"template_class": "D",
"client_email_template_id": null,
"global_ind": 1,
"default_ind": 0
}
]
}
An error_code value of 0 and an error_msg value of “OK” indicate the call succeeded. The templates_by_client array would contain one entry for every template matching the requested filter; this example shows three entries. A global_ind value of 1 indicates the template is a global Aria-provided template available to any client, while a value of 0 indicates the template is custom to this client; the third entry in this example is a global template, so it has no client_email_template_id and its value is shown as null. A default_ind value of 1 indicates the template is the default template used for its class when no other template is specified; only one entry in this example carries that value. This example leaves out the nonpublic error_details field.