Texecom Event Schemas

JSON Schema Documentation

Access Key Learn Status Payload

Payload emitted after a learn mode session initiated via PUT /api/commands/users/learn. keySlotId, keyValue, and usage are only present when group is key_added.

$idhttps://schemas.texecom-prod.com/v2/events/payload/cloud/internal/access_key/learn_status/v1.0.0.json
$schemahttp://json-schema.org/draft-07/schema

Properties

NameType
serialString
hardwareIdString
userIdString
groupString
timeoutSecondsInteger
keySlotIdString
keyValueInteger
usageOne of:String
Object
Object

serial

Description Panel serial number extracted from the MQTT topic path (device/{serial}/...).
TypeString
Required Yes

hardwareId

Description Panel primary key in the device service DB, resolved via serial lookup (device.hardware.hardware_id).
TypeString
Required Yes
Format uuid

userId

Description User the learn session was initiated for. Maps to LearnParams.user_id.
TypeString
Required Yes

group

Description Outcome of the learn mode session.
TypeString
Required Yes
Enum
  • key_added
  • duplicate_key
  • no_free_slots
  • learn_timeout
  • error

timeoutSeconds

Description Configured duration the system waited for a key to be presented. Maps to LearnParams.timeout.
TypeInteger
Required Yes

keySlotId

Description Slot the newly learned key was assigned to. Present only when group is key_added.
TypeString
Required No

keyValue

Description Raw numeric value of the learned credential. Present only when group is key_added.
TypeInteger
Required No

usage

Description Configured usage assigned to the key. Present only when group is key_added. Maps to LearnParams.usage.
TypeOne of:String
Object
Object
Required No

usage.0

TypeString
Enum
  • disarm

usage.1

TypeObject

usage.1.arm

TypeString

usage.2

TypeObject

usage.2.arm_toggle

TypeString

Schema

{
    "$id": "https://schemas.texecom-prod.com/v2/events/payload/cloud/internal/access_key/learn_status/v1.0.0.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "title": "Access Key Learn Status Payload",
    "description": "Payload emitted after a learn mode session initiated via PUT /api/commands/users/learn. keySlotId, keyValue, and usage are only present when group is key_added.",
    "type": "object",
    "properties": {
        "serial": {
            "description": "Panel serial number extracted from the MQTT topic path (device/{serial}/...).",
            "type": "string"
        },
        "hardwareId": {
            "description": "Panel primary key in the device service DB, resolved via serial lookup (device.hardware.hardware_id).",
            "type": "string",
            "format": "uuid"
        },
        "userId": {
            "description": "User the learn session was initiated for. Maps to LearnParams.user_id.",
            "type": "string"
        },
        "group": {
            "description": "Outcome of the learn mode session.",
            "type": "string",
            "enum": [
                "key_added",
                "duplicate_key",
                "no_free_slots",
                "learn_timeout",
                "error"
            ]
        },
        "timeoutSeconds": {
            "description": "Configured duration the system waited for a key to be presented. Maps to LearnParams.timeout.",
            "type": "integer"
        },
        "keySlotId": {
            "description": "Slot the newly learned key was assigned to. Present only when group is key_added.",
            "type": "string"
        },
        "keyValue": {
            "description": "Raw numeric value of the learned credential. Present only when group is key_added.",
            "type": "integer"
        },
        "usage": {
            "description": "Configured usage assigned to the key. Present only when group is key_added. Maps to LearnParams.usage.",
            "oneOf": [
                {
                    "type": "string",
                    "enum": [
                        "disarm"
                    ]
                },
                {
                    "type": "object",
                    "properties": {
                        "arm": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "arm"
                    ],
                    "additionalProperties": false
                },
                {
                    "type": "object",
                    "properties": {
                        "arm_toggle": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "arm_toggle"
                    ],
                    "additionalProperties": false
                }
            ]
        }
    },
    "required": [
        "serial",
        "hardwareId",
        "userId",
        "group",
        "timeoutSeconds"
    ],
    "additionalProperties": false
}