Skip to main content

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 TypeExample URL
POST{{url_base}}/PostAddAnimalWeighingOrder
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalWeighingOrder"

Input Parameters

ParameterTypeRequiredDescription
AnimalWeighingOrderNoString(25)YesExternal code of the Weighing Order
BranchNoString(25)YesExternal code of the Branch
WeighingEventWeighingEventNoEnumerator with possible values for Weighing Order Type: weNormal (Normal), weIncident (Accident), weInTransit (In Transit), weDiverted (Diverted) or weChickenSale (Chicken Sale)
AnimalWeighingOrderStatusTypeAnimalWeighingOrderStatusTypeNoEnumerator with possible values for Weighing Order Status Type: wsOpened (Open) or wsBlocked (Blocked)
ScheduleDateDataHoraYesWeighing order schedule date
CatchDateDataHoraYesCatch date
ScheduleSlaughterDateDataHoraNoScheduled slaughter date
VehiclePlateNoString(10)YesVehicle plate
VehicleNoString(25)NoExternal code of the vehicle
TransporterNoString(25)YesExternal code of the transporter
DriverNoString(25)YesExternal code of the driver
LotNoString(40)YesLot
FarmNoString(25)YesExternal code of the property
ShedNoIntegerYesExternal code of the Shed
CatchMethodNoString(25)NoCatch method
CatchCrewNoString(25)YesExternal code of the catch crew
CatchCrewSupervisorNoString(25)NoExternal code of the catch supervisor
AnimalAgeIntegerYesAnimal age
CageQtyIntegerYesCage quantity
AnimalPerCageQtyIntegerYesQuantity of animals per cage
DocumentNumberString(25)NoReceiving document number
ReferenceNumberString(25)NoWeighing order reference number
NotesString(200)NoWeighing order notes
LoadingOrderNumberString(5)NoLoading order number
IsActivatedQAPropeBooleanYesIndicates if there is Salmonella presence in the load
ExpectedAverageWeightFloatNoExpected average weight of animals
PropertyKMDistanceString(20)NoDistance in KM between property and slaughterhouse
QAAnalysisResultQAAnalysisResultTypeNoEnumerator with possible values for QA Analysis Result Type: arNotAssigned (Empty), arPresent (Present) or arAbsent (Absent)

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
AnimalWeighingOrderCodeIntegerYesInternal 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

CodeMessage
AWO‑001The provided External Live Bird Receiving Code parameter (AnimalWeighingOrderNo) already exists!
AWO‑002A Default Catch Supervisor was not found for the informed Farm (FarmNo)!
AWO‑003External Transporter Code parameter (TransporterNo) belongs to a supplier that is not of type "Transporter". Operation not allowed!
AWO‑004The 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‑010No 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 TypeExample URL
POST{{url_base}}/PostDeleteAnimalWeighingOrder
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeleteAnimalWeighingOrder"

Input Parameters

ParameterTypeRequiredDescription
AnimalWeighingOrderNoString(25)YesExternal code of the Weighing Order
ErrorIfNotFoundBooleanNoReturns error if the informed order does not exist in the database

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard 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

CodeMessage
AWO‑007The informed "AnimalWeighingOrderNo" cannot be deleted because there are other orders linked to it
AWO‑008The current status of the informed "AnimalWeighingOrderNo" ("[Weighing Order Status]") does not allow deletion!
AWO‑009The informed "AnimalWeighingOrderNo" has already been sent to the Handheld. It must be cancelled by the catch supervisor!