POST api/Product/AddorUpdateProduct

Request Information

URI Parameters

None.

Body Parameters

AddProductModel
NameDescriptionTypeAdditional information
Id

integer

None.

ProductName

string

None.

ShortDescription

string

None.

ProductDescription

string

None.

Tags

string

None.

UserId

integer

None.

Barcode

string

None.

CategoryId

integer

None.

SubCategoryId

integer

None.

BrandId

integer

None.

Weight

decimal number

None.

Length

decimal number

None.

Height

decimal number

None.

Width

decimal number

None.

ProductAtributes

Collection of ProductAttributes

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "ProductName": "sample string 2",
  "ShortDescription": "sample string 3",
  "ProductDescription": "sample string 4",
  "Tags": "sample string 5",
  "UserId": 6,
  "Barcode": "sample string 7",
  "CategoryId": 8,
  "SubCategoryId": 9,
  "BrandId": 10,
  "Weight": 11.1,
  "Length": 12.1,
  "Height": 13.1,
  "Width": 14.1,
  "ProductAtributes": [
    {
      "Id": 1,
      "PrAttribute_Id": 2,
      "SKU": "sample string 3",
      "ImageName": "sample string 4",
      "ImagePath": "sample string 5",
      "Tags": "sample string 6",
      "MRP": 7.0,
      "DiscountPerc": 8.0,
      "DiscountPrice": 9.0,
      "SalePrice": 10.0,
      "SaleStart": "2021-09-26T21:49:50.5597874+05:30",
      "SaleEnd": "2021-09-26T21:49:50.5597874+05:30",
      "StockQty": 13,
      "MaximumOrderQty": 14,
      "MinimumStockQty": 15,
      "IsAllowOrder": true,
      "IsPublished": true,
      "PrColorId": 18,
      "PrColor": "sample string 19",
      "PrSizeId": 20,
      "PrSize": "sample string 21",
      "Barcode": "sample string 22",
      "IsAllowNegativeStock": true
    },
    {
      "Id": 1,
      "PrAttribute_Id": 2,
      "SKU": "sample string 3",
      "ImageName": "sample string 4",
      "ImagePath": "sample string 5",
      "Tags": "sample string 6",
      "MRP": 7.0,
      "DiscountPerc": 8.0,
      "DiscountPrice": 9.0,
      "SalePrice": 10.0,
      "SaleStart": "2021-09-26T21:49:50.5597874+05:30",
      "SaleEnd": "2021-09-26T21:49:50.5597874+05:30",
      "StockQty": 13,
      "MaximumOrderQty": 14,
      "MinimumStockQty": 15,
      "IsAllowOrder": true,
      "IsPublished": true,
      "PrColorId": 18,
      "PrColor": "sample string 19",
      "PrSizeId": 20,
      "PrSize": "sample string 21",
      "Barcode": "sample string 22",
      "IsAllowNegativeStock": true
    }
  ]
}

text/html

Sample:
{"Id":1,"ProductName":"sample string 2","ShortDescription":"sample string 3","ProductDescription":"sample string 4","Tags":"sample string 5","UserId":6,"Barcode":"sample string 7","CategoryId":8,"SubCategoryId":9,"BrandId":10,"Weight":11.1,"Length":12.1,"Height":13.1,"Width":14.1,"ProductAtributes":[{"Id":1,"PrAttribute_Id":2,"SKU":"sample string 3","ImageName":"sample string 4","ImagePath":"sample string 5","Tags":"sample string 6","MRP":7.0,"DiscountPerc":8.0,"DiscountPrice":9.0,"SalePrice":10.0,"SaleStart":"2021-09-26T21:49:50.5597874+05:30","SaleEnd":"2021-09-26T21:49:50.5597874+05:30","StockQty":13,"MaximumOrderQty":14,"MinimumStockQty":15,"IsAllowOrder":true,"IsPublished":true,"PrColorId":18,"PrColor":"sample string 19","PrSizeId":20,"PrSize":"sample string 21","Barcode":"sample string 22","IsAllowNegativeStock":true},{"Id":1,"PrAttribute_Id":2,"SKU":"sample string 3","ImageName":"sample string 4","ImagePath":"sample string 5","Tags":"sample string 6","MRP":7.0,"DiscountPerc":8.0,"DiscountPrice":9.0,"SalePrice":10.0,"SaleStart":"2021-09-26T21:49:50.5597874+05:30","SaleEnd":"2021-09-26T21:49:50.5597874+05:30","StockQty":13,"MaximumOrderQty":14,"MinimumStockQty":15,"IsAllowOrder":true,"IsPublished":true,"PrColorId":18,"PrColor":"sample string 19","PrSizeId":20,"PrSize":"sample string 21","Barcode":"sample string 22","IsAllowNegativeStock":true}]}

