{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-new-external-device-schema.json",
  "title": "NewExternalDevice",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-external-device-api-openapi.yml#/components/schemas/NewExternalDevice",
  "type": "object",
  "properties": {
    "uniqueId": {
      "type": "string",
      "description": "Unique ID of the new external device"
    },
    "mac": {
      "type": "string",
      "description": "MAC address of the new external device"
    },
    "bleMac": {
      "type": "string",
      "description": "BLE MAC address of the new external device"
    },
    "wifiMac": {
      "type": "string",
      "description": "Wi-Fi MAC address of the new external device"
    },
    "eddystoneMac": {
      "type": "string",
      "description": "Eddystone MAC address of the new external device"
    },
    "iBeaconMac": {
      "type": "string",
      "description": "iBeacon MAC address of the new external device"
    },
    "productName": {
      "type": "string",
      "description": "Product name of the new external device"
    },
    "productCode": {
      "type": "string",
      "description": "Product code of the new external device"
    },
    "alias": {
      "type": [
        "string",
        "null"
      ],
      "description": "Alternative description for the Device, stored only on Kontakt.io backend - it's not possible to read this value via Bluetooth directly from the Device itself. In Device Management App represented as a Notes."
    },
    "tags": {
      "description": "Comma-separated list of maximum 20 user-defined labels (no longer than 32 characters).",
      "type": "array",
      "maxItems": 20,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "maxLength": 32
      }
    },
    "deploymentStatus": {
      "$ref": "#/$defs/DeploymentStatus"
    },
    "category": {
      "$ref": "#/$defs/DeviceCategory"
    }
  },
  "$defs": {
    "DeploymentStatus": {
      "type": "string",
      "description": "Current deployment status of this device - e.g. whether is it deployed or not.\n\n`END_OF_LIFE` means the device is not going to be used anymore. Can occur for many reasons: battery dead, unserviceable device, contract with owning company was discontinued, etc.",
      "enum": [
        "TO_BE_DEPLOYED",
        "DEPLOYED",
        "END_OF_LIFE"
      ]
    },
    "DeviceCategory": {
      "type": "string",
      "enum": [
        "TAG",
        "INFRASTRUCTURE"
      ],
      "description": "Category of the device, whether it's a moving (TAG) or static (INFRASTRUCTURE) device."
    }
  }
}