post attention-events Endpoint

Sends alert data from activity monitoring devices to PULSE.

POST https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/attention-events

IMPORTANT: VAS currently supports the following data points for use in PULSE and DairyComp reports and worklists: 

When category=Health:

All other data sent to VAS will not be visible from PULSE and DairyComp.

Parameters (required)

In addition to the standard Authorization and API Key header parameters, the following are required: 

{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.

ContentTypestringREQUIRED

Use application/json

Request bodyREQUIRED

Format required for the POST request. See the details below in the Request Schema.

Request Schema

curl -X POST 
'https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/attention-events'  \
-H 'Authorization: bearer {authorization token}'  \
-H 'X-API-Key: {API key}'  \
-H 'Content-Type: application/json'  \
--data-raw '{
[
    {
        "resourceType": "AttentionEvent",
        "meta": {
            "source": "10.1.1.123",
            "sourceId": "10.1.1.234",
            "isDeleted": false,
            "modified": "2024-04-30T14:54:07.609Z",
            "created": "2024-04-30T14:54:07.609Z",
            "creator": "Technician123",
            "validFrom": "2024-04-30T14:54:07.609Z",
            "validTo": "2024-04-30T14:54:07.609Z"
        },
        "location": {
            "id": "{location}",
            "scheme": "com.vas.dairies.id"
        },
        "id": "{system name}",
        "eventDateTime": "2024-04-30T14:54:07.609Z",
        "animal": {
            "id": "123456789",
            "scheme": "com.vas.animals.id"
        },
        "alertEndDateTime": "2024-04-30T14:54:07.609Z",
        "category": "Health",
        "causes": ["AnimalTemperature"],
        "priority": "Urgent",
        "severity": "Moderate",
        "deviceAttentionScore": 106,
    }
]
}'

Response

A successful response is 201 Created. See API Errors and HTTP Status Code Details for other possible responses and errors.