post devices Endpoint
Sends transponder assignments from partner apps to PULSE, so you can manage transponder assignments directly in PULSE.
POST https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/devices
Parameters (required)
In addition to the standard Authorization and API Key header parameters, the following are required:
{location-id}integerREQUIRED
VAS-specific
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
The meta data specifies information about the data or event source.
URI or reverse DNS that identifies the source system
Unique identifier within the source system
Date/time stamp (YYYY-MM-DDThh:mm:ss
Coordinated Universal Time, also known as Greenwich Mean Time (GMT) time
Date/time stamp (YYYY-MM-DDThh:mm:ss
Person or system that created the resource
Date/time stamp (YYYY-MM-DDThh:mm:ss
Date/time stamp (YYYY-MM-DDThh:mm:ss
The location data specifies the animal's dairyId information.
VAS-specific dairy identifier
Identifies the data source as VAS: com.vas.dairies.id
The meta data specifies information about the manufacturer.
Unique device identifier at the location level in the source system
Device serial number
Device name (defined by the user)
The registration data includes device registration details.
Identifies the data source. Some examples: com.vas.transponder, com.vas.responder, com.vas.transponder.nedap, com.vas.transponder.nedap1, com.vas.transponder.nedap2, com.vas.transponder.allflex, com.vas.transponder.smaxtec, etc.
The animal data includes animal identification details.
VAS-specific dairy cow identifier for the animal associated with the device. 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
15-digit electronic ID number associated with the animal eartag, and isoId.
Identifies the data source as VAS: com.vas.animals.id
curl -X POST
'https://integrations.prod.vas.com/api/batches/locations/com.vas.dairies.id/{location-id}/devices' \
-H 'Authorization: bearer {authorization token}' \
-H 'X-API-Key: {API key}' \
-H 'Content-Type: application/json' \
--data-raw '[
{
"resourceType": "test_device",
"meta": {
"source": "test_device",
"sourceId": "test_device",
"modified": "2024-12-30T14:54:07.609Z",
"created": "2024-12-30T14:54:07.609Z",
"creator": "test_device",
"validFrom": "2024-12-30T14:54:07.609Z",
"validTo": "2024-12-30T14:54:07.609Z"
},
"location": {
"id": 123,
"scheme": "com.vas.dairies.id"
},
"manufacturer": {
"id": "manufacturer-001"
},
"id": "device-001",
"registration": {
"id": "11",
"scheme": "com.vas.transponder"
},
"animal": {
"id": "100001",
"scheme": "com.vas.animals.id"
}
},
{
"resourceType": "test_device",
"meta": {
"source": "test_device",
"sourceId": "test_device",
"modified": "2024-12-30T14:54:07.609Z",
"created": "2024-12-30T14:54:07.609Z",
"creator": "test_device",
"validFrom": "2024-12-30T14:54:07.609Z",
"validTo": "2024-12-30T14:54:07.609Z"
},
"location": {
"id": 123,
"scheme": "com.vas.dairies.id"
},
"manufacturer": {
"id": "manufacturer-001"
},
"id": "device-001",
"registration": {
"id": "11",
"scheme": "com.vas.transponder"
},
"animal": {
"id": "0",
"scheme": "com.vas.animals.id"
}
},
{
"resourceType": "test_device",
"meta": {
"source": "test_device",
"sourceId": "test_device",
"modified": "2024-12-30T14:54:07.609Z",
"created": "2024-12-30T14:54:07.609Z",
"creator": "test_device",
"validFrom": "2024-12-30T14:54:07.609Z",
"validTo": "2024-12-30T14:54:07.609Z"
},
"location": {
"id": 123,
"scheme": "com.vas.dairies.id"
},
"manufacturer": {
"id": "manufacturer-001"
},
"id": "device-001",
"registration": {
"id": "11",
"scheme": "com.vas.transponder"
},
"animal": {
"id": "100002",
"scheme": "com.vas.animals.id"
}
}
]'
Response
A successful response is 200 OK. The response may contain a set of batch results, potentially including warnings that list the warning type, severity, status, title, detail, and instance. See API Errors and HTTP Status Code Details for other possible responses and errors.
This example indicates that an animal was not found in this location:
[
{
"id": "123456",
"messages": null
},
{
"id": "123456",
"messages": [
{
"type": "urn:icar:problem:batch-item-failed",
"severity": "Error",
"status": 400,
"title": "ANIMAL_NOT_FOUND",
"detail": "DairyCow 123456 not found on dairy 11",
"instance": "/animal/123456"
}
]
}
]