Update a race, cycle, note or questionnaire
update_planned_eventChange a planned competition, cycle, note or questionnaire. Only the fields you pass change. A change cannot be undone: say what will change and get the go-ahead first.
id: its pcmp_…, pcyc_…, pnot_… or pqz_… handle from get_calendar(mode='planned').
Name whose calendar carries it: athlete for a managed athlete's event, group for a group's
event, neither for your own. The questions of a questionnaire cannot be changed here, and a
questionnaire already answered cannot be changed at all.
To change a description that is already set, send description_html: read the event first with
get_calendar(mode='planned', with_description_html=true) over its date, edit only what must
change, keep every other tag, and send the whole HTML back. Plain text description is refused
there, because it would erase the coach's formatting.
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 |
|---|---|---|---|
| id | Yes | ||
| 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 | ||
| date_start | No | ||
| hour_start | No | ||
| description | No | ||
| distance_km | No | ||
| description_html | No | ||
| duration_minutes | No | ||
| elevation_gain_m | No | ||
| elevation_loss_m | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||