testdays Endpoint
The testdays
endpoint provides information and test day results for a dairy cow. All animals (live, sold, and dead) are included in the response for this endpoint.
|
|
PATH PARAMETERS | |
{dairyId}* |
VAS-specific |
{dairyCowId}* |
VAS-specific dairy cow identifier. This number is used in all VAS products, including PULSE and DairyComp 305. This identifier is unique to each animal in the VAS suite of products, and is the most stable and reliable source of animal identification data. dairyCowId differs from the animal's cowNumber, displayCowNumber, EID |
QUERY PARAMETERS |
|
lactation |
Period of time initiated at calving/freshening when milk production begins until the animal is dried off and stops producing milk. If no parameter is defined, the response reflects the current lactation. |
sinceDate |
Start date for which to include results (YYYY-MM-DD). If no parameter is defined, all results are returned. |
page |
Sets the page number to display in the results. If no parameter is defined, page 1 displays. |
pageSize |
Sets the number of items to display on one page of results. If no parameter is defined, the response includes 10 items per page. The maximum pageSize is 1000. |

curl -X GET \
https://platform-vendor-api.vas.com/dairies/{dairyId}/cows/{dairyCowId}/testdays \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}'

{
"items": [
{
"id": 1982868,
"createdAt": "2018-11-21T21:29:14+00:00",
"dairyCowId": 200594,
"lactation": 1,
"daysInMilk": 307,
"pen": {
"id": 0,
"penNumber": 0,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2017-12-03T08:00:00+00:00",
"milkWeight": 0,
"percentFat": 0,
"percentProtein": 0,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 26900,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 0,
"energyCorrectedMilkWeight": 0,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 99,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2018-11-21T21:29:14+00:00"
},
{
"id": 1982841,
"createdAt": "2018-11-21T21:29:14+00:00",
"dairyCowId": 200594,
"lactation": 1,
"daysInMilk": 277,
"pen": {
"id": 0,
"penNumber": 13,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2017-11-03T07:00:00+00:00",
"milkWeight": 66,
"percentFat": 4,
"percentProtein": 9,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 26800,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 71,
"energyCorrectedMilkWeight": 101,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 99,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2018-11-21T21:29:14+00:00"
},
{
"id": 1982815,
"createdAt": "2018-11-21T21:29:14+00:00",
"dairyCowId": 200594,
"lactation": 1,
"daysInMilk": 246,
"pen": {
"id": 0,
"penNumber": 11,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2017-10-03T07:00:00+00:00",
"milkWeight": 66,
"percentFat": 3.9,
"percentProtein": 8.8,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 26380,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 70,
"energyCorrectedMilkWeight": 99,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 97,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2018-11-21T21:29:14+00:00"
},
{
"id": 1982820,
"createdAt": "2018-11-21T21:29:14+00:00",
"dairyCowId": 200594,
"lactation": 1,
"daysInMilk": 216,
"pen": {
"id": 0,
"penNumber": 11,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2017-09-03T07:00:00+00:00",
"milkWeight": 66,
"percentFat": 3.9,
"percentProtein": 8.8,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 25750,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 70,
"energyCorrectedMilkWeight": 99,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 95,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2018-11-21T21:29:14+00:00"
},
{
"id": 1982821,
"createdAt": "2018-11-21T21:29:14+00:00",
"dairyCowId": 200594,
"lactation": 1,
"daysInMilk": 185,
"pen": {
"id": 0,
"penNumber": 6,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2017-08-03T07:00:00+00:00",
"milkWeight": 67,
"percentFat": 3.8,
"percentProtein": 8.8,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 25500,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 70,
"energyCorrectedMilkWeight": 100,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 94,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2018-11-21T21:29:14+00:00"
}
],
"pageSize": 10,
"currentPage": 1,
"totalPages": 1,
"totalItems": 5
}

curl -X GET \
https://platform-vendor-api.vas.com/dairies/{dairyId}/cows/{dairyCowId}/events?lactation=1&sinceDate=2019-05-04 \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}'

{
"items": [
{
"id": 1939432,
"createdAt": "2019-05-21T21:25:29+00:00",
"dairyCowId": 123456,
"lactation": 1,
"daysInMilk": 131,
"pen": {
"id": 0,
"penNumber": 5,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2019-05-21T07:00:00+00:00",
"milkWeight": 127,
"percentFat": 4,
"percentProtein": 8.9,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 35540,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 137,
"energyCorrectedMilkWeight": 194,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 121,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2019-05-21T21:25:29+00:00"
},
{
"id": 1939433,
"createdAt": "2019-06-04T21:25:29+00:00",
"dairyCowId": 123456,
"lactation": 1,
"daysInMilk": 100,
"pen": {
"id": 0,
"penNumber": 5,
"zoneId": 0,
"penType": 0,
"capacity": 0
},
"testDate": "2019-06-04T07:00:00+00:00",
"milkWeight": 132,
"percentFat": 3.9,
"percentProtein": 8.9,
"percentSolidsNotFat": 0,
"percentLactose": 0,
"milkUreaNitrogen": 0,
"matureEquivalentMilk": 33900,
"matureEquivalentFat": 0,
"matureEquivalentProtein": 0,
"matureEquivalentSolidsNotFat": 0,
"fatCorrectedMilkWeight": 141,
"energyCorrectedMilkWeight": 200,
"somaticCellCount": 0,
"logSomaticCellCount": 0,
"relativeValue": 116,
"conditionAffectingRecord": 0,
"testDayData": {},
"updatedAt": "2019-06-04T21:25:29+00:00"
}
],
"pageSize": 10,
"currentPage": 1,
"totalPages": 1,
"totalItems": 2
}

Data Point | Data Type | Definition | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
integer |
VAS-specific test day data identifier |
||||||||||||||||||
createdAt |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
||||||||||||||||||
dairyCowId |
integer |
VAS-specific dairy cow identifier. This number is used in all VAS products, including PULSE and DairyComp 305. This identifier is unique to each animal in the VAS suite of products, and is the most stable and reliable source of animal identification data. dairyCowId differs from the animal's cowNumber, displayCowNumber, EID, and isoId. |
||||||||||||||||||
lactation |
string |
Associated lactation number |
||||||||||||||||||
daysInMilk |
integer |
Number of days into current lactation. For dry cows, total days in most recent lactation prior to being dried off. |
||||||||||||||||||
![]()
|
||||||||||||||||||||
testDate |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
||||||||||||||||||
milkWeight |
number |
Volume of milk produced on the test day (24 hour period) |
||||||||||||||||||
percentFat |
number |
Milkfat percentage (by weight) in test day sample |
||||||||||||||||||
percentProtein |
number |
Protein percentage (by weight) in test day sample |
||||||||||||||||||
percentSolidsNotFat |
number |
Solids percentage, not including fat (by weight) in test day sample |
||||||||||||||||||
percentLactose |
number |
Lactose percentage (by weight) in test day sample |
||||||||||||||||||
milkUreaNitrogen |
number |
Urea nitrogen percentage (by weight) in test day sample |
||||||||||||||||||
matureEquivalentMilk |
integer |
Expected/calculated milk production at 305 days in milk with a mature equivalency to the rest of the herd and region based on breed, birth date, and fresh date |
||||||||||||||||||
matureEquivalentFat |
integer |
Expected/calculated milkfat percentage at 305 days in milk with a mature equivalency to the rest of the herd and region based on breed, birth date, and fresh date |
||||||||||||||||||
matureEquivalentProtein |
integer |
Expected/calculated protein percentage at 305 days in milk with a mature equivalency to the rest of the herd and region based on breed, birth date, and fresh date |
||||||||||||||||||
matureEquivalentSolidsNotFat |
integer |
Expected/calculated non-fat solid percentage at 305 days in milk with a mature equivalency to the rest of the herd and region based on breed, birth date, and fresh date |
||||||||||||||||||
fatCorrectedMilkWeight |
integer |
Fat-corrected milk (FCM |
||||||||||||||||||
energyCorrectedMilkWeight |
integer |
Amount of energy in the test day milk based on fat and protein, adjusted to 3.5% fat and 3.2% protein (in kCal) |
||||||||||||||||||
somaticCellCount |
integer |
Somatic cell count (SCC |
||||||||||||||||||
logSomaticCellCount |
number |
Log/linear conversion of the SCC value |
||||||||||||||||||
relativeValue |
integer |
Percentage of the animal's mature equivalent (ME) with the herd average |
||||||||||||||||||
conditionAffectingRecord |
integer |
Test day data missing due to illness or injury: 0: False 1: True |
||||||||||||||||||
testDayData |
Reserved for future use |
|||||||||||||||||||
updatedAt |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |

Status Code/Error | Description |
---|---|
200 OK
|
Standard response for a successful HTTP request. |
201 Created
|
A |
202 Accepted
|
The server accepted the request and will execute it at a later point. |
204 No Content
|
The server successfully executed the method but returns no response body. |
400 Bad Request
|
Bad request. Depending on the endpoint, additional error details may be sent in the response. Use the strategies below to troubleshoot the error:
NOTE: The resource URI is case-sensitive. If you are encountering unexpected 400 errors, check your URI for correct capitalization of resource names.
|
401 Unauthorized
|
Authentication failed due to invalid authentication credentials. |
403 Forbidden
|
You are not permitted to access this resource. |
404 Not Found
|
The resource could not be found. It is possible that the resource has been moved or deleted, or that there is a typo in your request. |
405 Method Not Allowed
|
The requested method and resource are not compatible. |
429 Too Many Requests
|
You sent too many requests within a given period and exceeded the rate limit. |
500 Internal Server Error
|
A VAS server error has occurred and the request cannot be fulfilled. |
502 Bad Gateway
|
The server did not receive a timely response from another server. |
503 Service Unavailable
|
The server is not available, usually due to overloading or maintenance issues. |
504 Gateway Timeout
|
The server, while acting as a gateway or proxy, cannot get a response in time. |
Last Built: November 21, 2024

The VAS Developer API is designed to align with industry standards, including NAAB National Association of Animal Breeders. www.naab-css.org and ICAR
International Committee for Animal Recording (ICAR) is a global organization focused on the standardization of animal identification, recording, genetic evaluation, and data management.. However, due to the customizable nature of VAS applications, we cannot guarantee that our users' data comply with industry standards. VAS partners' use of the API is at their sole discretion and risk. The VAS Developer API is provided "as is," including any potential errors or missing data.