PUT api/Product/UpdateProduct

Request Information

URI Parameters

None.

Body Parameters

ProductModel
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

None.

PhotoCount

integer

None.

Description

string

None.

ScanCode

string

None.

State

ProductState

None.

CreatedDate

date

None.

IsRevised

boolean

None.

IsSelected

boolean

None.

ProductUser

Collection of ProductUserModel

None.

Price

Collection of PriceModel

None.

Provider

Collection of ProviderModel

None.

ProductPhoto

Collection of ProductPhotoModel

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "7eb68237-399c-499f-ac61-2a6ddacb5e69",
  "Name": "sample string 2",
  "PhotoCount": 3,
  "Description": "sample string 4",
  "ScanCode": "sample string 5",
  "State": 0,
  "CreatedDate": "2026-01-01T14:25:28.0195568+02:00",
  "IsRevised": true,
  "IsSelected": true,
  "ProductUser": [
    {
      "UserId": 1,
      "DepartmentId": 2,
      "DepartmentName": "sample string 3",
      "UserName": "sample string 4",
      "RoleName": "sample string 5",
      "Quantity": 6
    },
    {
      "UserId": 1,
      "DepartmentId": 2,
      "DepartmentName": "sample string 3",
      "UserName": "sample string 4",
      "RoleName": "sample string 5",
      "Quantity": 6
    }
  ],
  "Price": [
    {
      "Id": "357c1114-4416-445c-a7b9-a75771171260",
      "Amount": 2.0,
      "PriceTypeName": "sample string 3",
      "PriceTypeId": 4,
      "IsFixed": true
    },
    {
      "Id": "357c1114-4416-445c-a7b9-a75771171260",
      "Amount": 2.0,
      "PriceTypeName": "sample string 3",
      "PriceTypeId": 4,
      "IsFixed": true
    }
  ],
  "Provider": [
    {
      "Id": 1,
      "Name": "sample string 2",
      "IsSelected": true
    },
    {
      "Id": 1,
      "Name": "sample string 2",
      "IsSelected": true
    }
  ],
  "ProductPhoto": [
    {
      "ImageId": "ed668d9e-c728-4c8d-9daa-ce80b57db19e",
      "OrgImage": "QEA=",
      "ProductId": "fca0611a-605b-4a6e-ba06-f67fbbd12f73"
    },
    {
      "ImageId": "ed668d9e-c728-4c8d-9daa-ce80b57db19e",
      "OrgImage": "QEA=",
      "ProductId": "fca0611a-605b-4a6e-ba06-f67fbbd12f73"
    }
  ]
}

application/xml, text/xml

Sample:
<ProductModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IRetail.Helpers">
  <CreatedDate>2026-01-01T14:25:28.0195568+02:00</CreatedDate>
  <Description>sample string 4</Description>
  <Id>7eb68237-399c-499f-ac61-2a6ddacb5e69</Id>
  <IsRevised>true</IsRevised>
  <IsSelected>true</IsSelected>
  <Name>sample string 2</Name>
  <PhotoCount>3</PhotoCount>
  <Price>
    <PriceModel>
      <Amount>2</Amount>
      <Id>357c1114-4416-445c-a7b9-a75771171260</Id>
      <IsFixed>true</IsFixed>
      <PriceTypeId>4</PriceTypeId>
      <PriceTypeName>sample string 3</PriceTypeName>
    </PriceModel>
    <PriceModel>
      <Amount>2</Amount>
      <Id>357c1114-4416-445c-a7b9-a75771171260</Id>
      <IsFixed>true</IsFixed>
      <PriceTypeId>4</PriceTypeId>
      <PriceTypeName>sample string 3</PriceTypeName>
    </PriceModel>
  </Price>
  <ProductPhoto>
    <ProductPhotoModel>
      <ImageId>ed668d9e-c728-4c8d-9daa-ce80b57db19e</ImageId>
      <OrgImage>QEA=</OrgImage>
      <ProductId>fca0611a-605b-4a6e-ba06-f67fbbd12f73</ProductId>
    </ProductPhotoModel>
    <ProductPhotoModel>
      <ImageId>ed668d9e-c728-4c8d-9daa-ce80b57db19e</ImageId>
      <OrgImage>QEA=</OrgImage>
      <ProductId>fca0611a-605b-4a6e-ba06-f67fbbd12f73</ProductId>
    </ProductPhotoModel>
  </ProductPhoto>
  <ProductUser>
    <ProductUserModel>
      <DepartmentId>2</DepartmentId>
      <DepartmentName>sample string 3</DepartmentName>
      <Quantity>6</Quantity>
      <RoleName>sample string 5</RoleName>
      <UserId>1</UserId>
      <UserName>sample string 4</UserName>
    </ProductUserModel>
    <ProductUserModel>
      <DepartmentId>2</DepartmentId>
      <DepartmentName>sample string 3</DepartmentName>
      <Quantity>6</Quantity>
      <RoleName>sample string 5</RoleName>
      <UserId>1</UserId>
      <UserName>sample string 4</UserName>
    </ProductUserModel>
  </ProductUser>
  <Provider>
    <ProviderModel>
      <Id>1</Id>
      <IsSelected>true</IsSelected>
      <Name>sample string 2</Name>
    </ProviderModel>
    <ProviderModel>
      <Id>1</Id>
      <IsSelected>true</IsSelected>
      <Name>sample string 2</Name>
    </ProviderModel>
  </Provider>
  <ScanCode>sample string 5</ScanCode>
  <State>Available</State>
</ProductModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ProductModel'.

Response Information

Resource Description

ResponseModel
NameDescriptionTypeAdditional information
IsSucces

boolean

None.

Message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "IsSucces": true,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<ResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IRetail.Helpers">
  <IsSucces>true</IsSucces>
  <Message>sample string 2</Message>
</ResponseModel>