---
title: Get Animals by Location ID
slug: help/pulse/get-animals-by-location-id
docTags: 
createdAt: 2025-12-04T13:44:30.017Z
---

{
  "id": "mo94y8yozliAd55gWBCkr",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals",
    "servers": [
      {
        "url": "https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals"
      }
    ],
    "name": "Get Animals by Location ID",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "location-id",
          "type": "string<integer>",
          "description": "<p>VAS-specific [dairy] location identifier. For routes with “com.vas.dairies.id”, {location-id} is a VAS-specific dairy id.</p>"
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "integer",
          "description": "Sets the page number to display in the results. Defaults to 1.",
          "default": 1
        },
        {
          "kind": "optional",
          "name": "pageSize",
          "type": "integer",
          "description": "Sets the number of items to display on each page of results. Max 1000. Defaults to 10.",
          "default": 10
        },
        {
          "kind": "optional",
          "name": "meta-modified-from",
          "type": "string<date-time>",
          "description": "<p>Specifies a start date and time (optional) for which to include animals with updated data. Format as YYYY-MM-DD or YYYY-MM-DDThh:mm</p><div></div> (in 24-hour UTC time).<p></p>"
        },
        {
          "kind": "optional",
          "name": "meta-modified-to",
          "type": "string<date-time>",
          "description": "<p>Specifies an end date and time (optional) for which to include animals with updated data. Used with 'meta-modified-from' for a date range. Format as YYYY-MM-DD or YYYY-MM-DDThh:mm</p><div></div> (in 24-hour UTC time).<p></p>"
        },
        {
          "kind": "optional",
          "name": "lactation-zero",
          "type": "boolean",
          "description": "<p>Set to true to limit the response to non-lactating animals (lactation = 0), including heifers and bulls. Default includes all animals.</p>"
        },
        {
          "kind": "optional",
          "name": "lactating-only",
          "type": "boolean",
          "description": "<p>Set to true to limit the response to cows (lactation > 0). Default includes all animals.</p>"
        },
        {
          "kind": "optional",
          "name": "isArchived",
          "type": "boolean",
          "description": "Set to true to expand the response to include sold and dead animals from the last 90 days. Default includes only live animals."
        },
        {
          "kind": "optional",
          "name": "alternativeIdentifiers",
          "type": "array",
          "description": "Limits the response to animals with one or more alternativeIdentifiers. Options include: AnimalName, ControlNumber, ElectronicId, GenericResponder, GenericTransponder, NedapResponder1, NedapResponder2, ManagementNumber, RegistrationId, SCRResponder, VisualId.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "BearerAuth",
          "name": "BearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "Authentication using a Bearer token in the Authorization header.",
          "scheme": "bearer"
        },
        {
          "id": "ApiKeyAuth",
          "name": "X-API-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>API key required for access via the X-API-Key header.</p>",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "A list of animal records for the specified location.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"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\"}]},\"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}],\"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\"}],\"gender\":\"Male\",\"relation\":\"Genetic\",\"studCode\":\"29\",\"sireBreed\":\"H\"}],\"permanentString\":\"45\",\"isTwin\":false,\"lactation\":\"10\"}}]}",
            "description": "The top-level response object containing pagination info and the list of animal members.",
            "customType": "AnimalsResponse",
            "schema": [
              {
                "name": "view",
                "kind": "optional",
                "type": "object",
                "description": "Pagination information for the response.",
                "modelRef": "#/components/schemas/View",
                "customType": "View",
                "schema": [
                  {
                    "name": "pageSize",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "currentPage",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "totalPages",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "totalItems",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  }
                ]
              },
              {
                "name": "member",
                "kind": "optional",
                "type": "array",
                "description": "List of animal records.",
                "modelRef": "#/components/schemas/AnimalMember",
                "customType": "AnimalMember[]",
                "schema": [
                  {
                    "name": "meta",
                    "kind": "optional",
                    "type": "object",
                    "description": "Metadata related to the animal record creation and modification.",
                    "modelRef": "#/components/schemas/Meta",
                    "customType": "Meta",
                    "schema": [
                      {
                        "name": "created",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "Date/time stamp (YYYY-MM-DDThh:mm:ss+00:00 in UTC time) of when the animal record was created.",
                        "example": ""
                      },
                      {
                        "name": "modified",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "Date/time stamp (YYYY-MM-DDThh:mm:ss+00:00 in UTC time) of the last animal update.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "animal",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": [
                      {
                        "name": "identifier",
                        "kind": "optional",
                        "type": "object",
                        "description": "The primary unique VAS-specific animal identifier (dairy cow ID).",
                        "modelRef": "#/components/schemas/Identifier",
                        "customType": "Identifier",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                            "example": ""
                          },
                          {
                            "name": "scheme",
                            "kind": "required",
                            "type": "string",
                            "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "alternativeIdentifiers",
                        "kind": "optional",
                        "type": "array",
                        "description": "Other animal identifiers like ManagementNumber, ElectronicId, etc.",
                        "modelRef": "#/components/schemas/Identifier",
                        "customType": "Identifier[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                            "example": ""
                          },
                          {
                            "name": "scheme",
                            "kind": "required",
                            "type": "string",
                            "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "location",
                    "kind": "optional",
                    "type": "object",
                    "description": "The VAS-specific dairy location identifier for the animal.",
                    "modelRef": "#/components/schemas/Identifier",
                    "customType": "Identifier",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                        "example": ""
                      },
                      {
                        "name": "scheme",
                        "kind": "required",
                        "type": "string",
                        "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "animalDetail",
                    "kind": "optional",
                    "type": "object",
                    "description": "Detailed current status information for the animal.",
                    "modelRef": "#/components/schemas/AnimalDetail",
                    "customType": "AnimalDetail",
                    "schema": [
                      {
                        "name": "specie",
                        "kind": "optional",
                        "type": "string<Cattle>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "gender",
                        "kind": "optional",
                        "type": "string<Male | Female>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "birthDate",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "primaryBreed",
                        "kind": "optional",
                        "type": "object",
                        "description": "The primary breed of the animal.",
                        "modelRef": "#/components/schemas/Identifier",
                        "customType": "Identifier",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                            "example": ""
                          },
                          {
                            "name": "scheme",
                            "kind": "required",
                            "type": "string",
                            "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "managementTag",
                        "kind": "optional",
                        "type": "string",
                        "description": "Animal's cowNumber/management number.",
                        "example": ""
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "Animal name.",
                        "example": ""
                      },
                      {
                        "name": "productionPurpose",
                        "kind": "optional",
                        "type": "string<Milk>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "status",
                        "kind": "optional",
                        "type": "string<Alive>",
                        "description": "The condition of the animal. Only 'Alive' is applicable for default endpoint use.",
                        "example": ""
                      },
                      {
                        "name": "reproductionStatus",
                        "kind": "optional",
                        "type": "string<Open | DoNotBreed | Birthed | Inseminated | Pregnant | Null>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "lactationStatus",
                        "kind": "optional",
                        "type": "string<Lactating | Fresh | Dry | Null>",
                        "description": "",
                        "example": ""
                      },
                      {
                        "name": "permanentNote",
                        "kind": "optional",
                        "type": "string",
                        "description": "Special note for the animal, which is user-defined.",
                        "example": ""
                      },
                      {
                        "name": "bloodSerumLevel",
                        "kind": "optional",
                        "type": "number<float>",
                        "description": "Animal's blood serum level.",
                        "example": ""
                      },
                      {
                        "name": "currentMeatWithdrawalDate",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "Date/time stamp of beef (meat) withdrawal period end.",
                        "example": ""
                      },
                      {
                        "name": "currentMilkWithdrawalDate",
                        "kind": "optional",
                        "type": "string<date-time>",
                        "description": "Date/time stamp of milk withdrawal period end.",
                        "example": ""
                      },
                      {
                        "name": "previousManagementNumber",
                        "kind": "optional",
                        "type": "integer",
                        "description": "Animal’s old managementNumber if recently assigned a new one.",
                        "example": 0
                      },
                      {
                        "name": "offspring",
                        "kind": "optional",
                        "type": "array",
                        "description": "Details about a single offspring of the animal.",
                        "modelRef": "#/components/schemas/Offspring",
                        "customType": "Offspring[]",
                        "schema": [
                          {
                            "name": "identifier",
                            "kind": "optional",
                            "type": "object",
                            "description": "The identifier of the offspring, typically the managementNumber.",
                            "modelRef": "#/components/schemas/Identifier",
                            "customType": "Identifier",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                                "example": ""
                              },
                              {
                                "name": "scheme",
                                "kind": "required",
                                "type": "string",
                                "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "recentOffspring",
                            "kind": "optional",
                            "type": "integer",
                            "description": "The order [number] that the offspring was recorded.",
                            "example": 0
                          }
                        ]
                      },
                      {
                        "name": "parentage",
                        "kind": "optional",
                        "type": "array",
                        "description": "Genetic parentage data including sire, dam, and maternal grandsire information.",
                        "modelRef": "#/components/schemas/ParentageItem",
                        "customType": "ParentageItem[]",
                        "schema": [
                          {
                            "name": "parentOf",
                            "kind": "optional",
                            "type": "object",
                            "description": "The identifier of the child animal. Present for direct parents (Sire/Dam).",
                            "modelRef": "#/components/schemas/Identifier",
                            "customType": "Identifier",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                                "example": ""
                              },
                              {
                                "name": "scheme",
                                "kind": "required",
                                "type": "string",
                                "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "maternalGrandParentOf",
                            "kind": "optional",
                            "type": "object",
                            "description": "The identifier of the animal this grand-parent is related to. Present for grandparents.",
                            "modelRef": "#/components/schemas/Identifier",
                            "customType": "Identifier",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                                "example": ""
                              },
                              {
                                "name": "scheme",
                                "kind": "required",
                                "type": "string",
                                "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "identifier",
                            "kind": "required",
                            "type": "object",
                            "description": "The primary ID of the parent/sire/dam.",
                            "modelRef": "#/components/schemas/Identifier",
                            "customType": "Identifier",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                                "example": ""
                              },
                              {
                                "name": "scheme",
                                "kind": "required",
                                "type": "string",
                                "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "alternativeIdentifiers",
                            "kind": "optional",
                            "type": "array",
                            "description": "Other identifiers for the parent/sire/dam.",
                            "modelRef": "#/components/schemas/Identifier",
                            "customType": "Identifier[]",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "The unique identifier value within the defined scheme. Can be a string, integer, or null.",
                                "example": ""
                              },
                              {
                                "name": "scheme",
                                "kind": "required",
                                "type": "string",
                                "description": "The identifier scheme or domain (e.g., com.vas.animals.id).",
                                "example": ""
                              }
                            ]
                          },
                          {
                            "name": "gender",
                            "kind": "required",
                            "type": "string<Male | Female>",
                            "description": "",
                            "example": ""
                          },
                          {
                            "name": "relation",
                            "kind": "required",
                            "type": "string<Genetic>",
                            "description": "",
                            "example": ""
                          },
                          {
                            "name": "studCode",
                            "kind": "optional",
                            "type": "string",
                            "description": "Semen company identification (for sires).",
                            "example": ""
                          },
                          {
                            "name": "sireBreed",
                            "kind": "optional",
                            "type": "string",
                            "description": "Sire breed name abbreviation.",
                            "example": ""
                          },
                          {
                            "name": "damBreed",
                            "kind": "optional",
                            "type": "string",
                            "description": "Dam breed name abbreviation.",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "permanentString",
                        "kind": "optional",
                        "type": "string",
                        "description": "User-defined value that identifies the animal as part of a group.",
                        "example": ""
                      },
                      {
                        "name": "isTwin",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "Identifies the animal as a twin.",
                        "example": ""
                      },
                      {
                        "name": "lactation",
                        "kind": "optional",
                        "type": "string",
                        "description": "Current lactation number (often returned as a string).",
                        "example": ""
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/AnimalsResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "API Errors and HTTP Status Code Details.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "oZDwCCkwKvFc9l6SF7vr-",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals?page=1&pageSize=10' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "6icQUpKxWA0fLBK9U8Xes",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals?page=1&pageSize=10\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ICtGzNdSM1rlZKh8bM4Ez",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals?page=1&pageSize=10\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qMgy3p9Vp2N4Z3k8QUCJA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/animals?page=1&pageSize=10\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "oZDwCCkwKvFc9l6SF7vr-"
    },
    "results": {
      "languages": [
        {
          "id": "wdCfgcnFHhTod28reyY1v",
          "language": "200",
          "code": "// A list of animal records for the specified location.\n{\n  \"view\": {\n    \"pageSize\": 0,\n    \"currentPage\": 0,\n    \"totalPages\": 0,\n    \"totalItems\": 0\n  },\n  \"member\": [\n    {\n      \"meta\": {\n        \"created\": \"\",\n        \"modified\": \"\"\n      },\n      \"animal\": {\n        \"identifier\": {\n          \"id\": \"\",\n          \"scheme\": \"\"\n        },\n        \"alternativeIdentifiers\": [\n          {\n            \"id\": \"\",\n            \"scheme\": \"\"\n          }\n        ]\n      },\n      \"location\": {\n        \"id\": \"\",\n        \"scheme\": \"\"\n      },\n      \"animalDetail\": {\n        \"specie\": \"\",\n        \"gender\": \"\",\n        \"birthDate\": \"\",\n        \"primaryBreed\": {\n          \"id\": \"\",\n          \"scheme\": \"\"\n        },\n        \"managementTag\": \"\",\n        \"name\": \"\",\n        \"productionPurpose\": \"\",\n        \"status\": \"\",\n        \"reproductionStatus\": \"\",\n        \"lactationStatus\": \"\",\n        \"permanentNote\": \"\",\n        \"bloodSerumLevel\": \"\",\n        \"currentMeatWithdrawalDate\": \"\",\n        \"currentMilkWithdrawalDate\": \"\",\n        \"previousManagementNumber\": 0,\n        \"offspring\": [\n          {\n            \"identifier\": {\n              \"id\": \"\",\n              \"scheme\": \"\"\n            },\n            \"recentOffspring\": 0\n          }\n        ],\n        \"parentage\": [\n          {\n            \"parentOf\": {\n              \"id\": \"\",\n              \"scheme\": \"\"\n            },\n            \"maternalGrandParentOf\": {\n              \"id\": \"\",\n              \"scheme\": \"\"\n            },\n            \"identifier\": {\n              \"id\": \"\",\n              \"scheme\": \"\"\n            },\n            \"alternativeIdentifiers\": [\n              {\n                \"id\": \"\",\n                \"scheme\": \"\"\n              }\n            ],\n            \"gender\": \"\",\n            \"relation\": \"\",\n            \"studCode\": \"\",\n            \"sireBreed\": \"\",\n            \"damBreed\": \"\"\n          }\n        ],\n        \"permanentString\": \"\",\n        \"isTwin\": false,\n        \"lactation\": \"\"\n      }\n    }\n  ]\n}"
        },
        {
          "id": "sntx8XfFxFPvOxhTkKh1S",
          "language": "default",
          "code": "// API Errors and HTTP Status Code Details.\n"
        }
      ],
      "selectedLanguageId": "wdCfgcnFHhTod28reyY1v"
    }
  },
  "children": [
    {
      "text": "",
      "id": "YYISMpwtM1OgZr8QdCUv6"
    }
  ]
}