Notifications
Developers guide
Create a notification template
curl --location 'https://api.vcita.biz/business/notificationscenter/v1/notificationsmetadata' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {TOKEN}' \
--data '{
"notification_code_name": string,
"channel": {
"push": boolean,
"pane": boolean
},
"deep_link": string,
"text": {
"en": {
"title": "Hi ${first_name}!",
"body": "You'\''ve received a new message from ${sender}: ${message}",
"display_name": "The name to be displayed in Settings Page",
"description": "The description of the notification to be displayed in Settings page"
}
},
"notification_type": "{NOTIFICATION_TYPE}"
}'
notification_code_name - free text
Text description
- The "" tag is the only HTML tag allowed.
- No nested tags are allowed.
- ‘target’ attribute is always set to “blank”. Don’t try to change it, it won’t work.
- ‘href’ attribute can be a deep link or universal link.
- Link’s InnerText is mandatory
- Character limitation take in consideration the link’s InnerText, but not the HTML tags (still 160 max)
- Example: "description":"Here you may enter a link Link Text end of description"
deep_link
- deep link can be internal (relative to https://www.vcita.com/ , e.g.: app/dashboard , app/clients etc) or external (will open in new tab).
- Can also be left empty in template
- Can be sent per notification through the send notification API (for calculated routes, e.g. ‘app/clients/uid?matteruid=_uid’).
- ‘app/dashboard’ is fallback if no deep link is set/sent.
Notification types
- payments
- clients
- calendar
- booking
- marketing
- teamchat
- scheduling
- advertising
- group_events
- documents
- messages
- reviews
- social
- account
Notification types API
Get the updated list of notification types
curl --location --request GET 'https://api.vcita.biz/business/notificationscenter/v1/notificationstype' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {TOKEN}' \
Edit notification template
curl --location --request PUT 'http://api.vcita.biz/business/notificationscenter/v1/notificationsmetadata/{NOTIFICATION_CODE_NAME}' \
--header 'Authorization: {TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"channel": {
"push" : boolean,
"pane": boolean
},
"deep_link": "",
"text": {
"es": {
"title": "",
"body": "",
"display_name":"",
"description":""
}
},
"notification_type": "{NOTIFICATION_TYPE}"
}'
Delete notification template
curl --location --request DELETE 'https://api.vcita.biz/business/notificationscenter/v1/notificationsmetadata/{NOTIFICATION_CODE_NAME}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {TOKEN}'
Sending notification
curl --location --request POST 'https://api.vcita.biz/business/notificationscenter/v1/notifications' \
--header 'Authorization: Bearer {{app token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"staff_uid": *staff_uid*,
"notification_code_name": {NOTIFICATION_CODE_NAME},
"locale": en/fr/de/it/pl/pt/es/nl/he/sl/en_gb,
"deep_link": *link*
"params": {
first_name: string,
sender: string,
messege: string
}
}
'
Updated 4 months ago