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

Create Calendar

POST
https://services.sunnyday.co.id/api/calendars/
Create calendar in a location.

Request

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

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Body

🟠400Bad Request
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://services.sunnyday.co.id/api/calendars/' \
--header 'Version: 2021-04-15' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "isActive": true,
    "locationId": "ocQHyuzHvysMo5N5VsXc",
    "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",
    "calendarType": "round_robin",
    "widgetType": "classic",
    "eventTitle": "{{contact.name}}",
    "eventColor": "#039be5",
    "locationConfigurations": [
        {
            "kind": "custom",
            "location": "string"
        }
    ],
    "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
    }
}'
Response Response Example
200 - Success
{
    "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 Calendars
Next
Get Groups
Built with