{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-entity-details-schema.json",
  "title": "EntityDetails",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-entity-integration-api-openapi.yml#/components/schemas/EntityDetails",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of entity"
    },
    "entityId": {
      "type": "string",
      "description": "Unique identifier of entity"
    },
    "entityTypeId": {
      "type": "string",
      "description": "ID of existing Entity Type"
    },
    "status": {
      "$ref": "#/$defs/EntityStatus"
    },
    "attributes": {
      "type": "array",
      "description": "Entity attributes",
      "items": {
        "$ref": "#/$defs/Attribute"
      }
    }
  },
  "required": [
    "name",
    "entityId",
    "entityTypeId",
    "status"
  ],
  "$defs": {
    "Attribute": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of attribute definition on EntityType level. If not provided attribute will be matched by name if the same name exists  If no match is found, the attribute will be ignored.\n"
        },
        "name": {
          "type": "string",
          "description": "The name of the attribute (e.g. \"Department\", \"Role\")."
        },
        "value": {
          "type": "string",
          "description": "The attribute's value (e.g. \"Radiology\", \"Technician\")."
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "EntityStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "DEACTIVATED",
        "DELETED"
      ],
      "description": "Indicates the current lifefcyle of the entity:   - `ACTIVE`: Fully operational.   - `DEACTIVATED`: Entity position data is collected, but not monitored by alert rules (alerts and notfications are disabled). - `DELETED`: Entity is archived and hidden from the UI. The `entityId` can be restored or re-registered with a new entity.\n"
    }
  }
}