POST ./calendars/event

Need subscription flag (for student/parent): FLAG_CAL_MEMENTO

Add new event and create recurrence sessions by selected options.

The parameter dateType can have the following values:

  • 1 - hourly (only parameter dataStart is mandatory)
  • 2 - all day

The parameter recurrenceType can have the following values:

  • 1 - daily
  • 2 - weekly
  • 3 - monthly

The parameter day it depends on recurrenceType:

  • 1 (daily) - not used
  • 2 (weekly) - Can be from 1 to 7 (1-Monday, 2-Tuesday, etc)
  • 3 (monthly) - Can be form 1 to 32 (1-31 day of the month, 32-special number for the last day of the month)

POST parameters

NameValue TypeValidationDetails
namestringRequiredmin_length[3]; Event name.
descriptionstringOptionalEvent description.
stylestringRequiredSelect one values from the predefined list with styles (ex: event-style2).
dateTypeintRequiredvalues[1,2]; Select hourly or all day option.
recurrenceTypeintOptionalvalues[1,2,3];Used for recurrence to create many sessions.
dayintOptionalless_than_equal_to[7] / less_than_equal_to[32]; Depends on recurrenceType
startDatestringRequiredrfc_date; We starting from this date.
endDatestringRequiredrfc_date; The end date.
startHourstringRequiredStart hour (H:i). Not required when dateType = 2 (all day).
endHourstringRequiredEnd hour (H:i). Not required when dateType = 2 (all day).

Validation

Error FieldError CodeError Message
startDate, endDate102The date in invalid.
startDate103The date is past OR invalid.
endDate104The end date must be higher than start date.
startHour, endHour105The hour format is invalid.
endHour106The end hour must higher than start hour.

Output example

{
"ceID": 12
}