POST api/pod/product/AddProduct

Request Information

URI Parameters

None.

Body Parameters

ProductBindingModel
NameDescriptionTypeAdditional information
AvailableCount

decimal number

None.

Name

string

Required

Price

decimal number

Required

Discount

decimal number

Required

CanComment

boolean

None.

CanLike

boolean

None.

IsEnabled

boolean

None.

Description

string

None.

Result

string

None.

HasErrors

boolean

None.

Message

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "AvailableCount": 1.0,
  "Name": "sample string 2",
  "Price": 3.0,
  "Discount": 4.0,
  "CanComment": true,
  "CanLike": true,
  "IsEnabled": true,
  "Description": "sample string 8",
  "Result": "sample string 9",
  "HasErrors": false,
  "Message": []
}

application/xml, text/xml

Sample:
<ProductBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Barg.WebAPI.Models">
  <Message xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <Result>sample string 9</Result>
  <AvailableCount>1</AvailableCount>
  <CanComment>true</CanComment>
  <CanLike>true</CanLike>
  <Description>sample string 8</Description>
  <Discount>4</Discount>
  <IsEnabled>true</IsEnabled>
  <Name>sample string 2</Name>
  <Price>3</Price>
</ProductBindingModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ProductViewModel
NameDescriptionTypeAdditional information
EntityId

integer

None.

AvailableCount

decimal number

None.

Name

string

Required

Price

decimal number

Required

Discount

decimal number

Required

CanComment

boolean

None.

CanLike

boolean

None.

IsEnabled

boolean

None.

Description

string

None.

Result

string

None.

HasErrors

boolean

None.

Message

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "EntityId": 1,
  "AvailableCount": 2.0,
  "Name": "sample string 3",
  "Price": 4.0,
  "Discount": 5.0,
  "CanComment": true,
  "CanLike": true,
  "IsEnabled": true,
  "Description": "sample string 9",
  "Result": "sample string 10",
  "HasErrors": false,
  "Message": []
}

application/xml, text/xml

Sample:
<ProductViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Barg.WebAPI.Models">
  <Message xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <Result>sample string 10</Result>
  <AvailableCount>2</AvailableCount>
  <CanComment>true</CanComment>
  <CanLike>true</CanLike>
  <Description>sample string 9</Description>
  <Discount>5</Discount>
  <IsEnabled>true</IsEnabled>
  <Name>sample string 3</Name>
  <Price>4</Price>
  <EntityId>1</EntityId>
</ProductViewModel>