PUT api/Records/ManHours
Add a new Man-Hour record
Request Information
URI Parameters
None.
Body Parameters
ManHoursRecordNewName | Description | Type | Additional information |
---|---|---|---|
Employee |
The employee code |
string |
Required |
Date |
Start date and time |
date |
Required |
Hours |
The duration/time span of the work |
decimal number |
Required Range: inclusive between 0.01667 and 23.9999 |
HourlyCost |
Cost per hour. |
decimal number |
Equal or above: 0 |
Currency |
The currency code. |
string |
None. |
Factor |
Factor to be applied to the HourlyCost, ie: a factor of 10 is an increase in 10% |
decimal number |
Equal or above: 0 |
Allocation |
Where this record should be allocated |
AllocationEntity |
Required |
Account |
If empty, the employee predefined Account will be used or else the ManWinWin predefined Account will be used |
string |
None. |
CostDocument |
This maybe required, depending on ManWinWin preferences |
string |
None. |
Request Formats
{ "Employee": "DEMO", "Date": "2017-09-23T17:55:00", "Hours": 3.5, "HourlyCost": 25.5, "Factor": 0.0, "Allocation": { "Type": "WorkOrder", "Code": "000133" } }
<ManHoursRecordNew xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Apontamentos"> <Account i:nil="true" /> <Allocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/WebAPI.Models"> <d2p1:Code>000133</d2p1:Code> <d2p1:Type>WorkOrder</d2p1:Type> </Allocation> <CostDocument i:nil="true" /> <Currency i:nil="true" /> <Date>2017-09-23T17:55:00</Date> <Employee>DEMO</Employee> <Factor>0</Factor> <HourlyCost>25.5</HourlyCost> <Hours>3.5</Hours> </ManHoursRecordNew>
Sample not available.
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Employee" DEMO --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Date" 2017-09-23T17:55:00.0000000 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Hours" 3.5 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="HourlyCost" 25.5 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Factor" 0 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Allocation.Type" WorkOrder --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Allocation.Code" 000133 --MultipartDataMediaFormatterBoundary1q2w3e--
Response Information
Resource Description
Returns the ID of the Man-Hour record; Status code: 201 (Created)
integerResponse Formats
1
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="" 1 --MultipartDataMediaFormatterBoundary1q2w3e--