Skip to main content

Animal Type

The PostAddAnimalType endpoint is responsible for registering a new Animal Type in the MIMS system. This registration can be viewed on screen CAD160.


How to register an animal type

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddAnimalType
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalType"

Input Parameters

ParameterTypeRequiredDescription
AnimalTypeNoString(25)NoExternal code of the Animal Type
NameString(40)YesAnimal Type description
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
AnimalTypeCodeIntegerYesInternal Animal Type code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalType"' \
--header 'Content-Type: application/json' \
--data '{
"AnimalTypeNo": "AT001",
"Name": "Frango",
"OverwriteIfExists": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"AnimalTypeCode": 10
}

🐞 Possible Errors

CodeMessage
AAT‑001The provided External Animal Type Code parameter (AnimalTypeNo) already exists!