Document toolboxDocument toolbox

Template REST API

3.13.0

The Template REST API is used for managing the many templates defined within the system. Templates are used to customize the content that is automatically generated by the system. For example templates are used to define email subjects and bodies and there is a template that defines the layout of invoices that get converted into PDFs. 

Templates are fully localized with a separate template definition for each configured language. 

On this page:

Related pages:

  • Template Structure
  • Supported Languages

Resource URL Summary

Retrieve the details of a specific Template

GET /seiapi/v3/trans/Template/${DeploymentGroupID}/${TemplateID}/{$LanguageID}

Update details of a specific Template

POST /seiapi/v3/trans/Template/${DeploymentGroupID}/${TemplateID}/{$LanguageID}

API Specific Parameters

ParameterDescription

${DeploymentGroupID}

Identifies the Deployment Group.

(info) The system default deployment group ID is Default.

${LanguageID}Identifies the language ID of the template. This parameter must be a valid language ID of the currently configured entity.

${TemplateID}

The system defined Template ID.

Valid values are:

Template IDDescription
ApplicationDetailEmailBody
This template defines the email body used when notifying application details to a user.
ApplicationDetailEmailSubject
This template defines the email subject used when notifying application details to a user.
EstimateThis template is used when generating an estimate PDF file.
EstimateFileNameThis template is used to construct the file name used when generating a PDF estimate.
EstimateEmailSubjectThis template defines the email subject used when an estimate is emailed to a customer.
EstimateEmailBodyThis template defines the email body used when an estimate is emailed to a customer. Note, this is only the body of the email as the estimate itself will be added as a PDF attachment. The estimate PDF attachment is generated using the Estimate template while the estimate PDF filename is controlled by the EstimateFileName template.
InvoiceThis template is used when generating an invoice PDF file.
InvoiceFileNameThis template is used to construct the file name used when generating a PDF invoice.
InvoiceEmailSubjectThis template defines the email subject used when an invoice is emailed to a customer.
InvoiceEmailBodyThis template defines the email body used when an invoice is emailed to a customer. Note, this is only the body of the email as the invoice itself will be added as a PDF attachment. The invoice PDF attachment is generated using the Invoice template while the invoice PDF filename is controlled by the InvoiceFileName template.

NewUserEmailSubject

This template defines the email subject used when notifying a new user that they had been added to the system.

NewUserEmailBody

This template defines the email body used when notifying a new user that they have been added to the system.

PasswordResetEmailSubject

This template defines the email subject used when notifying a user that their password has been reset.
PasswordResetEmailBody This template defines the email body used when notifying a user that their password has been reset.

Supported HTTP Methods

MethodDescription
GET

Returns the system template identified by the ${id}/${languageId} combination

POSTUpdates the system template identified by the ${id}/${languageId} combination

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.

HTTP Body

The body contains the template definition. 

(info) All Templates should use an HTTP Content-Type of text/plain. 

HTTP Response

Response Codes

HTTP CodeDescription

200

OK. Request was processed successfully.

(info) Even though the request may return a successful code of 200, the body may still contain warning details.

400

Syntax error in request. The response body will provide more details on the specific reason. Verify the URI, its parameters, and request body.

401

Unauthorized. The credentials are incorrect, please verify and try again.

404

Not Found. The URL is incorrect, please verify and try again.

405

The specified HTTP method is not supported for this resource.

409

Conflict. This error usually occurs when attempting to overwrite an existing object that can not be replaced.

410

The specified object does not exists. Please verify the URI.

500

An error has occurred within ServiceMobility. Please review the error message details and if necessary, contact customer support.

Response Body

{
    "code": 400,
    "detail": {
        "message": "",
        "params": {
            "value": ""
        },
        "dataPath": ""
    }
}

Response Object Properties

PropertyTypeDescription
codeintegerThe HTTP response code.
detailobject

This object provides additional details the system provided while processing the transactions. Usually the details provide additional information on why an error occurred. However, it may also provide warning details even when the requests was successful. For example, the request may have returned a response of 200=OK, but included warnings in the response body of properties that are still being used that are marked for deprecation.

PropertyTypeDescription
messagestringA human readable message related to the processing of the request.
paramscollectionA collection of additional key/value pairs that contain the values that caused the warning/error condition.
dataPathstringIdentifies the location within the request body the message refers to.



API Specifics