POST api/pod/product/AddProduct

Request Information

URI Parameters

None.

Body Parameters

ProductModel
NameDescriptionTypeAdditional information
AvailableCount

decimal number

None.

Name

string

Required

Price

decimal number

Required

Discount

decimal number

Required

CanComment

boolean

None.

CanLike

boolean

None.

Enabled

boolean

None.

UniqueId

string

None.

Description

string

None.

TaxRate

decimal number

None.

Unlimited

boolean

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,
  "Enabled": true,
  "UniqueId": "sample string 8",
  "Description": "sample string 9",
  "TaxRate": 10.1,
  "Unlimited": true
}

application/xml, text/xml

Sample:
<ProductModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Barg.WebAPI.Models">
  <AvailableCount>1</AvailableCount>
  <CanComment>true</CanComment>
  <CanLike>true</CanLike>
  <Description>sample string 9</Description>
  <Discount>4</Discount>
  <Enabled>true</Enabled>
  <Name>sample string 2</Name>
  <Price>3</Price>
  <TaxRate>10.1</TaxRate>
  <UniqueId>sample string 8</UniqueId>
  <Unlimited>true</Unlimited>
</ProductModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ProductViewModel
NameDescriptionTypeAdditional information
Data

FullProductModel

None.

HasErrors

boolean

None.

Messages

Collection of string

None.

Response Formats

application/json, text/json

Sample:
{
  "Data": {
    "EntityId": 1,
    "AvailableCount": 2.0,
    "Name": "sample string 3",
    "Price": 4.0,
    "Discount": 5.0,
    "CanComment": true,
    "CanLike": true,
    "Enabled": true,
    "UniqueId": "sample string 9",
    "Description": "sample string 10",
    "TaxRate": 11.1,
    "Unlimited": true
  },
  "HasErrors": false,
  "Messages": []
}

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">
  <Messages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <Data>
    <AvailableCount>2</AvailableCount>
    <CanComment>true</CanComment>
    <CanLike>true</CanLike>
    <Description>sample string 10</Description>
    <Discount>5</Discount>
    <Enabled>true</Enabled>
    <Name>sample string 3</Name>
    <Price>4</Price>
    <TaxRate>11.1</TaxRate>
    <UniqueId>sample string 9</UniqueId>
    <Unlimited>true</Unlimited>
    <EntityId>1</EntityId>
  </Data>
</ProductViewModel>