application/xml, text/xml

Sample:
<AddProductModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Meridukan_API.Entities.Product">
  <Barcode>sample string 7</Barcode>
  <BrandId>10</BrandId>
  <CategoryId>8</CategoryId>
  <Height>13.1</Height>
  <Id>1</Id>
  <Length>12.1</Length>
  <ProductAtributes>
    <ProductAttributes>
      <Barcode>sample string 22</Barcode>
      <DiscountPerc>8</DiscountPerc>
      <DiscountPrice>9</DiscountPrice>
      <Id>1</Id>
      <ImageName>sample string 4</ImageName>
      <ImagePath>sample string 5</ImagePath>
      <IsAllowNegativeStock>true</IsAllowNegativeStock>
      <IsAllowOrder>true</IsAllowOrder>
      <IsPublished>true</IsPublished>
      <MRP>7</MRP>
      <MaximumOrderQty>14</MaximumOrderQty>
      <MinimumStockQty>15</MinimumStockQty>
      <PrAttribute_Id>2</PrAttribute_Id>
      <PrColor>sample string 19</PrColor>
      <PrColorId>18</PrColorId>
      <PrSize>sample string 21</PrSize>
      <PrSizeId>20</PrSizeId>
      <SKU>sample string 3</SKU>
      <SaleEnd>2021-09-26T21:49:50.5597874+05:30</SaleEnd>
      <SalePrice>10</SalePrice>
      <SaleStart>2021-09-26T21:49:50.5597874+05:30</SaleStart>
      <StockQty>13</StockQty>
      <Tags>sample string 6</Tags>
    </ProductAttributes>
    <ProductAttributes>
      <Barcode>sample string 22</Barcode>
      <DiscountPerc>8</DiscountPerc>
      <DiscountPrice>9</DiscountPrice>
      <Id>1</Id>
      <ImageName>sample string 4</ImageName>
      <ImagePath>sample string 5</ImagePath>
      <IsAllowNegativeStock>true</IsAllowNegativeStock>
      <IsAllowOrder>true</IsAllowOrder>
      <IsPublished>true</IsPublished>
      <MRP>7</MRP>
      <MaximumOrderQty>14</MaximumOrderQty>
      <MinimumStockQty>15</MinimumStockQty>
      <PrAttribute_Id>2</PrAttribute_Id>
      <PrColor>sample string 19</PrColor>
      <PrColorId>18</PrColorId>
      <PrSize>sample string 21</PrSize>
      <PrSizeId>20</PrSizeId>
      <SKU>sample string 3</SKU>
      <SaleEnd>2021-09-26T21:49:50.5597874+05:30</SaleEnd>
      <SalePrice>10</SalePrice>
      <SaleStart>2021-09-26T21:49:50.5597874+05:30</SaleStart>
      <StockQty>13</StockQty>
      <Tags>sample string 6</Tags>
    </ProductAttributes>
  </ProductAtributes>
  <ProductDescription>sample string 4</ProductDescription>
  <ProductName>sample string 2</ProductName>
  <ShortDescription>sample string 3</ShortDescription>
  <SubCategoryId>9</SubCategoryId>
  <Tags>sample string 5</Tags>
  <UserId>6</UserId>
  <Weight>11.1</Weight>
  <Width>14.1</Width>
</AddProductModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.