Load Email Templates for Notifications in Master Data

To get email notifications from the PMS service, all required templates must be added to the Master Data Service, follow the steps below to load the templates.

Steps to Authenticate the Master Data Service

To access the Master Data Service, follow the steps below to obtain and use a client token via the Auth Manager service.

  1. Use the following Swagger URL to interact with the Auth Manager API: https://api-internal.${env}.mosip.net/v1/authmanager/swagger-ui/index.html?configUrl=/v1/authmanager/v3/api-docs/swagger-config

  2. Use the /authenticate/clientidsecretkey endpoint to generate a client token.

  3. Once the token is validated successfully, it will be added to the browser cookies automatically. This token will be used for authenticating subsequent requests to the Master Data Service.

Request payload:

{
  "id": "string",
  "version": "string",
  "requesttime": "2022-12-22T07:13:35.010Z",
  "metadata": {},
  "request": {
    "clientId": "mosip-pms-client",
    "secretKey": "XXXXXX",
    "appId": "partner"
  }
}

Steps to create a new template type in MasterData:

  1. Use the following Swagger URL for Master Data Service: https://api-internal.{env}.mosip.net/v1/masterdata/swagger-ui/index.html?configUrl=/v1/masterdata/v3/api-docs/swagger-config#/

  2. Use the POST /templatetypes endpoint from the Master Data Service to create a new template type.

  3. The request body should include the following fields:

    • code: Unique identifier for the template type.

    • description: Description of the template type.

    • isActive: Boolean value indicating whether the template type is active.

    • langCode: Language code for the template type.

  4. Once the template type is created, it can be used for template creation.

Example Request Body:

{ 
  "id": "string", 
  "version": "string", 
  "requesttime": "2025-02-26T07:14:29.119Z", 
  "metadata": {}, 
  "request": 
  { 
    "code": "PARTNER_CERT_EXPIRY_TEMPLATE", 
    "description": "Template type for partner certificate expiry", 
    "isActive": true, 
    "langCode": "fra" 
    } 
  }

Make sure to create the following template types for PMS notification templates.

Each template type should be created for all six supported languages: English (eng), French (fra), Arabic (ara), Tamil (tam), Hindi (hin) and Kannada (kan).

  • ROOT_CERT_EXPIRY

  • INTERMEDIATE_CERT_EXPIRY

  • PARTNER_CERT_EXPIRY

  • WEEKLY_SUMMARY_TEMPLATE

  • ROOT_CERT_EXPIRY_SUBJECT

  • INTERMEDIATE_CERT_EXPIRY_SUBJECT

  • PARTNER_CERT_EXPIRY_SUBJECT

  • WEEKLY_SUMMARY_SUBJECT

Steps to add a new template for PMS:

