POST api/AddProduct
Request Information
URI Parameters
None.
Body Parameters
ProductViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Name | string |
None. |
|
| UnitPrice | decimal number |
None. |
|
| MesurementUnitTypeId | integer |
None. |
|
| CategoryId | integer |
None. |
|
| CreatedBy | integer |
None. |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"UnitPrice": 2.0,
"MesurementUnitTypeId": 3,
"CategoryId": 4,
"CreatedBy": 5
}
application/xml, text/xml
Sample:
<ProductViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PoultryManagementAPI.ViewModels"> <CategoryId>4</CategoryId> <CreatedBy>5</CreatedBy> <MesurementUnitTypeId>3</MesurementUnitTypeId> <Name>sample string 1</Name> <UnitPrice>2</UnitPrice> </ProductViewModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.