Template Configuration
This configuration allows you to set SMS and email templates for an event.
Creating template configuration
Request
ENDPOINT
/notification/template_configuration
METHOD
POSTRequest Body
{
"event_type": "bank_slip",
"email_template_key": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
}
Response
STATUS
201Response Body
{"template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640d51"}
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "description in portuguese",
"code": "codigo",
"extra_fields": {}
}
HTTP Code | QI Codecode | Titletitle | Description (eng)Description | Description (ptbr)translation |
---|---|---|---|---|
400 | PMB000023 | Bad Request | Already exists an template configuration to this person and event type | Já existe um template configuration para essa pessoa e event type |
Listing template configuration
Request
ENDPOINT
/notification/template_configurations
METHOD
GETResponse
STATUS
200Response Body
{
"data": [
{
"event_type": "bank_slip",
"sms_template": null,
"template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640d51",
"email_template": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
},
{
"event_type": "account_transaction",
"sms_template": null,
"template_configuration_key": "e5c337db-dacc-4f1d-8a3e-919628640ds1",
"email_template": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
}
],
"pagination": {
"current_page": 0,
"next_page": null,
"rows_per_page": 10
}
}
Updating template configuration
Request
ENDPOINT
/notification/template_configuration/TEMPLATE_CONFIGURATION_KEY
METHOD
PUTRequest Body
{
"event_type": "bank_slip",
"email_template_key": "e5c337db-dacc-4f1d-8a3e-919628640dd5"
}
Response
STATUS
201Response Body
{}
STATUS
4XXResponse Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "description in portuguese",
"code": "codigo",
"extra_fields": {}
}
HTTP Code | QI Codecode | Titletitle | Description (eng)Description | Description (ptbr)translation |
---|---|---|---|---|
400 | PMB000022 | Bad Request | The event type (event type) is not valid | O tipo de evento (tipo de evento) enviado não é válido |
404 | PMB000024 | Not Found | Template configuration not found | Configuração de template não encontrada |