Create a schedule (irrigation turn)
/irrigation/schedules ⚠️ A schedule MATERIALIZES real occurrences in the log (90-day horizon), and confirmationPolicy: "auto" flips them to done on their own with verifiedAt at null. Creating a schedule therefore declares water nobody will have witnessed: pass "manual" to avoid that. EXCLUSIVE target — a probe OR a parcel, never both.
Headers
-
Idempotency-KeystringReplays the same 2xx response (24 h)
Request body
-
targetModuleIdintegerProbe target. Exclusive with
targetParcelId. -
targetParcelIdintegerParcel target. Exclusive with
targetModuleId. -
labelstring -
freqstring required -
intervalDaysintegerIn
dailymode: every N days. Default 1. -
weekdaysarray of integerIn
weeklymode: 1 = Monday … 7 = Sunday. At least one. -
startTimesarray of string requiredLOCAL times (
HH:MM), deduplicated and sorted. -
timezonestring requiredIANA time zone. Mandatory, and never UTC — otherwise the time drifts at the daylight-saving switch.
-
startsOnstring date required -
endsOnstring date -
confirmationPolicystring -
isActiveboolean -
inputModestring requiredHow the application is declared.
durationrequires NO configuration (it is the universal fallback mode) but only yields a dose once the flow rate is known;depth_mmis taken as is;volume_m3requires the irrigated area. -
durationMinintegerDuration in minutes. Alternative to
endedAt— only one of the two is stored. -
inputDepthMmnumberDepth of water in mm. Required in
depth_mmmode, and then taken as is. -
inputVolumeM3numberVolume in m³. Required in
volume_m3mode.
Response
Schedule created, upcoming occurrences already produced
-
idinteger -
targetParcelIdinteger nullable -
targetModuleIdinteger nullable -
labelstring nullable -
freqstring -
intervalDaysinteger nullableIn
dailymode: every N days (1–365).nullinweeklymode. -
weekdaysarray of integer nullableIn
weeklymode: the days kept, 1 = Monday … 7 = Sunday.nullor empty indailymode. -
startTimesarray of stringLOCAL start times (
HH:MM), 1 to 12 of them. An array, not a single value: automatic irrigation commonly runs morning AND evening. -
timezonestringIANA time zone, mandatory and never UTC: 06:00 must stay 06:00 for the customer on either side of the daylight-saving switch.
-
inputModestringHow the application is declared.
durationrequires NO configuration (it is the universal fallback mode) but only yields a dose once the flow rate is known;depth_mmis taken as is;volume_m3requires the irrigated area. -
durationMininteger nullable -
inputDepthMmnumber nullable -
inputVolumeM3number nullable -
startsOnstring date -
endsOnstring date nullable -
confirmationPolicystringauto(default): past occurrences flip todoneon their own, withverifiedAtatnull— so “the schedule says it was watered” stays distinct from “somebody checked”.manual: they stayplanneduntil confirmed. -
isActiveboolean -
materializedUntilstring date-time nullableHow far ahead occurrences have been produced.
Errors
- 400
Entry refused
INVALID_INPUT_MODEINVALID_DURATIONINVALID_ENDED_ATENDED_BEFORE_STARTEDINVALID_DEPTHINVALID_VOLUMEMISSING_DURATIONMISSING_DEPTHMISSING_VOLUMEINVALID_TARGETINVALID_FREQINVALID_INTERVALINVALID_WEEKDAYSINVALID_START_TIMESINVALID_TIMEZONEINVALID_STARTS_ONINVALID_ENDS_ONINVALID_CONFIRMATION_POLICYMODULE_NOT_OWNED - 401
Not authenticated
- 403
Insufficient scope/role, or outside your company
- 404
Target parcel not found
PARCEL_NOT_FOUND