REST/JSON
MNotify — notificări (REST)
Trimiți notificări multi-canal către destinatari (după IDNP) și gestionezi template-uri cu substituție de variabile.
URL de bază: https://mnotify.evisoft.com
Endpoint-uri
| Metodă | Cale | Scop |
|---|
| POST | /api/Notification | Trimite notificare { subject, body, priority, recipients[] } → 201 { id } |
| GET | /api/Notification (sau /api/Notifications) | Listă (Page/ItemsPerPage/SearchBy/OrderField) |
| GET | /api/Notification/{id} | Detalii (status + destinatari) |
| DELETE | /api/Notification/{id} | Anulează (→ Cancelled) |
| GET/POST/PUT/DELETE | /api/Template[/{id}] | CRUD template |
| POST | /api/Template/{id}/check | Randează template-ul cu { variables, userId } → { subject, body } |
Date care funcționează (seed)
| Valoare | Înseamnă |
|---|
n0000000-0000-0000-0000-000000000001 | Notificare seed „Confirmare cerere” (Delivered) |
t0000000-0000-0000-0000-000000000001 | Template seed „Welcome” ({{RecipientFirstName}}, {{customerName}}, {{code}}) |
recipient IDNP de 13 cifre | La trimitere: status recipient Delivered, notificare Sent |
Scenarii & erori (valori „magice")
| Declanșator | Rezultat |
|---|
subject = "MMOCK-501" | HTTP 501 la POST /api/Notification |
recipient IDNP …0009 | Acel destinatar → status Failed (restul Delivered) |
al doilea DELETE pe aceeași notificare | HTTP 409 (deja anulată) |
subject > 160 caractere / câmpuri lipsă / IDNP ≠ 13 cifre | HTTP 400 |
Header X-MMock-Auth: unauthorized | forbidden | HTTP 401 / 403 |
Note
- Substituție template: variabile statice {{Date}} {{Time}} {{IDNP}} {{IDNO}} {{RecipientFirstName}} {{RecipientLastName}} + custom din `variables`.
- Canale: Email, SMS, Viber, „Web push”, MCabinet. Status notificare: Pending…Sent/Delivered/Read, Cancelled, Failed.
Linkuri