POST Api/Product/AddNewProduct

Request Information

URI Parameters

None.

Body Parameters

ProductModel
NameDescriptionTypeAdditional information
Pid

integer

None.

Name

string

None.

Price

integer

None.

Manifacturer

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Pid": 1,
  "Name": "sample string 2",
  "Price": 3,
  "Manifacturer": "sample string 4"
}

application/xml, text/xml

Sample:
<ProductModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApplication6.Controllers">
  <Manifacturer>sample string 4</Manifacturer>
  <Name>sample string 2</Name>
  <Pid>1</Pid>
  <Price>3</Price>
</ProductModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ProductModel
NameDescriptionTypeAdditional information
Pid

integer

None.

Name

string

None.

Price

integer

None.

Manifacturer

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Pid": 1,
  "Name": "sample string 2",
  "Price": 3,
  "Manifacturer": "sample string 4"
}

application/xml, text/xml

Sample:
<ProductModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApplication6.Controllers">
  <Manifacturer>sample string 4</Manifacturer>
  <Name>sample string 2</Name>
  <Pid>1</Pid>
  <Price>3</Price>
</ProductModel>