POST api/Records/Others
Add a new Other/Service record
Request Information
URI Parameters
None.
Body Parameters
OtherRecordNew| Name | Description | Type | Additional information |
|---|---|---|---|
| Description |
The description of the service |
string |
Required Max length: 2500 |
| Date |
The date when this service was performed |
date |
Required |
| Cost |
The total cost of the service |
decimal number |
Required |
| Currency |
The currency code. |
string |
None. |
| Allocation |
Where this record should be allocated |
AllocationEntity |
Required |
| Account |
If empty, the ManWinWin predefined Account will be used |
string |
None. |
| CostDocument |
This maybe required, depending on ManWinWin preferences |
string |
None. |
| Supplier |
The Supplier of the Cost Document |
string |
None. |
Request Formats
Sample:
{
"Description": "Install a new filter",
"Date": "2017-09-23T17:55:00",
"Cost": 155.9,
"Allocation": {
"Type": "WorkOrder",
"Code": "000133"
},
"Account": "03",
"CostDocument": "F-1234"
}
Sample:
<OtherRecordNew xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Apontamentos">
<Account>03</Account>
<Allocation xmlns:d2p1="http://schemas.datacontract.org/2004/07/WebAPI.Models">
<d2p1:Code>000133</d2p1:Code>
<d2p1:Type>WorkOrder</d2p1:Type>
</Allocation>
<Cost>155.9</Cost>
<CostDocument>F-1234</CostDocument>
<Currency i:nil="true" />
<Date>2017-09-23T17:55:00</Date>
<Description>Install a new filter</Description>
<Supplier i:nil="true" />
</OtherRecordNew>
Sample:
Sample not available.
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Description" Install a new filter --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Date" 2017-09-23T17:55:00.0000000 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Cost" 155.9 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Allocation.Type" WorkOrder --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Allocation.Code" 000133 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="Account" 03 --MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="CostDocument" F-1234 --MultipartDataMediaFormatterBoundary1q2w3e--
Response Information
Resource Description
Returns the ID of the Other record; Status code: 201 (Created)
integerResponse Formats
Sample:
1
Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e Content-Disposition: form-data; name="" 1 --MultipartDataMediaFormatterBoundary1q2w3e--