# Get all Shift Schedules by Employee Retrieve all ShiftSchedules for a given Employee, identified by their business id. Endpoint: GET /employee/{business_id}/shift-schedule Version: 1.27.2 Security: clientCredentials ## Path parameters: - `business_id` (string, required) The business id of the Employee to retrieve ShiftSchedules for. ## Response 200 fields (application/json): - `id` (string) The unique ShiftSchedule ID, generated by the application upon creation. Example: "f22896d0-ed42-4a14-a935-7a29072bc5ac" - `name` (string) An optional name for this ShiftSchedule. Example: "Standard 38H" - `start` (object, required) The start date and start week number of this shift schedule - `start.start_date` (string, required) The calendar day at which this schedule starts. Example: "2014-08-16" - `start.start_week` (integer, required) The one-based index of the template at which this schedule starts. This allows you to offset the week from which the application start extrapolating the potential availability of an Employee. This can be useful for instances where an Employee has a multi-week schedule but you want the even and uneven weeks to line up with the weeks of the year. The index should always be within the bounds of the schedule's template indices. Example: 1 - `templates` (array, required) List of non-null objects describing one calendar week (MON-SUN) worth of shifts. - `templates.index` (integer, required) One-based index that determines the order in the schedule. Indices should be consecutive within a ShiftSchedule, without gaps. Setting up a schedule with a recurring week off can be achieved by providing an empty shift-array within the corresponding week's template. - `templates.shifts` (array, required) List of non-null shifts in this calendar week. The list can remain empty to represent a recurring week off. Shifts should not overlap within one template, but can also not overlap with the adjoining shift of other templates. The last shift within a template will be validated against the first shift of the next template. When this template is the last template of the schedule the application will roll over to the first template of the schedule for validating the non-overlapping constraint. This also means a single-week schedule should not have any overlap between the last and first shift of the schedule. - `templates.shifts.start` (object, required) The start range for this specific shift. - `templates.shifts.start.earliest` (object, required) Specifies a time on a specified day of the week. - `templates.shifts.start.earliest.time` (string, required) Specify a time, formatted as hh:mm. Supports 00:00-23:59 inclusive. - `templates.shifts.start.earliest.day` (string, required) Specifies a day of the week, must match the exhaustive set of values. Enum: "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" - `templates.shifts.start.window` (string) Duration from the earliest start until the latest start, formatted as an ISO-8601 compliant Duration string. If provided, it must be positive. Example: "PT3H" - `templates.shifts.stop` (object) Optional constraints on when this shift should finish. - `templates.shifts.stop.latest` (object) An (optional) latest stop. This can be useful for defining schedules with a lenient start window, but where the Employee has a hard stop at a certain time. The latest stop must be within the (calculated) bounds of this Shift's end. These bounds are defined as follows: * earliest stop: If duration.at_least is: * provided: start.earliest + duration.at_least * not provided: start.earliest + duration.at_most * latest stop: start.earliest + (optional) start.window + duration.at_most - `templates.shifts.duration` (object, required) The limits of the duration of this shift. - `templates.shifts.duration.at_least` (string) The minimal duration of a shift. Must be an ISO-8601 compliant Duration string. If provided, it must be strictly positive and greater than or equal to start.window. Example: "PT8H" - `templates.shifts.duration.at_most` (string, required) The maximum duration of a shift. Must be an ISO-8601 compliant Duration string. Must be: * strictly positive, * greater than or equal to start.window * greater than or equal to at_least if it is provided. * lower than P7D (7 days). Example: "PT12H" - `templates.shifts.mandatory` (boolean) Indicates whether the resulting combination is required to be used when planned. Example: true - `templates.shifts.start_location` (object) By default, each Shift will start on the start_location defined on the Employee. By specifying this start_location, this Employee will start this Shift on this start_location. Either a home_base or a address must be provided. - `templates.shifts.start_location.address` (object) An ad-hoc location from which this Employee will start this specific work Shift. This overrides the ad-hoc start_location or home base on the Employee. When using an ad-hoc location, the Employee will only be assigned to TransportResources with a matching start_location (name-based match). Either address information or geo point must be provided. Resolved address information will be read only and be filled out after resolving. An ad-hoc start_location is mutually exclusive with providing a home_base or setting at_last_end, but neither are mandatory for a Shift. - `templates.shifts.start_location.address.name` (string, required) A name by which to identify this location. If used as a start_location, this is used for matching colocated entities. Example: "Conundra" - `templates.shifts.start_location.address.address_line` (string) The address line of this location's address. Can contain street, house number, bus and more. Example: "Voordries 41b" - `templates.shifts.start_location.address.city` (string) The name of the locality of this location. Required when no geo_point is provided. Example: "Oosterzele" - `templates.shifts.start_location.address.zip_code` (string) The ZIP code of the locality of this location. Required when no geo_point is provided. Example: "9860" - `templates.shifts.start_location.address.country_code` (string) The ISO3166-1 alpha-2 two letter country code for this location. Required when no geo_point is provided. - `templates.shifts.start_location.address.geo_point` (object) - `templates.shifts.start_location.address.geo_point.latitude` (number, required) Example: 50.9514048 - `templates.shifts.start_location.address.geo_point.longitude` (number, required) Example: 3.8067878 - `templates.shifts.start_location.address.geo_point.resolved` (object) Indicates whether the address is resolved. - `templates.shifts.start_location.address.geo_point.resolved.geocoded` (boolean) Example: true - `templates.shifts.start_location.address.geo_point.resolved.address` (string) Example: "Voordries 31 bus B, 9860 Oosterzele" - `templates.shifts.start_location.address.geo_point.resolved.precision` (integer) Example: 9 - `templates.shifts.start_location.home_base` (object) The business_id of a known HomeBase in the system. This represents the location from which this Employee will start this Shift, unless otherwise specified on more specific entities. When located at a HomeBase, the Employee will only be assigned to TransportResources with a matching home_base. This is conceptually the same as using an ad-hoc address but with centralized address management which automatically propagates changes on the root entity. A home_base is mutually exclusive with providing an address or setting at_last_end, but neither are mandatory for an Shift. - `templates.shifts.start_location.home_base.business_id` (string, required) The unique identifier of a HomeBase. Example: "depot-1" - `templates.shifts.start_location.at_last_end` (boolean) When this is set to true, the planning will use the end location of the preceding deployed ResourceCombination as the starting point for this shift. This is mutually exclusive with providing an address or a home_base, but neither are mandatory for an Shift. - `templates.shifts.end_location` (object) [EXPERIMENTAL] Property to define an endLocation. When left blank, the Employee will make a round-trip and the endLocation will match the startLocation. Only one option is allowed, either address, home_base or at_last_activity can be set. - `templates.shifts.end_location.address` (object) An ad-hoc address where this Employee will end during this specific Availability. Either address information or geo point must be provided. Resolved address information will be read-only and be filled out after resolving. - `templates.shifts.end_location.home_base` (object) The business_id of a know HomeBase where this Employee will end during this specific Availability. - `templates.shifts.end_location.at_last_activity` (boolean) The optimization will determine the best (eg: most cost-effective) location. This location will always be an Order's location. This option can only be honored for plannings that do a PickupDelivery optimization. When set for other types of plannings, the optimization will result in a round trip. - `templates.shifts.contractual_work_time` (string) The duration an employee is contractually expected to work during this shift. This value is used to determine whether the employee worked more or less than expected based on their contract. Note that only the at_least and at_most durations for the current shift influence the work time that will be planned for this shift. If this field is provided, it must be specified for each shift within the shift schedule. Additionally, acceptable_additional_work_time must be defined for each calender week. The value must be a zero or positive ISO 8601-compliant duration. [EXPERIMENTAL] Example: "PT8H" - `templates.acceptable_additional_work_time` (string) The additional time an employee is willing to work, if needed, beyond their contractual hours during the current calendar week. This value is used to determine whether the employee’s actual work time exceeds what they are willing to work — defined as the sum of their contractual work time and this additional work time. If this field is provided, contractual_work_time must also be specified for each shift in the calendar week. The value must be a strictly positive ISO 8601-compliant duration. [EXPERIMENTAL] Example: "PT4H" - `version` (integer) The version of the shift schedule. Present when the shift schedule is returned in a list in a response. ## Response 404 fields (application/problem+json): - `title` (string) A short, summary of the problem. Example: "Validation exception" - `detail` (string) A detailed explanation specific to this problem. Example: "The field contains invalid business formatting." ## Response 401 fields