# PutWorkingHoursByWorkingHoursId
Edit the working hours
__Activity name :__ PutWorkingHoursByWorkingHoursId
Create a new working hours record for an employment
Please note that so-called chain validation exists for working hours records. In other words, the time periods of records for an employment cannot overlap with each other.
A new or changed startDate affects the endDate of its preceding record.
When PUT-ing a new record, the startDate must be greater then the preceding record's startDate.
__Metadata :__ Possible options for fields of the type 'metadata' can be acquired (GET) by adding `/metadata` to the PUT URL.
Select loket.nl (REST) API URL: /providers/employers/employees/employments/workinghours/{workinghoursId}
Insert loket.nl (REST) API URL: /providers/employers/employees/employments/workinghours/{workinghoursId}
Update loket.nl (REST) API URL: /providers/employers/employees/employments/workinghours/{workinghoursId}
Delete loket.nl (REST) API URL: /providers/employers/employees/employments/workinghours/{workinghoursId}
Select loket.nl (REST) API Operation: put /providers/employers/employees/employments/workinghours/{workinghoursId}
- Catalog: `LoketNlRest`
- Schema: `WorkingHours`
- Field Selection Method: NotRequired
- Base Path: `content`
This is a read-only table function. The loket.nl (REST) API may not support changing the data or the Invantive SQL driver for loket.nl (REST) does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the loket.nl (REST) API.
## Parameters of Table Function
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `body` | `string` | ☑ | | Working hours to edit. |
| `If-Match` | `string` | ☐ | | Input the value acquired in the ETag header for concurrency control. Please note this is optional (and not recommended for most types of integrations). |
| `workinghoursId` | `guid` | ☑ | | The unique identifier of the work detail |
## Columns of Table Function
The columns of the table function `PutWorkingHoursByWorkingHoursId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `aggregatedHoursPerWeek` | `double` | | ☐ | This read-only field provides the user with a single point of knowledge as to what number of hours per week employment is actually registered in regards to the payrolling process. This number may be respectively based on the workpattern, deviating hours per week or shift hours. If the employment is an 'on call employment' (oproepkracht/invalkracht) the number is either NULL or represents the min-hours if that is applicable. This field is especially useful for third-parties that want to know the number of hours per week (without having to apply specific Loket logic). I.e. this field is not visible in Loket GUI. |
| `averageHoursPerWeek` | `double` | | ☐ | This field can be used to register the average hours per week an employment with varying hours works. For example, 0 hour contracts and min max contracts. The value of this field does NOT directly affect the payrolling proces. |
| `averageParttimeFactor` | `double` | | ☐ | This field is used to register the deviating value of the parttimefactor, purely for administrative purposes. The parttimefactor is normally calculated by workinghours dividing by shifthours multplied by 100. Please note that this field is not used in the actual payroll proces! For the payroll process the number of hours is used. |
| `calculateUsingWorkPattern_daysDailyRate` | `boolean` | | ☐ | Indicates whether the number of days of dailyrate should be calculated based on the workpattern. The number of days are normally calculated by the working hours. |
| `calculateUsingWorkPattern_deviatingDaysAndHours` | `boolean` | | ☐ | Indication whether the deviating hours per week and deviating SV-days per period are to be automatically calculated based on the workpattern. Please note (!) that any values in the deviatingHoursPerWeek and deviatingSvDaysPerPeriod fields (of this workingHours record) will be overwritten based on this calculation if true (and endDate=NULL)! |
| `calculateUsingWorkPattern_hoursBrokenPeriod` | `boolean` | | ☐ | Indicates whether the hours for the payrolling should be calculated based on the workpattern in broken periods. These are periods of in or out of service. |
| `calculateUsingWorkPattern_hoursRegularPeriod` | `boolean` | | ☐ | Indicates whether the hours for the payrolling should be calculated based on the workpattern for regular periods. |
| `calculateUsingWorkPattern_leaveHours` | `boolean` | | ☐ | Indicates whether then leave balances (verlof) are to be calculated based on the workpattern. If set to false and the user is not linked to a leave policy with `applyLeaveSchedule` set to true the following fields are used for the calculation `deviatingHoursPerWeek` if null `shift.fullTimeHoursPerWeek` is used |
| `contractCode_code` | `int32` | | ☐ | |
| `contractCode_description` | `string` | | ☐ | |
| `contractCode_key` | `guid` | | ☐ | The unique identifier of an object (GUID/UUID) |
| `deviatingHoursPerWeek` | `double` | | ☐ | If this field is empty the fulltime hours are based as defined by the shift, this optional field is used to register an overwriting value. The value can be less or more then the fulltime hours a week. |
| `deviatingSvDaysPerPeriod` | `int32` | | ☐ | Sv (social insurance) days are normally calculated by hours per shift, this optional field is used to register a deviating value. |
| `endDate` | `datetime` | | ☐ | The end date of the entity. The date is up to and including. |
| `flexibleHoursContract_key` | `int32` | | ☐ | |
| `flexibleHoursContract_value` | `string(50)` | | ☐ | |
| `id` | `guid` | | ☐ | The unique identifier of an object (GUID/UUID) |
| `regularWorkPattern` | `boolean` | | ☐ | When the employee works the same amount of hours per day every week, then the workpattern is regular. |
| `shift_bonusPercentage` | `decimal` | | ☐ | The bonus percentage used in wage calculations for the hours made in this shift. |
| `shift_fullTimeHoursPerWeek` | `decimal` | | ☐ | The full time hours for an employment that is linked to this shift. |
| `shift_shiftNumber` | `int32` | | ☐ | The number for the shift. |
| `shiftRateSickLeave_bonusPercentage` | `decimal` | | ☐ | The bonus percentage used in wage calculations for the hours made in this shift. |
| `shiftRateSickLeave_fullTimeHoursPerWeek` | `decimal` | | ☐ | The full time hours for an employment that is linked to this shift. |
| `shiftRateSickLeave_shiftNumber` | `int32` | | ☐ | The key number to identify the shift to be used for calculation of daily rate in case of sick leave (ziekte). |
| `startDate` | `datetime` | | ☐ | Start date of the record. A (linked chain)[./#section/Data/Date-chains] is maintained within this resource. |
| `workPattern_evenWeeks_friday` | `double` | | ☐ | |
| `workPattern_evenWeeks_monday` | `double` | | ☐ | |
| `workPattern_evenWeeks_saturday` | `double` | | ☐ | |
| `workPattern_evenWeeks_sunday` | `double` | | ☐ | |
| `workPattern_evenWeeks_thursday` | `double` | | ☐ | |
| `workPattern_evenWeeks_tuesday` | `double` | | ☐ | |
| `workPattern_evenWeeks_wednesday` | `double` | | ☐ | |
| `workPattern_oddWeeks_friday` | `double` | | ☐ | |
| `workPattern_oddWeeks_monday` | `double` | | ☐ | |
| `workPattern_oddWeeks_saturday` | `double` | | ☐ | |
| `workPattern_oddWeeks_sunday` | `double` | | ☐ | |
| `workPattern_oddWeeks_thursday` | `double` | | ☐ | |
| `workPattern_oddWeeks_tuesday` | `double` | | ☐ | |
| `workPattern_oddWeeks_wednesday` | `double` | | ☐ | |