v1

latestOpenAPI 3.1.02026-07-2422707.0 MB

Retrieve the schedules of employees of a center

This API helps you to retrieve the schedules of employees of the specified center. You must provide the unique identifier of the center as center_id. You must also specify the appropriate start_date and end_date values for which you want to view the schedules of employees.

Note: To run this request, you must enable the Schedule role permission. This allows the user to access the employee's schedule. Navigate to the organization-level, Security Roles > employee role > Permissions > Employee Manager > Other Settings > Schedule.

get/v1/centers/{center_id}/employee_schedules?start_date={start_date}&end_date={end_date}&schedule_status={schedule_status}&employee_id={employee_id}&job_id={job_id}&consider_schedule_time={consider_schedule_time}

Path parameters

center_idstring required

Mandatory Unique 32-character identifier of the center.

Query parameters

start_datestring date required

Mandatory Start date from which the schedules of employees of the specified center will be displayed.

end_datestring date required

Mandatory End date until which the schedules of employees of the specified center will be displayed.

schedule_statusinteger

Optional The schedule status of the employee: All = -2, NotScheduled = -1, Working = 0, and the specific code for the respective custom leave.

employee_idstring

Optional Unique 32-character identifier of the employee of the specified center.

job_idstring

Optional Unique 32-character identifier of the employee's assigned job details.

consider_schedule_timeboolean

Optional If true, the API considers the time stamp for the specified date range to filter the response data. If false, the API considers only the date values to filter the employee schedules.

Response

200

{"stackTrail":"paths:/v1/centers/{center_id}/employee_schedules?start_date={start_date}&end_date={end_date}&schedule_status={schedule_status}&employee_id={employee_id}&job_id={job_id}&consider_schedule_time={consider_schedule_time}:get:responses:200:content:application/json:schema:properties:error","oasType":"schema","type":"unknown"}

Example response

{
  "employee_schedules": [
    {
      "employee_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de6",
      "employee_name": "Alyssum Therapist_Owner",
      "schedules": [
        {
          "date": "2021-03-13T00:00:00",
          "shifts": [
            {
              "schedule_id": "e75b7925-de77-4ec0-847b-c4718abe7996",
              "start_time": "2021-03-12T03:00:00",
              "end_time": "2021-03-12T23:55:00"
            }
          ]
        }
      ]
    }
  ]
}