POST api/servicechargetype/hardware
This method adds a new hardware record to the Service Charge Type. To use this method, the Contract Module needs to be enabled.
Error Messages
- 401/Unauthorized - Insufficient permissions to view categories
- 404/Not Found - Service Charge Type categorys not found
Request Information
URI Parameters
None.
Body Parameters
HardwareServiceChargeTypePostRequestName | Description | Type | Additional information |
---|---|---|---|
ProductCode | The code for the hardware product | string |
Required String length: inclusive between 0 and 50 |
Description | Unique description used to identify the Hardware product | string |
Required String length: inclusive between 0 and 100 |
DefaultSalePrice | The default sale price of the hardware product | decimal number |
None. |
DefaultCost | The default cost of the hardware product. This can only be set when the View Default Cost permission is enabled | decimal number |
None. |
DefaultBaseLineCost | The default baseline cost of the hardware product. This can only be set when the Default Basline Cost permission is enabled | decimal number |
None. |
Nominal | The associated nominal code | string |
String length: inclusive between 0 and 50 |
DefaultSupplier | The default supplier of the hardware | integer |
None. |
Request Formats
application/json, text/json
Sample:
{ "ProductCode": "sample string 1", "Description": "sample string 2", "DefaultSalePrice": 1.0, "DefaultCost": 1.0, "DefaultBaseLineCost": 1.0, "Nominal": "sample string 3", "DefaultSupplier": 1 }
application/xml, text/xml
Sample:
<HardwareServiceChargeTypePostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.WebAPI.Models.Company"> <DefaultBaseLineCost>1</DefaultBaseLineCost> <DefaultCost>1</DefaultCost> <DefaultSalePrice>1</DefaultSalePrice> <DefaultSupplier>1</DefaultSupplier> <Description i:nil="true" /> <Nominal>sample string 3</Nominal> <ProductCode>sample string 1</ProductCode> <Description>sample string 2</Description> </HardwareServiceChargeTypePostRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ServiceChargePostResponseName | Description | Type | Additional information |
---|---|---|---|
Id | integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "Id": 1 }
application/xml, text/xml
Sample:
<ServiceChargePostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.WebAPI.Models.Company"> <Id>1</Id> </ServiceChargePostResponse>