Page 1 of 1

multiple job schedules

Posted: Fri Sep 01, 2023 2:26 pm
by Dimitry
Hello there,

I'd like to clarify one thing. We need to create 2 or more schedules for one job.
E.g. 8-9 and 9-10 and 2 separate time periods but we get error saying: A schedule for this job on this date already exists. Refer to schedule XXXX.
Is it possible to find a workaround in this case? or is it a bug?

Re: multiple job schedules

Posted: Sun Sep 03, 2023 10:22 pm
by Sindre
Hi Dimitry,
One employee can only have one schedule on a job per day. But you can make multiple blocks with different times on the same schedule to separate time periods.

Regards

Re: multiple job schedules

Posted: Tue Sep 05, 2023 8:50 am
by Dimitry
Could you give me an example with API calls?

Is it schedule eg from 8-11 and then it has 2 time periods 8-9 and 9-11?

Re: multiple job schedules

Posted: Wed Sep 06, 2023 12:48 am
by Sindre
Hi,
Yes, it would be one schedule with two blocks. If you open it in Simpro you would see two timeblocks on the schedule for that employee.

Using the schedules endpoint you can use PATCH to update and add timeblocks for the same employee on the same day and job.

Code: Select all

/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/schedules/{scheduleID}
Something like this:

Code: Select all

{
  "Blocks": [
    {
      "StartTime": "08:00",
      "EndTime": "09:00",
      "ScheduleRate": 0
    },
      {
      "StartTime": "12:00",
      "EndTime": "13:00",
      "ScheduleRate": 0
    }
  ]
}
Regards