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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddAnimalType |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddAnimalType" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AnimalTypeNo | String(25) | No | External code of the Animal Type |
| Name | String(40) | Yes | Animal Type description |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| AnimalTypeCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| AAT‑001 | The provided External Animal Type Code parameter (AnimalTypeNo) already exists! |