Animal Weighing Order
Animal Weighing Order Registration
The PostAddAnimalWeighingOrder endpoint is responsible for registering a new animal weighing order in the MIMS system.
How to register an animal weighing order
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddAnimalWeighingOrder |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalWeighingOrder" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AnimalWeighingOrderNo | String(25) | Yes | External code of the Weighing Order |
| BranchNo | String(25) | Yes | External code of the Branch |
| WeighingEvent | WeighingEvent | No | Enumerator with possible values for Weighing Order Type: weNormal (Normal), weIncident (Accident), weInTransit (In Transit), weDiverted (Diverted) or weChickenSale (Chicken Sale) |
| AnimalWeighingOrderStatusType | AnimalWeighingOrderStatusType | No | Enumerator with possible values for Weighing Order Status Type: wsOpened (Open) or wsBlocked (Blocked) |
| ScheduleDate | DataHora | Yes | Weighing order schedule date |
| CatchDate | DataHora | Yes | Catch date |
| ScheduleSlaughterDate | DataHora | No | Scheduled slaughter date |
| VehiclePlateNo | String(10) | Yes | Vehicle plate |
| VehicleNo | String(25) | No | External code of the vehicle |
| TransporterNo | String(25) | Yes | External code of the transporter |
| DriverNo | String(25) | Yes | External code of the driver |
| LotNo | String(40) | Yes | Lot |
| FarmNo | String(25) | Yes | External code of the property |
| ShedNo | Integer | Yes | External code of the Shed |
| CatchMethodNo | String(25) | No | Catch method |
| CatchCrewNo | String(25) | Yes | External code of the catch crew |
| CatchCrewSupervisorNo | String(25) | No | External code of the catch supervisor |
| AnimalAge | Integer | Yes | Animal age |
| CageQty | Integer | Yes | Cage quantity |
| AnimalPerCageQty | Integer | Yes | Quantity of animals per cage |
| DocumentNumber | String(25) | No | Receiving document number |
| ReferenceNumber | String(25) | No | Weighing order reference number |
| Notes | String(200) | No | Weighing order notes |
| LoadingOrderNumber | String(5) | No | Loading order number |
| IsActivatedQAPrope | Boolean | Yes | Indicates if there is Salmonella presence in the load |
| ExpectedAverageWeight | Float | No | Expected average weight of animals |
| PropertyKMDistance | String(20) | No | Distance in KM between property and slaughterhouse |
| QAAnalysisResult | QAAnalysisResultType | No | Enumerator with possible values for QA Analysis Result Type: arNotAssigned (Empty), arPresent (Present) or arAbsent (Absent) |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| AnimalWeighingOrderCode | Integer | Yes | Internal Weighing Order code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalWeighingOrder"' \
--header 'Content-Type: application/json' \
--data '{
"AnimalWeighingOrderNo": "AWO-0115001",
"BranchNo": "BR-001",
"WeighingEvent": "weNormal",
"AnimalWeighingOrderStatusType": "wsOpened",
"ScheduleDate": "2025-01-15T08:30:00",
"CatchDate": "2025-01-15T05:00:00",
"ScheduleSlaughterDate": "2025-01-16T07:00:00",
"VehiclePlateNo": "ABC1D23",
"VehicleNo": "VEH-402",
"TransporterNo": "TRP-012",
"DriverNo": "DRV-887",
"LotNo": "LT-2025-01892",
"FarmNo": "FRM-045",
"ShedNo": 3,
"CatchMethodNo": "CMT-02",
"CatchCrewNo": "CRW-155",
"CatchCrewSupervisorNo": "SUP-017",
"AnimalAge": 42,
"CageQty": 120,
"AnimalPerCageQty": 14,
"DocumentNumber": "DOC-77821",
"ReferenceNumber": "REF-14002",
"Notes": "",
"LoadingOrderNumber": "50310",
"IsActivatedQAPrope": true,
"ExpectedAverageWeight": 2.45,
"PropertyKMDistance": "78",
"QAAnalysisResult": "arPresent"
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"AnimalWeighingOrderCode": 1001
}
🐞 Possible Errors
| Code | Message |
|---|---|
| AWO‑001 | The provided External Live Bird Receiving Code parameter (AnimalWeighingOrderNo) already exists! |
| AWO‑002 | A Default Catch Supervisor was not found for the informed Farm (FarmNo)! |
| AWO‑003 | External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed! |
| AWO‑004 | The provided (AnimalPerCageQty) parameter "[value sent in request]" is outside the registered range. The range must be between "[Minimum quantity of animals per cage]" and "[Maximum quantity of animals per cage]"! |
| AWO‑010 | No plate was found for the vehicle code ("[value sent in request]") |
Animal Weighing Order Deletion
The PostDeleteAnimalWeighingOrder endpoint is responsible for executing the deletion of an Animal Weighing Order in the MIMS system.
How to delete an animal weighing order
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeleteAnimalWeighingOrder |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteAnimalWeighingOrder" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AnimalWeighingOrderNo | String(25) | Yes | External code of the Weighing Order |
| ErrorIfNotFound | Boolean | No | Returns error if the informed order does not exist in the database |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteAnimalWeighingOrder"' \
--header 'Content-Type: application/json' \
--data '{
"AnimalWeighingOrderNo": "1",
"ErrorIfNotFound": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}
🐞 Possible Errors
| Code | Message |
|---|---|
| AWO‑007 | The informed "AnimalWeighingOrderNo" cannot be deleted because there are other orders linked to it |
| AWO‑008 | The current status of the informed "AnimalWeighingOrderNo" ("[Weighing Order Status]") does not allow deletion! |
| AWO‑009 | The informed "AnimalWeighingOrderNo" has already been sent to the Handheld. It must be cancelled by the catch supervisor! |