milking-sessions Endpoint

Returns milking parlor visit data for all milking animals in the herd. Only live animals are included in the response for this endpoint. For additional data on daily milk, see daily-milking-averages Endpoint.

IMPORTANT:

GET https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/milking-sessions

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.

Sample Request (cURL)
curl -X GET \
https://integrations.prod.vas.com/api/locations/com.vas.dairies.id/{location-id}/milking-sessions \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}' 

Response Schema

Sample Response (JSON)
{
    "view": {
        "pageSize": 10,
        "currentPage": 1,
        "totalPages": 1,
        "totalItems": 1
    },
       "member": [
        {
            "animal": {
                "identifier": {
                    "id": "103264358",
                    "scheme": "com.vas.animals.id"
                }
            },
            "location": {
                "id": "679",
                "scheme": "com.vas.dairies.id"
            },
            "mostRecentMilkingSession": {                
                "milkingStartingDateTime": "2025-05-15T00:01:00.000Z",
                "milkingStartingDate": "2025-05-14T04:00:00+00:00",
                "milkingStartingTime": "00:01",
                "milkingShiftNumber": 2,
                "milkingBoxNumber": "45",
                "milkingDuration": {
                    "unitCode": "MIN",
                    "value": 4
                },
                "milkingPen": 2,
                "milkingMilkWeight": {
                    "unitCode": "KGM",
                    "value": 19.051
                }
            },
            "previousMilkingSessions": [
                {
                    "milkingMilkWeight": {
                        "unitCode": "KGM",
                        "value": 9.752
                    },
                    "milkingShiftNumber": 1,
                    "milkDate": "2024-10-27T15:35:00+00:00"
                },
                {
                    "milkingMilkWeight": {
                        "unitCode": "KGM",
                        "value": 17.917
                    },
                    "milkingShiftNumber": 1,
                    "milkDate": "2024-10-26T15:35:00+00:00"
                },
                {
                    "milkingMilkWeight": {
                        "unitCode": "KGM",
                        "value": 14.288
                    },
                    "milkingShiftNumber": 2,
                    "milkDate": "2024-10-26T15:35:00+00:00"
                },
                {
                    "milkingMilkWeight": {
                        "unitCode": "KGM",
                        "value": 16.783
                    },
                    "milkingShiftNumber": 3,
                    "milkDate": "2024-10-26T15:35:00+00:00"
                }
            ]
        }
    ]
}
NOTE: See API Errors and HTTP Status Code Details for a list of API errors and HTTP status codes.