POST api/FlockMortalities
Creates a new flock mortality. However, unlike a typical POST, we will actually do an update to an existing mortality if one exists for the same flock, house, week, and day combination. This is because users in Chick Redux can create their own mortality records, so one might already exist for the the given day, but we don't want this to be an error for API users - instead, they will just end up updating the existing record.
Request Information
URI Parameters
None.
Body Parameters
The flock mortality to create.
FlockMortality| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
The ID of the record. |
integer |
None. |
| FlockManagementID |
The ID of the flock the mortality is for. |
integer |
None. |
| GrowerHouseID |
The ID of the house the mortality is for. |
integer |
None. |
| WeekNumber |
The number of the week the mortality is for. Week 1 is the week of the placement. |
integer |
None. |
| DayNumber |
The day within the week the placement is for. This does not mean 1 = Monday, this is the offset in days from the week number. So week 2, day 1, would be placement date + 8 days. |
integer |
None. |
| AmDeaths |
The number of chicks that died in the morning. |
integer |
None. |
| PmDeaths |
The number of chicks that died in the evening. |
integer |
None. |
| Culls |
The number of chicks that had to be killed due to some issue (ex. injury). |
integer |
None. |
| UniqueIdentifier |
Uniquely identifies this record. This ID is assigned by the individual tablets using the farm tech app. That way, records created from the tablets have a 100% globally unique identifier that allows them to determine if a record on their device already exists on the server. |
string |
None. |
Request Formats
application/json, text/json
{
"ID": 1,
"FlockManagementID": 2,
"GrowerHouseID": 3,
"WeekNumber": 4,
"DayNumber": 5,
"AmDeaths": 6,
"PmDeaths": 7,
"Culls": 8,
"UniqueIdentifier": "sample string 9"
}
application/x-www-form-urlencoded
Response Information
Resource Description
A 201 created response on success, or a 403 bad request if there are issues with the mortality data.
FlockMortality| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
The ID of the record. |
integer |
None. |
| FlockManagementID |
The ID of the flock the mortality is for. |
integer |
None. |
| GrowerHouseID |
The ID of the house the mortality is for. |
integer |
None. |
| WeekNumber |
The number of the week the mortality is for. Week 1 is the week of the placement. |
integer |
None. |
| DayNumber |
The day within the week the placement is for. This does not mean 1 = Monday, this is the offset in days from the week number. So week 2, day 1, would be placement date + 8 days. |
integer |
None. |
| AmDeaths |
The number of chicks that died in the morning. |
integer |
None. |
| PmDeaths |
The number of chicks that died in the evening. |
integer |
None. |
| Culls |
The number of chicks that had to be killed due to some issue (ex. injury). |
integer |
None. |
| UniqueIdentifier |
Uniquely identifies this record. This ID is assigned by the individual tablets using the farm tech app. That way, records created from the tablets have a 100% globally unique identifier that allows them to determine if a record on their device already exists on the server. |
string |
None. |
Response Formats
application/json, text/json
{
"ID": 1,
"FlockManagementID": 2,
"GrowerHouseID": 3,
"WeekNumber": 4,
"DayNumber": 5,
"AmDeaths": 6,
"PmDeaths": 7,
"Culls": 8,
"UniqueIdentifier": "sample string 9"
}