Dokumentasi API SunnyDay
  1. Calendars
Dokumentasi API SunnyDay
  • Introduction
  • Locations
    • Update Locations
      PUT
    • Get Location Data
      GET
  • Calendars
    • Calendars
      • Get Free Slots
        GET
      • Update Calendar
        PUT
      • Get Calendar
        GET
      • Delete Calendar
        DELETE
      • Get Calendars
        GET
      • Create Calendar
        POST
    • Calendar Groups
      • Get Groups
      • Create Calendar Group
      • Validate group slug
      • Delete Group
      • Update Group
      • Disable Group
    • Calendar Events
      • Create Appointment
      • Update Appointment
      • Get Appointment
      • Get Calendar Events
      • Get Blocked Slots
      • Create Block Slot
      • Update Block Slot
      • Delete Event
    • Appointment Notes
      • Get Notes
      • Create Note
      • Update Note
      • Delete Note
    • Calendar Resources: Rooms & Equipments
      • Get Calendar Resource
      • Update Calendar Resource
      • Delete Calendar Resource
      • List Calendar Resources
      • Create Calendar Resource
    • Calendar Notifications
      • Get notifications
  1. Calendars

Update Calendar

PUT
https://services.sunnyday.co.id/api/calendars/{calendarId}
Update calendar by ID.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Header Params

Body Params application/json

Examples

Responses

🟢200200 OK
text/plain
Body

🟠400400 Bad Request
🟠401401 Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://services.sunnyday.co.id/api/calendars/ocQHyuzHvysMo5N5VsXc' \
--header 'Version: 2021-04-15' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "groupId": "BqTwX8QFwXzpegMve9EQ",
  "teamMembers": [
    {
      "userId": "ocQHyuzHvysMo5N5VsXc",
      "priority": 0.5,
      "isPrimary": true,
      "locationConfigurations": [
        {
          "kind": "custom",
          "location": "string"
        }
      ]
    }
  ],
  "eventType": "RoundRobin_OptimizeForAvailability",
  "name": "test calendar",
  "description": "this is used for testing",
  "slug": "test1",
  "widgetSlug": "test1",
  "widgetType": "classic",
  "eventTitle": "string",
  "eventColor": "#039be5",
  "locationConfigurations": [
    {
      "kind": "custom",
      "location": "string"
    }
  ],
  "slotDuration": 30,
  "slotDurationUnit": "mins",
  "preBufferUnit": "mins",
  "slotInterval": 30,
  "slotIntervalUnit": "mins",
  "slotBuffer": 0,
  "preBuffer": 0,
  "appoinmentPerSlot": 0,
  "appoinmentPerDay": 0,
  "allowBookingAfter": 0,
  "allowBookingAfterUnit": "days",
  "allowBookingFor": 0,
  "allowBookingForUnit": "days",
  "openHours": [
    {
      "daysOfTheWeek": [
        0
      ],
      "hours": [
        {
          "openHour": 0,
          "openMinute": 0,
          "closeHour": 0,
          "closeMinute": 0
        }
      ]
    }
  ],
  "enableRecurring": false,
  "recurring": {
    "freq": "DAILY",
    "count": 0,
    "bookingOption": "skip",
    "bookingOverlapDefaultStatus": "confirmed"
  },
  "formId": "string",
  "stickyContact": true,
  "isLivePaymentMode": true,
  "autoConfirm": true,
  "shouldSendAlertEmailsToAssignedMember": true,
  "alertEmail": "string",
  "googleInvitationEmails": true,
  "allowReschedule": true,
  "allowCancellation": true,
  "shouldAssignContactToTeamMember": true,
  "shouldSkipAssigningContactForExisting": true,
  "notes": "string",
  "pixelId": "string",
  "formSubmitType": "ThankYouMessage",
  "formSubmitRedirectURL": "string",
  "formSubmitThanksMessage": "string",
  "availabilityType": 0,
  "availabilities": [
    {
      "date": "2023-09-24T00:00:00.000Z",
      "hours": [
        {
          "openHour": 0,
          "openMinute": 0,
          "closeHour": 0,
          "closeMinute": 0
        }
      ],
      "deleted": false,
      "id": "string"
    }
  ],
  "guestType": "count_only",
  "consentLabel": "string",
  "calendarCoverImage": "string",
  "lookBusyConfig": {
    "enabled": true,
    "LookBusyPercentage": 0
  },
  "isActive": true
}'
Response Response Example
200 - 200 OK
{
  "calendar": {
    "isActive": true,
    "locationId": "ocQHyuzHvysMo5N5VsXc",
    "groupId": "BqTwX8QFwXzpegMve9EQ",
    "teamMembers": [
      {
        "userId": "ocQHyuzHvysMo5N5VsXc",
        "priority": 0.5,
        "isPrimary": true,
        "locationConfigurations": [
          {
            "kind": "custom",
            "location": "string",
            "meetingId": "my_conference_id"
          }
        ]
      }
    ],
    "eventType": "RoundRobin_OptimizeForAvailability",
    "name": "test calendar",
    "description": "this is used for testing",
    "slug": "test1",
    "widgetSlug": "test1",
    "calendarType": "round_robin",
    "widgetType": "classic",
    "eventTitle": "{{contact.name}}",
    "eventColor": "#039be5",
    "locationConfigurations": [
      {
        "kind": "custom",
        "location": "string",
        "meetingId": "my_conference_id"
      }
    ],
    "slotDuration": 30,
    "slotDurationUnit": "mins",
    "slotInterval": 30,
    "slotIntervalUnit": "mins",
    "slotBuffer": 0,
    "slotBufferUnit": "mins",
    "preBuffer": 0,
    "preBufferUnit": "mins",
    "appoinmentPerSlot": 1,
    "appoinmentPerDay": 0,
    "allowBookingAfter": 0,
    "allowBookingAfterUnit": "days",
    "allowBookingFor": 0,
    "allowBookingForUnit": "days",
    "openHours": [
      {
        "daysOfTheWeek": [
          0
        ],
        "hours": [
          {
            "openHour": 0,
            "openMinute": 0,
            "closeHour": 0,
            "closeMinute": 0
          }
        ]
      }
    ],
    "enableRecurring": false,
    "recurring": {
      "freq": "DAILY",
      "count": 0,
      "bookingOption": "skip",
      "bookingOverlapDefaultStatus": "confirmed"
    },
    "formId": "string",
    "stickyContact": true,
    "isLivePaymentMode": true,
    "autoConfirm": true,
    "shouldSendAlertEmailsToAssignedMember": true,
    "alertEmail": "string",
    "googleInvitationEmails": false,
    "allowReschedule": true,
    "allowCancellation": true,
    "shouldAssignContactToTeamMember": true,
    "shouldSkipAssigningContactForExisting": true,
    "notes": "string",
    "pixelId": "string",
    "formSubmitType": "ThankYouMessage",
    "formSubmitRedirectURL": "string",
    "formSubmitThanksMessage": "string",
    "availabilityType": 0,
    "availabilities": [
      {
        "date": "2023-09-24T00:00:00.000Z",
        "hours": [
          {
            "openHour": 0,
            "openMinute": 0,
            "closeHour": 0,
            "closeMinute": 0
          }
        ],
        "deleted": false
      }
    ],
    "guestType": "count_only",
    "consentLabel": "string",
    "calendarCoverImage": "https://path-to-image.com",
    "lookBusyConfig": {
      "enabled": true,
      "LookBusyPercentage": 0
    },
    "id": "0TkCdp9PfvLeWKYRRvIz"
  }
}
Previous
Get Free Slots
Next
Get Calendar
Built with