POST api/farmPenRoomAnimal/WorkerName/{Workername}/add

Request Information

URI Parameters

NameDescriptionTypeAdditional information
Workername

string

Required

Body Parameters

Farm_Pen_Room_Animal
NameDescriptionTypeAdditional information
Id

integer

None.

PenId

integer

Required

BusinessId

integer

None.

Farm_Business

Farm_Business

None.

RoomId

integer

Required

SalesStockId

integer

None.

BirthId

integer

None.

DeathId

integer

None.

CatQtyBefore

integer

None.

CatQtyAfter

integer

None.

PenToSalesFlowId

integer

None.

CategoryId

integer

Required

QtyBefore

integer

None.

IsRegroup

boolean

None.

IsPenToSales

boolean

None.

TotalAnimalsCount

integer

None.

CurrentAnimalsCount

integer

Required

Details

string

None.

DateCreated

date

None.

DateModified

date

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "PenId": 2,
  "BusinessId": 3,
  "Farm_Business": {
    "Id": 1,
    "Name": "sample string 2",
    "DateCreated": "2025-12-04T23:14:30.188205+01:00",
    "DateModified": "2025-12-04T23:14:30.188205+01:00"
  },
  "RoomId": 4,
  "SalesStockId": 5,
  "BirthId": 6,
  "DeathId": 7,
  "CatQtyBefore": 8,
  "CatQtyAfter": 9,
  "PenToSalesFlowId": 10,
  "CategoryId": 11,
  "QtyBefore": 12,
  "IsRegroup": true,
  "IsPenToSales": true,
  "TotalAnimalsCount": 15,
  "CurrentAnimalsCount": 16,
  "Details": "sample string 17",
  "DateCreated": "2025-12-04T23:14:30.2038262+01:00",
  "DateModified": "2025-12-04T23:14:30.2038262+01:00"
}

application/xml, text/xml

Sample:
<Farm_Pen_Room_Animal xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BaseLibrary.Entities">
  <BirthId>6</BirthId>
  <BusinessId>3</BusinessId>
  <CatQtyAfter>9</CatQtyAfter>
  <CatQtyBefore>8</CatQtyBefore>
  <CategoryId>11</CategoryId>
  <CurrentAnimalsCount>16</CurrentAnimalsCount>
  <DateCreated>2025-12-04T23:14:30.2038262+01:00</DateCreated>
  <DateModified>2025-12-04T23:14:30.2038262+01:00</DateModified>
  <DeathId>7</DeathId>
  <Details>sample string 17</Details>
  <Farm_Business>
    <DateCreated>2025-12-04T23:14:30.188205+01:00</DateCreated>
    <DateModified>2025-12-04T23:14:30.188205+01:00</DateModified>
    <Id>1</Id>
    <Name>sample string 2</Name>
  </Farm_Business>
  <Id>1</Id>
  <IsPenToSales>true</IsPenToSales>
  <IsRegroup>true</IsRegroup>
  <PenId>2</PenId>
  <PenToSalesFlowId>10</PenToSalesFlowId>
  <QtyBefore>12</QtyBefore>
  <RoomId>4</RoomId>
  <SalesStockId>5</SalesStockId>
  <TotalAnimalsCount>15</TotalAnimalsCount>
</Farm_Pen_Room_Animal>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Farm_Pen_Room_Animal'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.