GET api/BuyHistories/ByFarmId?Id={Id}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
Required |
Body Parameters
None.
Response Information
Resource Description
Collection of BuyHistoryListView| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| ProductId | integer |
None. |
|
| BuyAt | date |
None. |
|
| TotalQuantity | decimal number |
None. |
|
| BalanceQuantity | decimal number |
None. |
|
| TotalPrice | decimal number |
None. |
|
| UnitPrice | decimal number |
None. |
|
| ProductAge | integer |
None. |
|
| ExpiredAt | date |
None. |
|
| FarmId | integer |
None. |
|
| OwnerId | integer |
None. |
|
| VendorId | 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. |
|
| ProductTitle | string |
None. |
|
| ProductTypeId | integer |
None. |
|
| MeasurementUnitTitle | string |
None. |
Response Formats
application/json, text/json
Sample:
[
{
"Id": 1,
"ProductId": 2,
"BuyAt": "2025-12-06T10:24:50.712312+06:00",
"TotalQuantity": 3.0,
"BalanceQuantity": 4.0,
"TotalPrice": 5.0,
"UnitPrice": 6.0,
"ProductAge": 7,
"ExpiredAt": "2025-12-06T10:24:50.712312+06:00",
"FarmId": 8,
"OwnerId": 9,
"VendorId": 10,
"Comment": "sample string 11",
"CreatedAt": "2025-12-06T10:24:50.712312+06:00",
"UpdatedAt": "2025-12-06T10:24:50.712312+06:00",
"DeletedAt": "2025-12-06T10:24:50.712312+06:00",
"DeletedBy": 14,
"CreatedBy": 15,
"UpdatedBy": 16,
"DeletedStatus": true,
"ProductTitle": "sample string 18",
"ProductTypeId": 19,
"MeasurementUnitTitle": "sample string 20"
},
{
"Id": 1,
"ProductId": 2,
"BuyAt": "2025-12-06T10:24:50.712312+06:00",
"TotalQuantity": 3.0,
"BalanceQuantity": 4.0,
"TotalPrice": 5.0,
"UnitPrice": 6.0,
"ProductAge": 7,
"ExpiredAt": "2025-12-06T10:24:50.712312+06:00",
"FarmId": 8,
"OwnerId": 9,
"VendorId": 10,
"Comment": "sample string 11",
"CreatedAt": "2025-12-06T10:24:50.712312+06:00",
"UpdatedAt": "2025-12-06T10:24:50.712312+06:00",
"DeletedAt": "2025-12-06T10:24:50.712312+06:00",
"DeletedBy": 14,
"CreatedBy": 15,
"UpdatedBy": 16,
"DeletedStatus": true,
"ProductTitle": "sample string 18",
"ProductTypeId": 19,
"MeasurementUnitTitle": "sample string 20"
}
]
application/xml, text/xml
Sample:
<ArrayOfBuyHistoryListView xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PoultryManagementAPI.ViewModels">
<BuyHistoryListView>
<BalanceQuantity>4</BalanceQuantity>
<BuyAt>2025-12-06T10:24:50.712312+06:00</BuyAt>
<Comment>sample string 11</Comment>
<CreatedAt>2025-12-06T10:24:50.712312+06:00</CreatedAt>
<CreatedBy>15</CreatedBy>
<DeletedAt>2025-12-06T10:24:50.712312+06:00</DeletedAt>
<DeletedBy>14</DeletedBy>
<DeletedStatus>true</DeletedStatus>
<ExpiredAt>2025-12-06T10:24:50.712312+06:00</ExpiredAt>
<FarmId>8</FarmId>
<Id>1</Id>
<MeasurementUnitTitle>sample string 20</MeasurementUnitTitle>
<OwnerId>9</OwnerId>
<ProductAge>7</ProductAge>
<ProductId>2</ProductId>
<ProductTitle>sample string 18</ProductTitle>
<ProductTypeId>19</ProductTypeId>
<TotalPrice>5</TotalPrice>
<TotalQuantity>3</TotalQuantity>
<UnitPrice>6</UnitPrice>
<UpdatedAt>2025-12-06T10:24:50.712312+06:00</UpdatedAt>
<UpdatedBy>16</UpdatedBy>
<VendorId>10</VendorId>
</BuyHistoryListView>
<BuyHistoryListView>
<BalanceQuantity>4</BalanceQuantity>
<BuyAt>2025-12-06T10:24:50.712312+06:00</BuyAt>
<Comment>sample string 11</Comment>
<CreatedAt>2025-12-06T10:24:50.712312+06:00</CreatedAt>
<CreatedBy>15</CreatedBy>
<DeletedAt>2025-12-06T10:24:50.712312+06:00</DeletedAt>
<DeletedBy>14</DeletedBy>
<DeletedStatus>true</DeletedStatus>
<ExpiredAt>2025-12-06T10:24:50.712312+06:00</ExpiredAt>
<FarmId>8</FarmId>
<Id>1</Id>
<MeasurementUnitTitle>sample string 20</MeasurementUnitTitle>
<OwnerId>9</OwnerId>
<ProductAge>7</ProductAge>
<ProductId>2</ProductId>
<ProductTitle>sample string 18</ProductTitle>
<ProductTypeId>19</ProductTypeId>
<TotalPrice>5</TotalPrice>
<TotalQuantity>3</TotalQuantity>
<UnitPrice>6</UnitPrice>
<UpdatedAt>2025-12-06T10:24:50.712312+06:00</UpdatedAt>
<UpdatedBy>16</UpdatedBy>
<VendorId>10</VendorId>
</BuyHistoryListView>
</ArrayOfBuyHistoryListView>