detailed Endpoint
The pens/detailed
endpoint provides detailed information about a dairy's enabled pens.
|
|
PATH PARAMETERS | |
{dairyId}* |
VAS-specific |
QUERY PARAMETERS |
|
find |
Search query. |
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. |
field |
Sets the field value by which to sort results: PenNumber |
order |
Sets the display order: ascending, descending. If no parameter is defined, the results are returned in ascending order. |

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

{
"items": [
{
"id": 101,
"zoneId": 45,
"createdAt": "2018-03-22T16:54:08+00:00",
"updatedAt": "2018-03-22T16:54:08+00:00",
"penNumber": 0,
"penType": 0,
"description": "",
"capacity": 0,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": false,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 0,
"actualPenCount": 0,
"targetDryMatterPerHead": 0,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone
The term "Zone" represents different dairy locations. PULSE Platform Zones may be different physical dairy locations (for example, multiple locations across the state or country) or different user-defined locations within a single dairy site (for example, Pens 1-100 are Zone 1, Pens 101-200 are Zone 2, etc.).",
"herdCode": "12345678",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 0,
"remainingSpace": 0
},
{
"id": 102,
"zoneId": 45,
"createdAt": "2018-03-22T16:54:08+00:00",
"updatedAt": "2018-03-22T16:54:08+00:00",
"penNumber": 1,
"penType": 0,
"description": "",
"capacity": 35,
"isBullPen": false,
"isArtificialInseminationPen": true,
"isMilkingPen": true,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 0,
"actualPenCount": 7,
"targetDryMatterPerHead": 0,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone",
"herdCode": "12345678",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 20,
"remainingSpace": 28
},
{
"id": 103,
"zoneId": 45,
"createdAt": "2018-03-22T16:54:08+00:00",
"updatedAt": "2018-03-22T16:54:08+00:00",
"penNumber": 2,
"penType": 0,
"description": "",
"capacity": 182,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": true,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 0,
"actualPenCount": 174,
"targetDryMatterPerHead": 0,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone",
"herdCode": "12345678",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 95.6043956043956,
"remainingSpace": 8
},
{
"id": 104,
"zoneId": 45,
"createdAt": "2018-03-22T16:54:08+00:00",
"updatedAt": "2018-03-22T16:54:08+00:00",
"penNumber": 3,
"penType": 0,
"description": "",
"capacity": 222,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": true,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 0,
"actualPenCount": 226,
"targetDryMatterPerHead": 0,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone",
"herdCode": "12345678",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 101.8018018018018,
"remainingSpace": -4
},
],
"pageSize": 10,
"currentPage": 1,
"totalPages": 1,
"totalItems": 4
}

curl -X GET \
https://platform-vendor-api.vas.com/dairies/{dairyId}/pens/detailed?find=10&pageSize=4&order=descending \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}'

{
"items": [
{
"id": 2385,
"zoneId": 23,
"createdAt": "2019-01-22T17:32:29+00:00",
"updatedAt": "2019-01-22T18:32:01+00:00",
"penNumber": 121,
"penType": 0,
"description": null,
"capacity": 0,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": false,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 80,
"actualPenCount": 0,
"targetDryMatterPerHead": 40,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone",
"herdCode": "93547011",
"premiseId": "12345",
"penCost": 0,
"capacityPercentage": 0,
"remainingSpace": 0
},
{
"id": 2384,
"zoneId": 23,
"createdAt": "2019-01-21T18:39:51+00:00",
"updatedAt": "2019-01-22T18:10:01+00:00",
"penNumber": 120,
"penType": 0,
"description": null,
"capacity": 0,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": false,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 120,
"actualPenCount": 0,
"targetDryMatterPerHead": 97.635,
"animalCost": 0,
"zoneNumber": 0,
"zoneName": "Default Zone",
"herdCode": "93547011",
"premiseId": "12345",
"penCost": 0,
"capacityPercentage": 0,
"remainingSpace": 0
},
{
"id": 2348,
"zoneId": 80,
"createdAt": "2019-01-18T22:00:38+00:00",
"updatedAt": "2019-01-18T22:00:38+00:00",
"penNumber": 119,
"penType": 0,
"description": null,
"capacity": 0,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": false,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 15,
"actualPenCount": 0,
"targetDryMatterPerHead": 0.2,
"animalCost": 0,
"zoneNumber": 1,
"zoneName": "Test",
"herdCode": "5",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 0,
"remainingSpace": 0
},
{
"id": 2347,
"zoneId": 80,
"createdAt": "2019-01-18T20:58:22+00:00",
"updatedAt": "2019-01-18T20:58:22+00:00",
"penNumber": 118,
"penType": 0,
"description": null,
"capacity": 0,
"isBullPen": false,
"isArtificialInseminationPen": false,
"isMilkingPen": false,
"isDryPen": false,
"isHospitalPen": false,
"isCalfPen": false,
"isUserPen": false,
"isEnabled": true,
"isDeleted": false,
"feedingPenCount": 30,
"actualPenCount": 0,
"targetDryMatterPerHead": null,
"animalCost": 0,
"zoneNumber": 1,
"zoneName": "Test",
"herdCode": "5",
"premiseId": null,
"penCost": 0,
"capacityPercentage": 0,
"remainingSpace": 0
}
],
"pageSize": 4,
"currentPage": 1,
"totalPages": 16,
"totalItems": 62
}

Data Point |
Data Type |
Definition |
---|---|---|
id |
integer |
VAS-specific pen identifier |
zoneId |
integer |
Dairy zone to which the pen belongs |
createdAt |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
updatedAt |
string |
Date/time stamp (YYYY-MM-DDThh:mm:ss |
penNumber |
string |
Pen number |
penType |
integer |
Reserved for future use |
description |
string |
Pen description |
capacity |
integer |
Maximum number of animals the pen can contain |
isBullPen |
boolean |
Identifies the pen as a bull pen |
isArtificialInseminationPen |
boolean |
Identifies the pen as an artificial insemination pen |
isMilkingPen |
boolean |
Identifies the pen as a milking dairy cow pen |
isDryPen |
boolean |
Identifies the pen as dry (non-milking) pen |
isHospitalPen |
boolean |
Identifies the pen as a hospital pen |
isCalfPen |
boolean |
Identifies the pen as a calf pen |
isUserPen |
boolean |
Identifies the pen as a custom, user-defined pen |
isEnabled |
boolean |
Identifies the pen as active. By default, only enabled pens are included in the response. |
isDeleted |
boolean |
Identifies the pen as deleted |
feedingPenCount |
integer |
Number of animals in the pen being fed (to account for feed requirements) |
actualPenCount |
integer |
Total number of animals in the pen |
targetDryMatterPerHead |
number |
Amount of dry matter |
animalCost |
number |
Current cost of feeding an individual animal in the pen (per day) |
zoneNumber |
integer |
Zone to which the pen is assigned |
zoneName |
string |
Zone name |
herdCode |
string |
Herd code |
premiseId |
string |
Government-assigned premise identifier |
penCost |
number |
Current cost of feeding all animals in the pen (per day) |
capacityPercentage |
number |
Current number of animals as a percentage of the maximum number of animals the pen can contain |
remainingSpace |
integer |
Number of animals that can be added to the pen to reach capacity |

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.