Notification
price
GET /api/v2/notification/price HTTP/1.1
HTTP/1.1 200 OK
{
"notificationPrice" : 1000.0,
"smsSegmentPrice" : 3.15,
"emailPrice" : 1000.0
}
Path | Type | Description |
---|---|---|
|
|
Price for notification |
|
|
Price for one sms segment. To know segment length see GSM 03.38 standard |
|
|
Price for email |
patterns
GET /api/v2/notification/patterns HTTP/1.1
HTTP/1.1 200 OK
[ {
"id" : "FAMILY_NAME_RU",
"pattern" : ":Ф:",
"precalculatedLength" : 9
}, {
"id" : "FIRST_NAME_RU",
"pattern" : ":И:",
"precalculatedLength" : 9
}, {
"id" : "PATRONYMIC_NAME_RU",
"pattern" : ":О:",
"precalculatedLength" : 9
}, {
"id" : "DEAR_RU",
"pattern" : ":Уваж:",
"precalculatedLength" : 9
}, {
"id" : "BONUSES_BALANCE_RU",
"pattern" : ":БалансБонусов:",
"precalculatedLength" : 5
}, {
"id" : "BONUSES_ACCUMULATED_RU",
"pattern" : ":НачисленоБонусов:",
"precalculatedLength" : 4
}, {
"id" : "BONUSES_BURN_RU",
"pattern" : ":СгораетБонусов:",
"precalculatedLength" : 4
}, {
"id" : "BONUSES_BURN_ON_RU",
"pattern" : ":ДатаСгорания:",
"precalculatedLength" : 10
}, {
"id" : "CONTACT_LENS_DISCOUNT_END_ON_RU",
"pattern" : ":АкцияМКЛ:",
"precalculatedLength" : 10
}, {
"id" : "FAMILY_NAME_EN",
"pattern" : ":Surname:",
"precalculatedLength" : 9
}, {
"id" : "FIRST_NAME_EN",
"pattern" : ":FirstName:",
"precalculatedLength" : 9
}, {
"id" : "DEAR_EN",
"pattern" : ":Dear:",
"precalculatedLength" : 9
}, {
"id" : "ORDER_ID",
"pattern" : ":ID:",
"precalculatedLength" : 10
}, {
"id" : "DEPARTMENT_TEL",
"pattern" : ":Tel:",
"precalculatedLength" : 10
}, {
"id" : "BONUSES_BALANCE_EN",
"pattern" : ":BonusBalance:",
"precalculatedLength" : 5
}, {
"id" : "BONUSES_ACCUMULATED_EN",
"pattern" : ":AccruedBonuses:",
"precalculatedLength" : 4
}, {
"id" : "BONUSES_BURN_EN",
"pattern" : ":BonusesBurn:",
"precalculatedLength" : 4
}, {
"id" : "BONUSES_BURN_ON_EN",
"pattern" : ":BurningDate:",
"precalculatedLength" : 10
}, {
"id" : "CONTACT_LENS_DISCOUNT_END_ON_EN",
"pattern" : ":CLOffer:",
"precalculatedLength" : 10
} ]
list
Parameter | Description |
---|---|
|
Отвечает за тип настройки (SMS, EMAIL, GENERAL) |
GET /api/v2/notification/settings/SMS HTTP/1.1
HTTP/1.1 200 OK
{
"NOTIFICATION_ORDER" : {
"text" : "Новый заказ"
},
"NOTIFICATION_DOCTOR_APPOINTMENT_REMINDER" : {
"text" : "Ждем вас в :время:. :адрес:"
},
"NOTIFICATION_BONUS" : {
"text" : "Вам зачислены бонусы!"
},
"GENERAL" : {
"companySmsName" : "NoName"
}
}
Возвращается Мапа вида <Type, <SettingCode, SettingValue>>
-
GENERAL - общая настройка
-
NOTIFICATION_BONUS - настройка для шаблона о получении бонусов
-
NOTIFICATION_ORDER - настройка для шаблона о готовности заказа
-
text - текст сообщения,
-
subject - тема сообщения (для типа настройки EMAIL),
-
и т.д.;
Аналогичная Мапа передаётся в теле update
update
Parameter | Description |
---|---|
|
Отвечает за тип настройки (SMS, EMAIL, GENERAL) |
PUT /api/v2/notification/settings/SMS HTTP/1.1
{
"GENERAL" : {
"companySmsName" : "Test name"
},
"NOTIFICATION_BONUS" : {
"text" : "Вам зачислены бонусы!"
},
"NOTIFICATION_ORDER" : {
"text" : "Новый заказ"
}
}
types
Возвращает все значения для Type
GET /api/v2/notification/settings/types HTTP/1.1
HTTP/1.1 200 OK
{
"NOTIFICATION_ORDER" : "Уведомление о готовности заказа",
"NOTIFICATION_DOCTOR_APPOINTMENT_REMINDER" : "ru.itigris.optima2.enums.setting.notification.SmsType.NOTIFICATION_DOCTOR_APPOINTMENT_REMINDER",
"NOTIFICATION_BONUS" : "Сообщение о начислении бонусов",
"GENERAL" : "Общие"
}
client notification types available
GET /api/v2/notification/client/999999990 HTTP/1.1
HTTP/1.1 200 OK
{
"canSendPush" : false,
"canSendEmail" : true,
"canSendSms" : true
}
Path | Type | Description |
---|---|---|
|
|
Whether push notifications can be sent to the client |
|
|
Whether email notifications can be sent to the client |
|
|
Whether SMS notifications can be sent to the client |
|
|
Preferred notification type (NOTIFICATION for push, EMAIL, SMS) |
send client notification
POST /api/v2/notification/client/999999990 HTTP/1.1
{
"type" : "SMS",
"message" : "Test SMS message",
"subject" : null,
"price" : null
}
Path | Type | Description | Constraints |
---|---|---|---|
type |
String |
Notification type (NOTIFICATION for push, EMAIL, SMS) |
Must not be null |
message |
String |
Notification message text |
Must not be blank. |
subject |
String |
Email subject (required only for EMAIL type) |
Size must be between 0 and 100 inclusive |
HTTP/1.1 200 OK
Unresolved directive in index.adoc - include::/builds/itigris/optima-core/optima/optima-2-backend/target/generated-snippets/notification-client-send/response-fields.adoc[]