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": "1d85a821-b2b5-451c-97b9-86541aa22962",
"Name": "sample string 2",
"PhotoCount": 3,
"Description": "sample string 4",
"ScanCode": "sample string 5",
"State": 0,
"CreatedDate": "2026-09-27T13:36:02.0293442+03: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": "169dc6d7-2376-4e15-8207-06277c5a4e88",
"Amount": 2.0,
"PriceTypeName": "sample string 3",
"PriceTypeId": 4,
"IsFixed": true
},
{
"Id": "169dc6d7-2376-4e15-8207-06277c5a4e88",
"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": "ed405944-58b5-4e33-90ae-df62cce50ce2",
"OrgImage": "QEA=",
"ProductId": "79821b69-39af-4b2b-a0ca-9a521f5e870b"
},
{
"ImageId": "ed405944-58b5-4e33-90ae-df62cce50ce2",
"OrgImage": "QEA=",
"ProductId": "79821b69-39af-4b2b-a0ca-9a521f5e870b"
}
]
}
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-09-27T13:36:02.0293442+03:00</CreatedDate>
<Description>sample string 4</Description>
<Id>1d85a821-b2b5-451c-97b9-86541aa22962</Id>
<IsRevised>true</IsRevised>
<IsSelected>true</IsSelected>
<Name>sample string 2</Name>
<PhotoCount>3</PhotoCount>
<Price>
<PriceModel>
<Amount>2</Amount>
<Id>169dc6d7-2376-4e15-8207-06277c5a4e88</Id>
<IsFixed>true</IsFixed>
<PriceTypeId>4</PriceTypeId>
<PriceTypeName>sample string 3</PriceTypeName>
</PriceModel>
<PriceModel>
<Amount>2</Amount>
<Id>169dc6d7-2376-4e15-8207-06277c5a4e88</Id>
<IsFixed>true</IsFixed>
<PriceTypeId>4</PriceTypeId>
<PriceTypeName>sample string 3</PriceTypeName>
</PriceModel>
</Price>
<ProductPhoto>
<ProductPhotoModel>
<ImageId>ed405944-58b5-4e33-90ae-df62cce50ce2</ImageId>
<OrgImage>QEA=</OrgImage>
<ProductId>79821b69-39af-4b2b-a0ca-9a521f5e870b</ProductId>
</ProductPhotoModel>
<ProductPhotoModel>
<ImageId>ed405944-58b5-4e33-90ae-df62cce50ce2</ImageId>
<OrgImage>QEA=</OrgImage>
<ProductId>79821b69-39af-4b2b-a0ca-9a521f5e870b</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>