prevlacts Endpoint
The prevlacts
endpoint provides information on previous lactations 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 |

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

{
"items": [
{
"lactation": 1,
"freshDate": "2017-02-27T08:00:00+00:00",
"conceptionDate": "2017-04-21T07:00:00+00:00",
"dryDate": "2017-11-24T08:00:00+00:00",
"totalMilk": 18190,
"totalFat": 678,
"totalProtein": 1564,
"totalFatCorrectedMilkWeight": 18857,
"totalEnergyCorrectedMilkWeight": 26693,
"matureEquivalentMilk": 27490,
"relativeValue": 99,
"daysOpen": 53,
"daysInMilk": 270,
"daysDry": 62,
"age": "1-10",
"id": 12345,
"createdAt": "2018-03-22T16:57:07+00:00",
"updatedAt": "2018-03-22T16:57:07+00:00"
},
{
"lactation": 2,
"freshDate": "2018-01-25T08:00:00+00:00",
"conceptionDate": null,
"dryDate": null,
"totalMilk": 454,
"totalFat": 142,
"totalProtein": 323,
"totalFatCorrectedMilkWeight": 2488,
"totalEnergyCorrectedMilkWeight": 4458,
"matureEquivalentMilk": 30070,
"relativeValue": 108,
"daysOpen": 449,
"daysInMilk": 449,
"daysDry": 0,
"age": "2-9",
"id": 0,
"createdAt": "2019-04-19T15:48:11.928284+00:00",
"updatedAt": null
}
]
}

Data Point | Data Type | Definition |
---|---|---|
lactation |
integer |
Associated lactation number |
freshDate |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
conceptionDate |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
dryDate |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
totalMilk |
integer |
Total milk produced in the associated lactation number (in weight) |
totalFat |
integer |
Total fat produced in the associated lactation number (in weight) |
totalProtein |
integer |
Total protein produced in the associated lactation number (in weight) |
totalFatCorrectedMilkWeight |
integer |
Total fat-corrected milk (FCM |
totalEnergyCorrectedMilkWeight |
integer |
Amount of energy in the milk in the associated lactation number based on milk, fat, and protein, adjusted to 3.5% fat and 3.2% protein (in kcal) |
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 |
relativeValue |
integer |
Percentage of the animal's mature equivalent (ME) with the herd average for the associated lactation number |
daysOpen |
integer |
Number of days open (not pregnant) for the 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. |
daysDry |
integer |
Number of days since dryDate event |
age |
string |
Animal age (years-months) |
id |
integer |
VAS-specific prevlact data identifier |
createdAt |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
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.