Aller au contenu principal

Notifications

L'API Mobile gère deux canaux de notification : les notifications push Firebase (FCM) reçues directement sur l'appareil, et les notifications applicatives stockées côté serveur.

Notifications push FCM​

L'application reçoit le message push directement via Firebase. Le payload data contient toujours type et un sous-ensemble de clés selon le type d'événement.

TypeClés obligatoires (en plus de type)
TRANSFERT_EMISmontant, idObject
TRANSFERT_RECUmontant, idObject
TRANSFERT_REJETEmontant, idObject, notificationId
RTP_INITIEEclientCategorie, clientAlias, idObject, notificationId
RTP_RECUEclientCategorie, clientAlias, clientNom, canal, idObject, notificationId
RTP_ACCEPTEEidObject
RTP_REJETEEidObject
REVENDICATION_INITIEEidObject, notificationId
REVENDICATION_REJETEEidObject, notificationId
REVENDICATION_ACCEPTEEidObject, notificationId
ANNULATION_DEMANDEEidObject, notificationId
ANNULATION_REJETEEidObject, notificationId
ABONNEMENT_TERMINEidObject
AUTH_CONNEXIONnotificationId

Toutes les valeurs sont transmises en chaîne (contrainte FCM : payload data toujours string/string).

Champs obligatoires

Omettre une clé obligatoire pour le type expose le SDK à un crash au parsing. Vérifier la liste required de chaque variante du schéma NotificationPushData dans la référence API.

Notifications applicatives​

Opérations en cours de raccordement (501)​

OpérationMéthodeChemin
Liste des notificationsGET/v1/api/notifications
Nombre de non luesGET/v1/api/notifications/non-lues
Marquer comme luePUT/v1/api/notifications/{id}
Enregistrer le token pushPOST/v1/api/notifications/token

L'enregistrement du token FCM (POST /notifications/token) est requis pour recevoir les push ; son raccordement est prévu dans un prochain chantier.