New Templates are avaliable here https://github.com/mosip/partner-management-services/tree/develop/docs/templates

  1. Use the POST /templates endpoint from the Master Data Service to add new templates for the PMS module.

  2. The request body must include the following fields:

    • id: ID of the template.

    • name: Name of the template.

    • description: Description of the template.

    • fileFormatCode: Format of the template file (e.g., html or txt).

    • model: Template model type (e.g., velocity).

    • fileText: Content of the template in the specified format.(If the file contains HTML content, all double quotes " within the content should be escaped using a backslash \")

    • moduleId: Unique identifier for the PMS module.

    • moduleName: Name of the module (e.g., PMS).

    • templateTypeCode: Code of the template type.

    • langCode: Language code for the template.

    • isActive: Boolean value indicating whether the template is active.

  3. Once the template is created, it will be stored in the mosip_master database.

Example Request Body:

{
  "id": "string",
  "version": "string",
  "requesttime": "2025-02-26T04:06:44.594Z",
  "metadata": {},
  "request": {
    "id": null,
    "name": "partner-certificate-expiry-template-eng",
    "description": "Template for partner certificate expiry",
    "fileFormatCode": "html",
    "model": "velocity",
    "fileText": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\" /><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /><style></style></head></html>",
    "moduleId": "10007",
    "moduleName": "PMS",
    "templateTypeCode": "PARTNER_CERT_EXPIRY_TEMPLATE",
    "langCode": "eng",
    "isActive": true
  }
}

Also add all the templates listed in the tables below with the specified ID, name, description, and other relevant details as provided.

ID
Name
Description
File Fomat Code
Template Type Code
LangCode

3516

root-certificate-expiry-template-eng

Template for root certificate expiry

html

ROOT_CERT_EXPIRY_TEMPLATE

eng

3517

root-certificate-expiry-template-fra

Modèle d'expiration du certificat racine

html

ROOT_CERT_EXPIRY_TEMPLATE

fra

3518

root-certificate-expiry-template-ara

نموذج لانتهاء صلاحية شهادة الجذر

html

ROOT_CERT_EXPIRY_TEMPLATE

ara

3519

root-certificate-expiry-template-hin

रूट प्रमाणपत्र समाप्ति के लिए टेम्पलेट

html

ROOT_CERT_EXPIRY_TEMPLATE

hin

3520

root-certificate-expiry-template-kan

ಮೂಲ ಪ್ರಮಾಣಪತ್ರದ ಮುಕ್ತಾಯ ದಿನಾಂಕದ ಟೆಂಪ್ಲೇಟ್

html

ROOT_CERT_EXPIRY_TEMPLATE

kan

3521

root-certificate-expiry-template-tam

ரூட் சான்றிதழ் காலாவதிக்கான டெம்ப்ளேட்

html

ROOT_CERT_EXPIRY_TEMPLATE

tam

3522

intermediate-certificate-expiry-template-eng

Template for intermediate certificate expiry

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

eng

3523

intermediate-certificate-expiry-template-fra

Modèle d'expiration de certificat intermédiaire

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

fra

3524

intermediate-certificate-expiry-template-ara

نموذج انتهاء صلاحية الشهادة المتوسطة

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

ara

3525

intermediate-certificate-expiry-template-hin

मध्यवर्ती प्रमाणपत्र समाप्ति के लिए टेम्पलेट

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

hin

3526

intermediate-certificate-expiry-template-kan

ಮಧ್ಯಂತರ ಪ್ರಮಾಣಪತ್ರ ಮುಕ್ತಾಯಕ್ಕಾಗಿ ಟೆಂಪ್ಲೇಟ್

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

kan

3527

intermediate-certificate-expiry-template-tam

இடைநிலை சான்றிதழ் காலாவதிக்கான டெம்ப்ளேட்

html

INTERMEDIATE_CERT_EXPIRY_TEMPLATE

tam

3528

partner-certificate-expiry-template-eng

Template for partner certificate expiry

html

PARTNER_CERT_EXPIRY_TEMPLATE

eng

3529

partner-certificate-expiry-template-fra

Modèle d'expiration du certificat de partenaire

html

PARTNER_CERT_EXPIRY_TEMPLATE

fra

3530

partner-certificate-expiry-template-ara

نموذج انتهاء صلاحية شهادة الشريك

html

PARTNER_CERT_EXPIRY_TEMPLATE

ara

3531

partner-certificate-expiry-template-hin

भागीदार प्रमाणपत्र समाप्ति के लिए टेम्पलेट

html

PARTNER_CERT_EXPIRY_TEMPLATE

hin

3532

partner-certificate-expiry-template-kan

ಪಾಲುದಾರ ಪ್ರಮಾಣಪತ್ರದ ಮುಕ್ತಾಯ ದಿನಾಂಕದ ಟೆಂಪ್ಲೇಟ್

html

PARTNER_CERT_EXPIRY_TEMPLATE

kan

3533

partner-certificate-expiry-template-tam

கூட்டாளர் சான்றிதழ் காலாவதிக்கான டெம்ப்ளேட்

html

PARTNER_CERT_EXPIRY_TEMPLATE

tam

3534

weekly-summary-template-eng

Template for weekly summary notifications

html

WEEKLY_SUMMARY_TEMPLATE

eng

3535

weekly-summary-template-fra

Modèle pour les notifications récapitulatives hebdomadaires

html

WEEKLY_SUMMARY_TEMPLATE

fra

3536

weekly-summary-template-ara

نموذج لإشعارات الملخص الأسبوعية

html

WEEKLY_SUMMARY_TEMPLATE

ara

3537

weekly-summary-template-hin

साप्ताहिक सारांश अधिसूचनाओं के लिए टेम्पलेट

html

WEEKLY_SUMMARY_TEMPLATE

hin

3538

weekly-summary-template-kan

ವಾರದ ಸಾರಾಂಶ ಅಧಿಸೂಚನೆಗಳಿಗಾಗಿ ಟೆಂಪ್ಲೇಟ್

html

WEEKLY_SUMMARY_TEMPLATE

kan

3539

weekly-summary-template-tam

வாராந்திர சுருக்க அறிவிப்புகளுக்கான டெம்ப்ளேட்

html

WEEKLY_SUMMARY_TEMPLATE

tam

3540

root-certificate-expiry-sub-template-eng

Subject template for root certificate expiry

txt

ROOT_CERT_EXPIRY_SUBJECT

eng

3541

root-certificate-expiry-sub-template-fra

Modèle de sujet pour l'expiration du certificat racine

txt

ROOT_CERT_EXPIRY_SUBJECT

fra

3542

root-certificate-expiry-sub-template-ara

نموذج موضوعي لانتهاء صلاحية شهادة الجذر

txt

ROOT_CERT_EXPIRY_SUBJECT

ara

3543

root-certificate-expiry-sub-template-hin

रूट प्रमाणपत्र समाप्ति के लिए विषय टेम्पलेट

txt

ROOT_CERT_EXPIRY_SUBJEC

hin

3544

root-certificate-expiry-sub-template-kan

ಮೂಲ ಪ್ರಮಾಣಪತ್ರದ ಮುಕ್ತಾಯ ದಿನಾಂಕದ ವಿಷಯ ಟೆಂಪ್ಲೇಟ್

txt

ROOT_CERT_EXPIRY_SUBJEC

kan

3545

root-certificate-expiry-sub-template-tam

மூலச் சான்றிதழ் காலாவதிக்கான பொருள் டெம்ப்ளேட்

txt

ROOT_CERT_EXPIRY_SUBJEC

tam

3546

intermediate-certificate-expiry-sub-template-eng

Subject template for intermediate certificate expiry

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

eng

3547

intermediate-certificate-expiry-sub-template-fra

Modèle de sujet pour l'expiration du certificat intermédiaire

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

fra

3548

intermediate-certificate-expiry-sub-template-ara

نموذج موضوعي لانتهاء صلاحية الشهادة المتوسطة

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

ara

3549

intermediate-certificate-expiry-sub-template-hin

इंटरमीडिएट प्रमाणपत्र समाप्ति के लिए विषय टेम्पलेट

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

hin

3550

intermediate-certificate-expiry-sub-template-kan

ಮಧ್ಯಂತರ ಪ್ರಮಾಣಪತ್ರ ಮುಕ್ತಾಯಕ್ಕಾಗಿ ವಿಷಯ ಟೆಂಪ್ಲೇಟ್

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

kan

3551

intermediate-certificate-expiry-sub-template-tam

இடைநிலை சான்றிதழ் காலாவதிக்கான பொருள் வார்ப்புரு

txt

INTERMEDIATE_CERT_EXPIRY_SUBJECT

tam

3552

partner-certificate-expiry-sub-template-eng

Subject template for partner certificate expiry

txt

PARTNER_CERT_EXPIRY_SUBJECT

eng

3553

partner-certificate-expiry-sub-template-fra

Modèle de sujet pour l'expiration du certificat du partenaire

txt

PARTNER_CERT_EXPIRY_SUBJECT

fra

3554

partner-certificate-expiry-sub-template-ara

نموذج موضوعي لانتهاء صلاحية شهادة الشريك

txt

PARTNER_CERT_EXPIRY_SUBJECT

ara

3555

partner-certificate-expiry-sub-template-hin

भागीदार प्रमाणपत्र समाप्ति के लिए विषय टेम्पलेट

txt

PARTNER_CERT_EXPIRY_SUBJECT

hin

3556

partner-certificate-expiry-sub-template-kan

ಪಾಲುದಾರ ಪ್ರಮಾಣಪತ್ರದ ಮುಕ್ತಾಯದ ವಿಷಯ ಟೆಂಪ್ಲೇಟ್

txt

PARTNER_CERT_EXPIRY_SUBJECT

kan

3557

partner-certificate-expiry-sub-template-tam

கூட்டாளர் சான்றிதழ் காலாவதிக்கான பொருள் டெம்ப்ளேட்

txt

PARTNER_CERT_EXPIRY_SUBJECT

tam

3558

weekly-summary-subject-template-eng

Subject template for weekly summary notifications

txt

WEEKLY_SUMMARY_SUBJECT

eng

3559

weekly-summary-subject-template-fra

Modèle de sujet pour les notifications récapitulatives hebdomadaires

txt

WEEKLY_SUMMARY_SUBJECT

fra

3560

weekly-summary-subject-template-ara

قالب موضوعي لإشعارات الملخص الأسبوعي

txt

WEEKLY_SUMMARY_SUBJECT

ara

3561

weekly-summary-subject-template-hin

साप्ताहिक सारांश अधिसूचनाओं के लिए विषय टेम्पलेट

txt

WEEKLY_SUMMARY_SUBJECT

hin

3562

weekly-summary-subject-template-kan

ವಾರದ ಸಾರಾಂಶ ಅಧಿಸೂಚನೆಗಳಿಗಾಗಿ ವಿಷಯ ಟೆಂಪ್ಲೇಟ್

txt

WEEKLY_SUMMARY_SUBJECT

kan

3563

weekly-summary-subject-template-tam

வாராந்திர சுருக்க அறிவிப்புகளுக்கான தலைப்பு டெம்ப்ளேட்

txt

WEEKLY_SUMMARY_SUBJECT

tam

Steps to edit templates:

  1. To update an existing template, use the PUT /templates endpoint from the Master Data Service.

  2. This allows modifications to attributes such as name, description, fileFormatCode, fileText, and other relevant fields, except langCode and id, which cannot be changed.

Last updated

Was this helpful?