POST api/Product/AddProduct
Request Information
URI Parameters
None.
Body Parameters
ProductModel| Name | Description | Type | Additional 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": "7be90e41-f00f-4e6c-a4cf-30595077c9d5",
"Name": "sample string 2",
"PhotoCount": 3,
"Description": "sample string 4",
"ScanCode": "sample string 5",
"State": 0,
"CreatedDate": "2026-02-16T10:50:52.6360335+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": "3b044cdb-4603-48cb-b81f-25f62a731d4d",
"Amount": 2.0,
"PriceTypeName": "sample string 3",
"PriceTypeId": 4,
"IsFixed": true
},
{
"Id": "3b044cdb-4603-48cb-b81f-25f62a731d4d",
"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": "f09df531-1146-4acf-bfaa-7fea5a1ff53d",
"OrgImage": "QEA=",
"ProductId": "6eea0c3b-d457-43ca-ac7d-cf292ca509b7"
},
{
"ImageId": "f09df531-1146-4acf-bfaa-7fea5a1ff53d",
"OrgImage": "QEA=",
"ProductId": "6eea0c3b-d457-43ca-ac7d-cf292ca509b7"
}
]
}
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-02-16T10:50:52.6360335+02:00</CreatedDate>
<Description>sample string 4</Description>
<Id>7be90e41-f00f-4e6c-a4cf-30595077c9d5</Id>
<IsRevised>true</IsRevised>
<IsSelected>true</IsSelected>
<Name>sample string 2</Name>
<PhotoCount>3</PhotoCount>
<Price>
<PriceModel>
<Amount>2</Amount>
<Id>3b044cdb-4603-48cb-b81f-25f62a731d4d</Id>
<IsFixed>true</IsFixed>
<PriceTypeId>4</PriceTypeId>
<PriceTypeName>sample string 3</PriceTypeName>
</PriceModel>
<PriceModel>
<Amount>2</Amount>
<Id>3b044cdb-4603-48cb-b81f-25f62a731d4d</Id>
<IsFixed>true</IsFixed>
<PriceTypeId>4</PriceTypeId>
<PriceTypeName>sample string 3</PriceTypeName>
</PriceModel>
</Price>
<ProductPhoto>
<ProductPhotoModel>
<ImageId>f09df531-1146-4acf-bfaa-7fea5a1ff53d</ImageId>
<OrgImage>QEA=</OrgImage>
<ProductId>6eea0c3b-d457-43ca-ac7d-cf292ca509b7</ProductId>
</ProductPhotoModel>
<ProductPhotoModel>
<ImageId>f09df531-1146-4acf-bfaa-7fea5a1ff53d</ImageId>
<OrgImage>QEA=</OrgImage>
<ProductId>6eea0c3b-d457-43ca-ac7d-cf292ca509b7</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:
Response Information
Resource Description
ResponseModel| Name | Description | Type | Additional 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>