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-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}/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.