POST api/{database}/Timesheet
Creates a new Timesheet with the specified values
Request Information
Parameters
Name | Description | Additional information |
---|---|---|
value | The Timesheet with the updated values. |
Define this parameter in the request body. |
$expand | TimesheetLines |
Define this parameter in the request URI. |
Request body formats
application/json, text/json
Sample:
{ "messages": [], "canChange": true, "cannotChangeReason": "sample string 2", "employeeId": "sample string 3", "isValidForApproval": true, "minimumTotalHours": 5.0, "timesheetLines": null, "totalHours": 6.0, "userMayApproveTimesheet": true, "weekNumber": 8, "yearNumber": 9 }
application/xml, text/xml
Sample:
<Timesheet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.BL.Hours.Edit"> <CanChange>true</CanChange> <CannotChangeReason>sample string 2</CannotChangeReason> <EmployeeId>sample string 3</EmployeeId> <IsValidForApproval>true</IsValidForApproval> <Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.Web.WebApi.Core.Models" /> <MinimumTotalHours>5</MinimumTotalHours> <TimesheetLines xmlns:d2p1="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.BL.Hours.Lists" i:nil="true" /> <TotalHours>6</TotalHours> <UserMayApproveTimesheet>true</UserMayApproveTimesheet> <WeekNumber>8</WeekNumber> <YearNumber>9</YearNumber> </Timesheet>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Response body formats
application/json, text/json
Sample:
{ "messages": [], "canChange": true, "cannotChangeReason": "sample string 2", "employeeId": "sample string 3", "isValidForApproval": true, "minimumTotalHours": 5.0, "timesheetLines": null, "totalHours": 6.0, "userMayApproveTimesheet": true, "weekNumber": 8, "yearNumber": 9 }
application/xml, text/xml
Sample:
<Timesheet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.BL.Hours.Edit"> <CanChange>true</CanChange> <CannotChangeReason>sample string 2</CannotChangeReason> <EmployeeId>sample string 3</EmployeeId> <IsValidForApproval>true</IsValidForApproval> <Messages xmlns:d2p1="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.Web.WebApi.Core.Models" /> <MinimumTotalHours>5</MinimumTotalHours> <TimesheetLines xmlns:d2p1="http://schemas.datacontract.org/2004/07/UNIT4.Multivers.API.BL.Hours.Lists" i:nil="true" /> <TotalHours>6</TotalHours> <UserMayApproveTimesheet>true</UserMayApproveTimesheet> <WeekNumber>8</WeekNumber> <YearNumber>9</YearNumber> </Timesheet>