SetExceptions

[POST] .../v1/workschedule/setexceptions

Fully replaces schedule exceptions by date Use this method after creating a schedule or when replacing all date-specific exceptions such as holidays or shortened days. The method validates schedule_id and every supplied exception, checks work schedule edit permission 691, marks old exceptions deleted, inserts the supplied list, writes an action log record, invalidates WorkTime cache and returns row_affected with the schedule id. The request body is required, exceptions may be null or empty to clear existing exceptions, dates must use account date format and working-day exceptions must include valid start_minute and end_minute values. Missing body, invalid schedule_id, invalid date or minutes, missing schedule, denied permission and database errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
exceptions Array of WorkScheduleExceptionSet Optional New exception list.
schedule_id Int64 Required Schedule ID.

Request Example

{
  "schedule_id": 14,
  "exceptions": [
    {
      "date": "2026-03-08",
      "is_working_day": false,
      "start_minute": null,
      "end_minute": null,
      "comment": "Public holiday"
    },
    {
      "date": "2026-03-14",
      "is_working_day": true,
      "start_minute": 600,
      "end_minute": 900,
      "comment": "Short working day"
    }
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1,
    "ids": [
      14
    ]
  }
}