POST api/Products/UpdateProduct

Updates the product.

Request Information

URI Parameters

None.

Body Parameters

EditProductPost
NameDescriptionTypeAdditional information
Id

Product Id

integer

None.

DeleteImage

True if you want to delete the product image

boolean

None.

Name

(Required) Name

string

None.

Description

Description

string

None.

ProductCategoryId

(Optional) Product category id

integer

None.

Code

Code

string

None.

IsDisabled

True if product is disabled

boolean

None.

Image

(Optional) Image for product

Collection of byte

None.

FontIcon

Font awesome icon will be used if image is empty. exapmle: fas fa-address-book

string

None.

Color

Color for font awesome icon

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "DeleteImage": false,
  "Name": "Product",
  "Description": null,
  "ProductCategoryId": null,
  "Code": null,
  "IsDisabled": false,
  "Image": null,
  "FontIcon": "fas fa-address-book",
  "Color": "#ffffff"
}

application/xml, text/xml

Sample:
<EditProductPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <Code i:nil="true" />
  <Color>#ffffff</Color>
  <Description i:nil="true" />
  <FontIcon>fas fa-address-book</FontIcon>
  <Image i:nil="true" />
  <IsDisabled>false</IsDisabled>
  <Name>Product</Name>
  <ProductCategoryId i:nil="true" />
  <DeleteImage>false</DeleteImage>
  <Id>1</Id>
</EditProductPost>

Response Information

Resource Description

IHttpActionResult

None.