Define or wholesale-revise a site's CPT schedule
PUT/sites/:siteId/cpt-schedule
There is no separate create/revise endpoint: every PUT replaces the schedule's timezone and cutoffs in full (ADR 0010) — a CPTSchedule has no partial-update semantics. Invariants: at least one cutoff; cptIds unique within the schedule; every cutoff's eligiblePathIds entry must reference an Active ProcessPath in this service's own store (the one cross-aggregate check, enforced at write time). A no-op revision (identical timezone and cutoffs) is a successful 200 that does NOT republish CPTScheduleChanged.
Request
Responses
- 200
- 400
- 404
- 409
- 422
- 500
Schedule defined or revised
The request body is missing, not valid JSON, or contains a NUL character U+0000 (malformed-request-body).
No route matches this request path (e.g. an empty siteId path segment).
concurrent-modification: another request committed a change to this site's schedule between the caller's load and this write (optimistic concurrency, ADR 0017). Reload the schedule and re-apply the change against the current state.
timezone is empty/not a recognized IANA zone, cutoffs is empty, a cptId is empty/duplicate, a localTime is empty/malformed, daysOfWeek is empty/invalid, shipMethod is empty, eligiblePathIds is empty, or an eligiblePathIds entry does not reference an Active process path in this service's own store.
An unexpected error (problem type internal-error): a storage or other infrastructure failure, or a recovered panic. On POST /process-paths a 5xx is never stored under the Idempotency-Key, so a retry with the same key runs again.