İçeriğe geç
R-Service R-Service
Документация Р-Сервис

Calendars - Calendar Hours API

Bu içerik henüz dilinizde mevcut değil.

List all calendar hours of the calendar with a specific ID:

GET /calendars/:id/calendar_hours
Status: 200 OK
[
{
"id": 4558,
"weekday": "mon",
"time_from": "09:00",
"time_until": "17:00"
}
]

The response contains these fields by default.

Add calendar hours to a calendar with a specific ID.

POST /calendars/:id/calendar_hours

When creating new calendar hours for a calendar these fields are available.

Status: 201 Created
{
"id": 4558,
"weekday": "mon",
"time_from": "09:00",
"time_until": "17:00"
}

Update calendar hours with a specific ID of a calendar with a specific ID.

PATCH /calendars/:id/calendar_hours/:hours_id

When updating existing calendar hours for a calendar these fields are available.

Status: 200 OK
{
"id": 4558,
"weekday": "mon",
"time_from": "09:00",
"time_until": "17:00"
}

Remove calendar hours with a specific ID link from a calendar with a specific ID.

DELETE /calendars/:id/calendar_hours/:hours_id
Status: 204 No Content

Remove all calendar hours from a calendar with a specific ID.

DELETE /calendars/:id/calendar_hours/
Status: 204 No Content

time_from

Required time of day — The time at which the calendar becomes active on the given weekday.

time_until

Required time of day — The time at which the calendar stops being active on the given weekday.

weekday

Required enum — The day of the week. Valid values are:

  • mon : Monday

  • tue : Tuesday

  • wed : Wednesday

  • thu : Thursday

  • fri : Friday

  • sat : Saturday

  • sun : Sunday