PUT /calendars
Description
Updates data on a calendar (event type)
The route handles the PUT request made to the /calendars/{id}
path.
HTTP method | Route | Query parameters |
---|---|---|
PUT | /calendars | id |
Query parameters
The next parameter is sent in the request line:
Name | Type | Description |
---|---|---|
id | number | Required. The ID of the calendar to be updated. |
Payload
The server needs to receive a json object with the next properties (both unchanged and modified properties are expected):
Name | Type | Description |
---|---|---|
label | string | Required. The name of the calendar to be updated. |
description | string | Optional. Calendar description. |
color | object | Required. An object with the style parameters applied to the events of the calendar: background - (optional) a HEX code of the event background color related to the current calendar, border - (optional) a HEX code of the event border color related to the current calendar, textColor - (optional) a HEX code of the event text color related to the current calendar. |
Example:
{
"label": "My Calendar",
"description": "Updated",
"color": {
"background": "#5890DC",
"border": "#2D74D3"
}
}
Response
No data is returned back. The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).
Related articles: Working with server