pens/{penId}/animals Endpoint

Returns a listing of all animals in the pen and select details for each animal. Only live animals are included in the response for this endpoint.

GET https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/pens/{penId}/animals

Path Parameters (required)

The following parameters must be included in the request path for this endpoint: 

{location-id}integerREQUIRED

VAS-specificClosed A data value that originates from the VAS product line. [dairy] location identifier. For routes with “com.vas.dairies.id”, {location-id} is a VAS-specific dairy id.

{pen-id}integerREQUIRED

VAS-specific pen identifier

Sample Request (cURL)
curl -X GET \
https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/pens/{penId}/animals \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}' 
Sample Request (cURL) - with query parameter(s)
curl -X GET \
https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/pens/{penId}/animals?alternativeIdentifiers=VisualId \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}' 

Response Schema

Sample Response (JSON)
{
    "view": {
        "pageSize": 10,
        "currentPage": 1,
        "totalPages": 1,
        "totalItems": 3
    },
    "member": [
        {
            "meta": {
                "created": "2024-01-26T00:30:02+00:00",
                "modified": "2024-08-06T03:00:00+00:00"
            },
            "animal": {
                "identifier": {
                    "id": "102986389",
                    "scheme": "com.vas.animals.id"
                },
                "alternativeIdentifiers": [
                    {
                        "id": "6221",
                        "scheme": "com.vas.animals.managementNumber"
                    },
                    {
                        "id": "6221",
                        "scheme": "com.vas.animals.name"
                    },
                    {
                        "id": "81150004",
                        "scheme": "com.vas.animals.registrationId"
                    },
                    {
                        "id": "840003135314964",
                        "scheme": "com.vas.animals.electronicId"
                    },
                    {
                        "id": "6221",
                        "scheme": "com.vas.animals.controlNumber"
                    },
                    {
                        "id": "62211",
                        "scheme": "com.vas.animals.visualId"
                    },
                    {
                        "id": "6548436",
                        "scheme": "com.vas.animals.transponderNumber"
                    },
                    {
                        "id": "10F1216",
                        "scheme": "com.vas.animals.responderNumber"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder1"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder2"
                    },
                    {
                        "id": "982546546",
                        "scheme": "com.vas.animals.allflexTransponder"
                    }
                ]
            },
            "location": {
                "id": "11503",
                "scheme": "com.vas.dairies.id"
            },
            "animalDetail": {
                "specie": "Cattle",
                "gender": "Female",
                "birthDate": "2020-10-03T05:00:00+00:00",
                "primaryBreed": {
                    "id": "H",
                    "scheme": "com.vas.breed.code"
                },
                "managementTag": "6221",
                "name": "6221",
                "productionPurpose": "Milk",
                "status": "Alive",
                "reproductionStatus": "Birthed",
                "lactationStatus": "Fresh",
                "permanentNote": "W-6221",
                "bloodSerumLevel": 0,
                "currentMeatWithdrawalDate": "2023-11-11T08:00:00+00:00",
                "currentMilkWithdrawalDate": "2022-08-03T07:00:00+00:00",
                "previousManagementNumber": 6222,
                "offspring": [
                    {
                        "identifier": {
                            "id": "8138",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 1
                    },
                    {
                        "identifier": {
                            "id": "8137",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 2
                    },
                    {
                        "identifier": {
                            "id": "7148",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 3
                    }
                ],
                "parentage": [
                    {
                        "parentOf": {
                            "id": "102986389",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "688248",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "840000052805710",
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "29H13083",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "29",
                        "sireBreed": "H"
                    },
                    {
                        "parentOf": {
                            "id": "102986389",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": null,
                            "scheme": "com.vas.animals.dam.animal.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "SN73251",
                                "scheme": "com.vas.animals.dam.registrationId"
                            },
                            {
                                "id": "4785",
                                "scheme": "com.vas.animals.dam.name"
                            },
                            {
                                "id": "4785",
                                "scheme": "com.vas.animals.dam.managementNumber"
                            }
                        ],
                        "damBreed": "H",
                        "gender": "Female",
                        "relation": "Genetic"
                    },
                    {
                        "maternalGrandParentOf": {
                            "id": "102986389",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "709325",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": null,
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "10R2012",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "0",
                        "sireBreed": null
                    },
                    {
                        "maternalGreatGrandParentOf": {
                            "id": "102986389",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "709326",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": null,
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "10B1990",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "0",
                        "sireBreed": null
                    }
                ],
                "permanentString": "45",
                "isTwin": false,
                "lactation": "10"
            }
        },
            "meta": {
                "created": "2024-01-26T00:30:05+00:00",
                "modified": "2024-08-13T01:00:00+00:00"
            },
        {
            "animal": {
                "identifier": {
                    "id": "102986407",
                    "scheme": "com.vas.animals.id"
                },
                "alternativeIdentifiers": [
                    {
                        "id": "6620",
                        "scheme": "com.vas.animals.managementNumber"
                    },
                    {
                        "id": "6620",
                        "scheme": "com.vas.animals.name"
                    },
                    {
                        "id": "81150005",
                        "scheme": "com.vas.animals.registrationId"
                    },
                    {
                        "id": "840003215075201",
                        "scheme": "com.vas.animals.electronicId"
                    },
                    {
                        "id": "6620",
                        "scheme": "com.vas.animals.controlNumber"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.visualId"
                    },
                    {
                        "id": "0",
                        "scheme": "com.vas.animals.transponderNumber"
                    },
                    {
                        "id": "-",
                        "scheme": "com.vas.animals.responderNumber"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder1"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder2"
                    },
                    {
                        "id": "982",
                        "scheme": "com.vas.animals.allflexTransponder"
                    }
                ]
            },
            "location": {
                "id": "11503",
                "scheme": "com.vas.dairies.id"
            },
            "animalDetail": {
                "specie": "Cattle",
                "gender": "Female",
                "birthDate": "2020-10-03T05:00:00+00:00",
                "primaryBreed": {
                    "id": "H",
                    "scheme": "com.vas.breed.code"
                },
                "managementTag": "6620",
                "name": "6620",
                "productionPurpose": "Milk",
                "status": "Alive",
                "reproductionStatus": "Open",
                "lactationStatus": "Lactating",
                "permanentNote": "W-6620",
                "bloodSerumLevel": 0,
                "currentMeatWithdrawalDate": "2023-11-11T08:00:00+00:00",
                "currentMilkWithdrawalDate": "2019-12-25T08:00:00+00:00",
                "previousManagementNumber": 0,
                "offspring": [
                    {
                        "identifier": {
                            "id": "8681",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 1
                    },
                    {
                        "identifier": {
                            "id": "7580",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 2
                    },
                    {
                        "identifier": {
                            "id": "0",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 3
                    }
                ],
                "parentage": [
                    {
                        "parentOf": {
                            "id": "102986407",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "688260",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "840000062253367",
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "29H13846",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "29",
                        "sireBreed": "H"
                    },
                    {
                        "parentOf": {
                            "id": "102986407",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": null,
                            "scheme": "com.vas.animals.dam.animal.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "SG16993",
                                "scheme": "com.vas.animals.dam.registrationId"
                            },
                            {
                                "id": "5220",
                                "scheme": "com.vas.animals.dam.name"
                            },
                            {
                                "id": "5220",
                                "scheme": "com.vas.animals.dam.managementNumber"
                            }
                        ],
                        "damBreed": "H",
                        "gender": "Female",
                        "relation": "Genetic"
                    },
                    {
                        "maternalGrandParentOf": {
                            "id": "102986407",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "709327",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": null,
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "10R2013",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "0",
                        "sireBreed": null
                    },
                    {
                        "maternalGreatGrandParentOf": {
                            "id": "102986407",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "709328",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": null,
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "10B1991",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "0",
                        "sireBreed": null
                    }
                ],
                "permanentString": "45",
                "isTwin": false,
                "lactation": "9"
            }
        },
            "meta": {
                "created": "2024-01-26T00:34:55+00:00",
                "modified": "2024-07-17T14:06:33+00:00"
            },
        {
            "animal": {
                "identifier": {
                    "id": "102989028",
                    "scheme": "com.vas.animals.id"
                },
                "alternativeIdentifiers": [
                    {
                        "id": "10006",
                        "scheme": "com.vas.animals.managementNumber"
                    },
                    {
                        "id": "10006",
                        "scheme": "com.vas.animals.name"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.registrationId"
                    },
                    {
                        "id": "840003218887974",
                        "scheme": "com.vas.animals.electronicId"
                    },
                    {
                        "id": "10006",
                        "scheme": "com.vas.animals.controlNumber"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.visualId"
                    },
                    {
                        "id": "0",
                        "scheme": "com.vas.animals.transponderNumber"
                    },
                    {
                        "id": "-",
                        "scheme": "com.vas.animals.responderNumber"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder1"
                    },
                    {
                        "id": null,
                        "scheme": "com.vas.animals.nedapTransponder2"
                    },
                    {
                        "id": "5",
                        "scheme": "com.vas.animals.allflexTransponder"
                    }
                ]
            },
            "location": {
                "id": "11503",
                "scheme": "com.vas.dairies.id"
            },
            "animalDetail": {
                "specie": "Cattle",
                "gender": "Female",
                "birthDate": "2020-10-03T05:00:00+00:00",
                "primaryBreed": {
                    "id": "H",
                    "scheme": "com.vas.breed.code"
                },
                "managementTag": "10006",
                "name": "10006",
                "productionPurpose": "Milk",
                "status": "Alive",
                "reproductionStatus": "Inseminated",
                "lactationStatus": "Lactating",
                "permanentNote": "Y-10006",
                "bloodSerumLevel": 0,
                "currentMeatWithdrawalDate": "2023-05-19T07:00:00+00:00",
                "currentMilkWithdrawalDate": null,
                "previousManagementNumber": 0,
                "offspring": [
                    {
                        "identifier": {
                            "id": "0",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 1
                    },
                    {
                        "identifier": {
                            "id": "0",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 2
                    },
                    {
                        "identifier": {
                            "id": "0",
                            "scheme": "com.vas.animals.managementNumber"
                        },
                        "recentOffspring": 3
                    }
                ],
                "parentage": [
                    {
                        "parentOf": {
                            "id": "102989028",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "688507",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "840003014558956",
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "29H17947",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "29",
                        "sireBreed": "H"
                    },
                    {
                        "parentOf": {
                            "id": "102989028",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "102986360",
                            "scheme": "com.vas.animals.dam.animal.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "US003151403480",
                                "scheme": "com.vas.animals.dam.registrationId"
                            },
                            {
                                "id": "98",
                                "scheme": "com.vas.animals.dam.name"
                            },
                            {
                                "id": "98",
                                "scheme": "com.vas.animals.dam.managementNumber"
                            }
                        ],
                        "damBreed": "H",
                        "gender": "Female",
                        "relation": "Genetic"
                    },
                    {
                        "maternalGrandParentOf": {
                            "id": "102989028",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": null,
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": null,
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": null,
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": null,
                        "sireBreed": null
                    },
                    {
                        "maternalGreatGrandParentOf": {
                            "id": "102989028",
                            "scheme": "com.vas.animals.id"
                        },
                        "identifier": {
                            "id": "688263",
                            "scheme": "com.vas.sire.id"
                        },
                        "alternativeIdentifiers": [
                            {
                                "id": "840000063927723",
                                "scheme": "com.vas.sire.registrationId"
                            },
                            {
                                "id": "29H13664",
                                "scheme": "com.vas.sire.default"
                            }
                        ],
                        "gender": "Male",
                        "relation": "Genetic",
                        "studCode": "29",
                        "sireBreed": "H"
                    }
                ],
                "permanentString": "45",
                "isTwin": false,
                "lactation": "3"
            }
        }
    ]
}
NOTE: See API Errors and HTTP Status Code Details for a list of API errors and HTTP status codes.