Update Event notification by id
PUT https://services.leadconnectorhq.com/calendars/{calendarId}/notifications/{notificationId}
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
Body
Notification recipient type Posibles valores: ‘contact’, ‘guest’, ‘assignedUser’, ‘emails’, ‘phoneNumbers’, ‘business’
Additional email addresses to receive notifications.
Additional phone numbers to receive notifications.
Selected users for in-App and business email notifications. Supports user IDs and special keyword “sub_account_admin”
Notification channel Posibles valores: ‘email’, ‘inApp’, ‘sms’, ‘whatsapp’
Notification type Posibles valores: ‘booked’, ‘confirmation’, ‘cancellation’, ‘reminder’, ‘followup’, ‘reschedule’
Is the notification active
Marks the notification as deleted (soft delete)
Template ID for email notification
Body for email notification. Not necessary for in-App notification
Subject for email notification. Not necessary for in-App notification
Specifies the time after which the follow-up notification should be sent. This is not required for other notification types.
Specifies the time before which the reminder notification should be sent. This is not required for other notification types.
From address for email notification
from number for sms notification
From name for email/sms notification
Respuestas
200 - Successful response
Result of delete/update operation
Ejemplo
curl -X PUT 'https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"receiverType": "contact",
"additionalEmailIds": [
"example1@email.com",
"example2@email.com"
],
"additionalPhoneNumbers": [
"+919876744444",
"+919876744445"
],
"selectedUsers": [
"userId1",
"userId2",
"sub_account_admin"
],
"channel": "email",
"notificationType": "booked",
"isActive": true,
"deleted": false,
"templateId": "string",
"body": "string",
"subject": "string",
"afterTime": [
{
"timeOffset": 1,
"unit": "hours"
}
],
"beforeTime": [
{
"timeOffset": 1,
"unit": "hours"
}
],
"fromAddress": "string",
"fromNumber": "string",
"fromName": "string"
}'
const response = await fetch('https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"receiverType": "contact", "additionalEmailIds": ["example1@email.com", "example2@email.com"], "additionalPhoneNumbers": ["+919876744444", "+919876744445"], "selectedUsers": ["userId1", "userId2", "sub_account_admin"], "channel": "email", "notificationType": "booked", "isActive": true, "deleted": false, "templateId": "string", "body": "string", "subject": "string", "afterTime": [{"timeOffset": 1, "unit": "hours"}], "beforeTime": [{"timeOffset": 1, "unit": "hours"}], "fromAddress": "string", "fromNumber": "string", "fromName": "string"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"receiverType": "contact", "additionalEmailIds": ["example1@email.com", "example2@email.com"], "additionalPhoneNumbers": ["+919876744444", "+919876744445"], "selectedUsers": ["userId1", "userId2", "sub_account_admin"], "channel": "email", "notificationType": "booked", "isActive": true, "deleted": false, "templateId": "string", "body": "string", "subject": "string", "afterTime": [{"timeOffset": 1, "unit": "hours"}], "beforeTime": [{"timeOffset": 1, "unit": "hours"}], "fromAddress": "string", "fromNumber": "string", "fromName": "string"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/YOUR_calendarId/notifications/YOUR_notificationId');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'receiverType': 'contact', 'additionalEmailIds': ['example1@email.com', 'example2@email.com'], 'additionalPhoneNumbers': ['+919876744444', '+919876744445'], 'selectedUsers': ['userId1', 'userId2', 'sub_account_admin'], 'channel': 'email', 'notificationType': 'booked', 'isActive': true, 'deleted': false, 'templateId': 'string', 'body': 'string', 'subject': 'string', 'afterTime': [{'timeOffset': 1, 'unit': 'hours'}], 'beforeTime': [{'timeOffset': 1, 'unit': 'hours'}], 'fromAddress': 'string', 'fromNumber': 'string', 'fromName': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);