daily-milking-averages Endpoint

Returns average daily milking data for all milking animals in the herd. Only live animals are included in the response for this endpoint. For additional data on milk weights collected for animals in the herd, see milking-sessions Endpoint.

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

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}/daily-milking-averages \
-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"
            },
            "pen": {
                "identifier": {
                    "id": "103264358",
                    "scheme": "com.vas.pens.id"
                },
                "alternativeIdentifiers": [
                    {
                        "id": "1",
                        "scheme": "com.vas.pens.number"
                    }
                ]
            },
            "lactation": 2,
            "milkYieldAvg24h": {
                "unitCode": "LBR",
                "value": null
            },
            "milkYieldAvg7days": {
                "unitCode": "LBR",
                "value": null
            },
            "averageDate": "2024-10-27T15:35:00+00:00",
            "expectedDailyMilk": null,
            "deviationFromExpectedMilk": null,
            "weeklyMilkDeviation": null,
            "dmArimaDeviationFromExpected": null,
            "week4EstimatedMilk": 103,
            "week8EstimatedMilk": 112,
            "week12EstimatedMilk": 108,
            "week16EstimatedMilk": null,
            "week20EstimatedMilk": null,
            "week24EstimatedMilk": null
        }
    ]
}
NOTE: See API Errors and HTTP Status Code Details for a list of API errors and HTTP status codes.