Using Notification Factory
Este endpoint permite crear nuevas notificaciones para que puedan ser enviadas a través del servicio de campañas usando el uuid del mensaje recién creado, este endpoint permite una amplia configuración de los mensajes. Debido a limitaciones técnicas que poseen sistemas operativos Android y Ios, hay que tener cuidado con los elementos externos como las imágenes, por lo que es importante probar en un equipo de pruebas antes de realizar un envío masivo.
#
EndpointHeaders
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer LVwuk3_oug0D6... | access_token obtained in Atenea |
Url
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
#
BodyEl campo notification_type indica el tipo de notificación que se desea crear pudiendo ser de notification, dialog, video o banner.
Field | Type | Required | Values | Examples | Comments |
---|---|---|---|---|---|
notification_version | String | true | [trust_notifications_v1] | trust_notifications_v1 | |
notification_type | String | true | [notification, dialog, video, banner] | notification | |
values | Array | true | [] | Must be a empty array |
#
DataEste campo configura el contenido principal del mensaje, tener cuidado con las imagenes/videos y los colores. Imagenes: Deben ser https y accesible desde cualquier red, formatos permitidos .png y .jpg. Videos: Deben ser https y accesible desde cualquier red, formatos permitidos .mp4 y deben tener un peso ligero para evitar problemas de lentitud al mostrar el video. Color: Precaución con el formato, enviar un color en formato incorrecto causa problemas al mostrar la notificacion, formatos soportado RGB hexadecimal sin transparencia.
Field | Type | Required | Default | Comments | Examples |
---|---|---|---|---|---|
title | String | true | Title of message | ||
message | String | true | Body of message | ||
media_url | String, Url | true | Must be video o image url with https | https://trust-assets.s3.amazonaws.com/enrollment/dialogo_covid.png | |
action_color | String, Color | true | Color of buttons | #9E2626 |
#
ButtonsDefine los botones que se mostrarán en los mensajes, por ahora solo se utilizaran button_1 y button_2 siendo este último opcional
Field | Type | Required | Default | Values | Comments | Examples |
---|---|---|---|---|---|---|
action | String, Url | true | Only 'high' or 'normal' | https://google.cl | ||
color | String, Color | false | RGB Hex color | #9E2626 | ||
text | String | true | Presione Aquí | |||
type | type | true | [url, call, mail] | url |
#
ConfigField | Type | Required | Default | Comments | Examples |
---|---|---|---|---|---|
priority | String | false | high | Only 'high' or 'normal' | high |
persistent | Boolean | false | false | true | |
cancelable | Boolean | false | false | false | |
play_time | Int | false | 0 | 5 | |
open_app | Boolean | false | None | Field that indicates whether the "open_app" button is available. It only works for notification type messages. | true |
#
MetadataField | Type | Required | Default | Comments | Examples |
---|---|---|---|---|---|
reactions | Array of strings | false | None | Array of strings than contains the "reaction_name" of emojis. Max 5, min 1 | reactions: [ "smile", "blush", "joy" ] |
info
Revisar la lista de emojis permitidos para este endpoint
#
Code Examples- Curl
- JavaScript
- Python