Skip to main content
Skip table of contents

Get Calendar By ID

Overview

GET /rest/calendar/{calendarId}

This endpoint is used to retrieve the details of the calendar with the specified ID.

Required Permissions

  • Users can retrieve the details of the calendar with the specified ID.

Request

XML
GET <service_url>/rest/calendar/{calendarId}

Parameters

Parameter

Type

Description

Required

calendarId

String

The ID of the calendar you want to retrieve.

Yes

Example Requests

CODE
GET https://tis.obss.io/rest/calendar/3

Response

Response Structure

CODE
{
  "id": Integer, // The unique identifier of the calendar
  "name": String, // The name of the calendar
  "clientKey": String, // The client key associated with the calendar
  "isDefault": Boolean, // Indicates if this is the default calendar
  "is7x24Calendar": Boolean, // Indicates if the calendar operates 24/7
  "allWorkingDaysHaveEqualLengths": Boolean, // Indicates if all working days have equal lengths
  "calendarSuccessfullyLoaded": Boolean, // Indicates if the calendar was successfully loaded
  "dailyWorkingHours": Double, // The number of working hours per day
  "timeZone": String, // The time zone of the calendar
  "workingTimes": [
    {
      "weekday": String, // The day of the week
      "start": Long, // The start time in milliseconds
      "end": Long // The end time in milliseconds
    }
  ],
  "holidays": [
    {
      "name": String, // The name of the holiday
      "date": String, // The date of the holiday
      "recurring": Boolean // Indicates if the holiday is recurring
    }
  ]
}

Example Response Body

JSON
{
  "clientKey": "ffa2107c-c816-3aa3-985a-0163faa27103",
  "id": 2,
  "isDefault": false,
  "name": "Calendar 1",
  "timeZone": "Europe/Istanbul",
  "workingTimes": [
    {
      "weekday": "MONDAY",
      "start": 28800000,
      "end": 61200000
    },
    {
      "weekday": "MONDAY",
      "start": 75600000,
      "end": 82800000
    }
  ],
  "holidays": [
    {
      "name": "Holiday 1",
      "date": "2025-04-28",
      "recurring": true
    }
  ],
  "is7x24Calendar": false,
  "allWorkingDaysHaveEqualLengths": true,
  "calendarSuccessfullyLoaded": true,
  "dailyWorkingHours": 11.0
}

Response Codes

  • 200 OK: Returns the details of the calendar with the specified ID.

  • 400 Bad Request: If the request parameter is invalid.

  • 404 Not Found: If the requested calendar does not exist.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.