alpha

This is a new service – your feedback will help us to improve it.

Animal

Register an animal

Response Codes and Explanations

Animal Registration is the event of an animal being reported to the system. The user can submit the request to register an animal in either synchronous or asynchronous mode.

Following submission of the animal registration using POST /animals, the system will validate the data content and return an immediate response indicating whether the content has been accepted for validation in case of async or the actual output in case of sync. The following response codes are possible:

  • Code 200. This response indicates the registration request submission has been successful, and the response contains the unique animal identifier for the registered animal.
  • Code 202. This response indicates that the data content has passed an initial syntax check and has been successfully queued by the system for further processing. The requestid field in the response contains a unique identifier generated by the system that the caller can use to track the progress of the registration request as it is validated by the system.
  • Code 400. This response indicates that the submission has been rejected by the system because some or all of the data supplied was found to be in error. The Error structure in the returned message provides a list of error codes, along with a textual description of each error. Additional information is provided in the errors, identifying the field or fields in the original submission that generated each error. Following an error response, the system discards the submitted data. The caller must correct the errors identified and resubmit the registration.
  • Code 500. This response indicates that something went wrong with the internal server and the request should be resubmitted.

In case when the request is submitted in async mode and once the registration request has been accepted by the system, the caller then calls GET /requeststatus/{requestId} repeatedly to track its progress through the validation process. The requestId parameter is the unique identifier returned in response to a successful POST /animals. This is used by the system to identify the transaction that is being queried. To prevent overloading the system, the caller should call GET /requeststatus/{requestId} a frequency no less than specified in the return parameter X-Retry-After.

Request Response Structure

Consider a scenario where a keeper registers an animal born at the holding (within the statutory time limit).

To register an animal, use the POST /animals endpoint, supplying the following information in the content body, with the resulting response:

Transaction Description
Keeper registering an animal at a holding
API / Endpoint
POST /animals
Header
x-Request-Mode : async
Content
{ 
  "species": "cattle", 
  "name": "Ian", 
  "sex": "male", 
  "productionType": "beef", 
  "identificationDate": "2023-11-13", 
  "geneticDam": { 
    "animalIdentifier": "UK654326123456" 
  }, 
  "sire": { 
    "animalIdentifier": "UK123456123456" 
  }, 
  "birth": { 
    "birthSite": { 
      "siteIdentifier": "27/811/2976", 
      "siteIdentifierType": "holdingNumber" 
     }, 
    "birthDate": "2023-11-13", 
    "birthYear": "2023", 
    "birthMark": "556773", 
    "assistedBirthFlag": "N", 
    "multipleBirthsFlag": "N" 
  }, 
   "registrationSiteIdentifier": "27/811/2976", 
  "registrationDate": "2024-09-07", 
  "registrationCategory": "birthRegistration", 
  "receivedDate": "2023-11-13" 
} 
Response 202
OK - Successful operation, async request has been accepted. Response headers contain request-id and retry-after to check the request status afterwards

Request id - used to check status of this request afterwards
Request correlation id
Retry-After - The number of seconds/minutes before you can call /requeststatus/{requestId} endpoint.

Payload Details

FieldDescription
SpeciesThe species of the animal (e.g., 'cattle') that was registered
NameName of the animal (if provided by keeper during registration)
SexSex of the registered animal
ProductionTypeThe type of livestock production a herd or animal is being kept for (for e.g. (Dairy, Meat, Beef, Laying)
IdentificationDate??
geneticDamFemale parent of an animal (Mother)
SireMale parent of an animal (Father)
surrogateDamA surrogate dam in livestock is an animal that carries a cloned embryo
birthSiteDetails of the Site where animals were born
SiteIdentierUnique Identifier for the type of Site
SiteIdentifierTypeType of Site - One of ("fsaNumber", "holdingNumber", "portNumber" "lipNumber")
birthDateDate of Birth of the animal being registered
birthYearBirth Year of the animal being registered
birthMarkMark of the animal being registered
assistedBirthFlagIf assistance was needed during the birth of the animal being registered
multipleBirthFlagif a birth was accompanied by more than one birth from the same dam.
registrationSiteIdentifierUnique identifier of the site where the animal was registered
registrationDateDate of animal's registration
registrationCategoryOne of: “birthRegistration”, “registration”
receivedDateDate when the registration request was received by Livestock Information Services