POST api/SellHistories/Sell
Request Information
URI Parameters
None.
Body Parameters
SellHistory| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| ProductId | integer |
None. |
|
| SellAt | date |
None. |
|
| Quantity | decimal number |
None. |
|
| TotalPrice | decimal number |
None. |
|
| UnitPrice | decimal number |
None. |
|
| FarmId | integer |
None. |
|
| OwnerId | integer |
None. |
|
| BuyerId | integer |
None. |
|
| Comment | string |
None. |
|
| CreatedAt | date |
None. |
|
| UpdatedAt | date |
None. |
|
| DeletedAt | date |
None. |
|
| DeletedBy | integer |
None. |
|
| CreatedBy | integer |
None. |
|
| UpdatedBy | integer |
None. |
|
| DeletedStatus | boolean |
None. |
|
| Product | Product |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": 1,
"ProductId": 2,
"SellAt": "2025-12-06T10:23:19.2264599+06:00",
"Quantity": 4.0,
"TotalPrice": 5.0,
"UnitPrice": 6.0,
"FarmId": 7,
"OwnerId": 8,
"BuyerId": 9,
"Comment": "sample string 10",
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 13,
"CreatedBy": 14,
"UpdatedBy": 15,
"DeletedStatus": true,
"Product": {
"Id": 1,
"ProductTypeId": 2,
"Title": "sample string 3",
"SystemName": "sample string 4",
"MeasurementUnitId": 5,
"HasAgeCount": true,
"HasExpiredDate": true,
"AgeCountUnitId": 8,
"ForBuy": true,
"UnitPrice": 10.0,
"ForSale": true,
"OwnerId": 12,
"ActiveStatus": true,
"DisplayOrder": 14,
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 17,
"CreatedBy": 18,
"UpdatedBy": 19,
"DeletedStatus": true,
"IsCommonItem": true,
"IsCompanyRequired": true,
"BuyHistories": [
{
"Id": 1,
"ProductId": 2,
"BuyAt": "2025-12-06T10:23:19.2264599+06:00",
"TotalQuantity": 3.0,
"BalanceQuantity": 4.0,
"TotalPrice": 5.0,
"UnitPrice": 6.0,
"ProductAge": 7,
"ExpiredAt": "2025-12-06T10:23:19.2264599+06:00",
"FarmId": 8,
"OwnerId": 9,
"VendorId": 10,
"Comment": "sample string 11",
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 14,
"CreatedBy": 15,
"UpdatedBy": 16,
"DeletedStatus": true,
"CompanyBatchNo": "sample string 18",
"BuyHistoryPictures": [
{
"Id": 1,
"BuyHistoryId": 1,
"PictureUrl": "sample string 2",
"IsActive": true
},
{
"Id": 1,
"BuyHistoryId": 1,
"PictureUrl": "sample string 2",
"IsActive": true
}
]
},
{
"Id": 1,
"ProductId": 2,
"BuyAt": "2025-12-06T10:23:19.2264599+06:00",
"TotalQuantity": 3.0,
"BalanceQuantity": 4.0,
"TotalPrice": 5.0,
"UnitPrice": 6.0,
"ProductAge": 7,
"ExpiredAt": "2025-12-06T10:23:19.2264599+06:00",
"FarmId": 8,
"OwnerId": 9,
"VendorId": 10,
"Comment": "sample string 11",
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 14,
"CreatedBy": 15,
"UpdatedBy": 16,
"DeletedStatus": true,
"CompanyBatchNo": "sample string 18",
"BuyHistoryPictures": [
{
"Id": 1,
"BuyHistoryId": 1,
"PictureUrl": "sample string 2",
"IsActive": true
},
{
"Id": 1,
"BuyHistoryId": 1,
"PictureUrl": "sample string 2",
"IsActive": true
}
]
}
],
"CategoryToProductMappings": [
{
"Id": 1,
"ProductId": 2,
"CategoryId": 3,
"IsFeaturedProduct": true,
"DisplayOrder": 5,
"Category": {
"Id": 1,
"Name": "sample string 2",
"SystemName": "sample string 3",
"PictureUrl": "sample string 4",
"ParentCategoryId": 5,
"IconPath": "sample string 6",
"DisplayOrder": 7,
"ActiveStatus": true,
"CategoryToProductMappings": []
}
},
{
"Id": 1,
"ProductId": 2,
"CategoryId": 3,
"IsFeaturedProduct": true,
"DisplayOrder": 5,
"Category": {
"Id": 1,
"Name": "sample string 2",
"SystemName": "sample string 3",
"PictureUrl": "sample string 4",
"ParentCategoryId": 5,
"IconPath": "sample string 6",
"DisplayOrder": 7,
"ActiveStatus": true,
"CategoryToProductMappings": []
}
}
],
"MeasurementUnit": {
"Id": 1,
"Title": "sample string 2",
"SystemName": "sample string 3",
"OrderSerial": 4,
"ActiveStatus": true,
"Products": []
},
"Pictures": [
{
"Id": 1,
"PictureUrl": "sample string 2",
"ActiveStatus": true,
"DisplayOrder": 4,
"ProductId": 5
},
{
"Id": 1,
"PictureUrl": "sample string 2",
"ActiveStatus": true,
"DisplayOrder": 4,
"ProductId": 5
}
],
"ProductType": {
"Id": 1,
"Title": "sample string 2",
"SystemName": "sample string 3",
"OrderSerial": 4,
"ActiveStatus": true,
"ForBuy": true,
"ForSale": true,
"IconPath": "sample string 8",
"BirdTypeMapping": "sample string 9",
"Products": []
},
"ProductUses": [
{
"Id": 1,
"ProductId": 2,
"UsedAt": "2025-12-06T10:23:19.2264599+06:00",
"TotalAmount": 4.0,
"BatchInfoId": 5,
"FarmId": 6,
"OwnerId": 7,
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 10,
"CreatedBy": 11,
"UpdatedBy": 12,
"DeletedStatus": true
},
{
"Id": 1,
"ProductId": 2,
"UsedAt": "2025-12-06T10:23:19.2264599+06:00",
"TotalAmount": 4.0,
"BatchInfoId": 5,
"FarmId": 6,
"OwnerId": 7,
"CreatedAt": "2025-12-06T10:23:19.2264599+06:00",
"UpdatedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedAt": "2025-12-06T10:23:19.2264599+06:00",
"DeletedBy": 10,
"CreatedBy": 11,
"UpdatedBy": 12,
"DeletedStatus": true
}
],
"SellHistories": []
}
}
application/xml
Sample:
Sample not available.
text/xml
Sample:
Sample not available.
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.