Materialise this schedule's occurrences up to a date
POST/ministries/schedules/:scheduleId/generate
Idempotent. Attaches one occurrence to each active event the schedule follows (by type, class, ministry or the one event) inside the window, from today up to the scheduling horizon (D31; a Staff this event schedule is not capped by it). No calendar event is ever created or changed. requirements[].defaults (D32, D35) is saved on the schedule's staffing needs first — per position, the whole list in the order they are assigned, an empty list clearing it, a position left out keeping its own; the counts are not changed — and then every saved default is assigned, in that order, on the occurrences THIS run creates (never on ones an earlier run made), while its person holds an active qualification; with accepted=true they are recorded as having accepted and are not asked to respond. Without requirements the saved ones are assigned unchanged. The old defaults key is refused (400).
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
OK
Malformed date, the run would exceed the occurrence cap, the old defaults key, a position this schedule's staffing needs do not ask for, a person named twice, or more defaults than the position's Max
Not authenticated
Not authorized for this schedule, a new default is not qualified, or V2 is not enabled
No such schedule, or a default names an unknown person
The schedule is inactive: reactivate it first
Can't find what you need? Ask in Discord, or open an issue on the ChurchCRM repository.