Plan a race, cycle, note or questionnaire
create_planned_eventPlan a competition, a cycle, a note or a questionnaire on a planned calendar. Planned workouts go through create_planned_training instead.
Audience: athlete (one managed athlete's usr_… handle) or group (a grp_… you manage, one
event the whole group sees), never both; neither plans it on your own calendar.
name is required, except for a questionnaire planned from a template (it takes the
template's name). Undo a creation with delete_event on the returned id.
Fields by type (any other field is refused):
competition (a race, the A-race being the main objective):
sport(spt_… from list_sports, required),goal_type('a' main goal, 'b' secondary),event(the race name),time(HH:MM) ormoment(morning, noon, afternoon, evening),duration_minutes,distance_km,elevation_gain_m,elevation_loss_m,rpe(0-10),color.cycle (a training block shown as a banner):
date_end(YYYY-MM-DD, required on creation, on or afterdate_start),color. One cycle per period per athlete: an overlap is refused.note (a marker on one day, or over a period with
date_end):date_end(YYYY-MM-DD, on or afterdate_start, omitted = one day),note_type(rest, availability, unavailability, goal, menstruation),hour_start,hour_end(HH:MM),color.quiz (a questionnaire the athlete answers that day):
hour_start(HH:MM, when it is sent, required for a group), and on creation exactly one ofquiz_template(qzf_… from list_quiz_templates) orquestions. Each question: {"question", "type", "is_mandatory", "choices", "unit", "metric"}; type is short_text, long_text, boolean, number (unit: kg, km, bpm, W… or a short free text), datetime (has_date, has_time), unique_choice (choices {"choices": [...]}, 2 or more), multiple_choices, range (choices {"start": 0 or 1, "advanced_captions": false, "captions": [...]}), metric_number or metric_range (metric: mti_… from list_metrics). Never an empty questionnaire. Every type takesname,date_start(YYYY-MM-DD) anddescription(plain text, accepted only while the event has no description).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rpe | No | ||
| name | No | ||
| time | No | ||
| type | Yes | ||
| color | No | ||
| event | No | ||
| group | No | ||
| sport | No | ||
| moment | No | ||
| athlete | No | ||
| date_end | No | ||
| hour_end | No | ||
| goal_type | No | ||
| note_type | No | ||
| questions | No | ||
| date_start | Yes | ||
| hour_start | No | ||
| description | No | ||
| distance_km | No | ||
| quiz_template | No | ||
| duration_minutes | No | ||
| elevation_gain_m | No | ||
| elevation_loss_m | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||