Obtenir les préférences de communication d'un client
GET
https://api-v2.test.eldowallet.fr/clients/:clientId/communication-preferences
Renvoie les préférences de communication d'un client : canaux autorisés (email, sms, notification) par type de notification, consentement aux notifications push informatives et commerciales, et lien vers la page publique où le client gère lui-même ses préférences (consentLink).
À retenir
- Un type de notification ou un canal jamais réglé est considéré comme autorisé (
true), de même quepushInformativeEnabledetpushCommercialEnabled.consentLinkest absent si le client n'a pas de carte de fidélité.
Requête
path parameters
clientIdstring requiredIdentifiant du client (ObjectId de 24 caractères hexadécimaux).
header parameters
x-langstringLangue des messages d'erreur et des textes renvoyés : `fr` ou `en`.enum:en,frdefault:"en"
Réponses
- 200
- 401
- 403
- 404
- 500
Schéma
application/jsoncommunicationPreferencesobject[] requirednotificationTypestring requiredenum:NEW_LOYALTY,UPDATE_LOYALTY,REMINDER_LOYALTY,EARNINGS_UPDATE,NEW_COMMUNICATION,EXPIRED_COMMUNICATION,NEW_EVENT,UPDATE_EVENT,NEW_COUPON,UPDATE_COUPON,WELCOME_INTERNAL_CLIENTS,WELCOME_CRM_CLIENTS,WELCOME_EXTERNAL_CLIENTS,WELCOME_COUPON,EXPIRED_COUPON,TRANSIT_TICKET,UPDATE_TRANSIT,HOTEL_RESERVATION,UPDATE_HOTEL_RESERVATION,CINEMA_TICKETsmsboolean requiredemailboolean requirednotificationboolean required
pushInformativeEnabledboolean requiredpushCommercialEnabledboolean requiredconsentLinkstringURL de la page publique de gestion des consentements (`/consent/:token`), sans connexion, sur laquelle le client gère lui-même ses préférences. Absente si le client n'a pas de carte de fidélité.
UNAUTHORIZED
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
FORBIDDEN
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
MODEL_NOT_FOUND
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
UNKNOWN_ERROR
Schéma
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email