.. _Webhook_MessageFormat: ######################## Webhook - Message Format ######################## Message Header ************** * **x-api-message-signature**: Hex digest of an HMAC-SHA256 hash of selected message header values and the message body. See :ref:`message signature validation ` for more information. * **x-api-timestamp**: UTC timestamp at which the message is sent (different for a retry). * **x-api-message-retry**: Retry number (0 = first message). See :ref:`message retries ` for more information. * **x-api-message-type**: webhook message type. See :ref:`message types `. Other properties depend on this type. * **x-api-message-id**: Unique message ID (different for a retry). * **x-api-version**: webhook message version. Same version as in body. * **content-type**: 'text/plain; charset=utf-8, application/json' Message Body ************ .. _Webhook_MessageFormat_CommonProperties: Common Properties ================= Every webhook message has the following properties: * **moduleId** (string): ID of the module running on the gateway that sent the initial message. It can be empty when the event is sent by the device itself (for example, a device connection-state change). * **$type** (integer): webhook message type. See :ref:`message types `. Other properties depend on this type. * **version** (integer): webhook message version. Same version as in header. * **createdUtc** (ISO 8601 date/time string): UTC creation time of the webhook message (unchanged for a retry). * **reportedUtc** (ISO 8601 date/time string): UTC time reported by the asset or module. * **id** (UUID string): Unique message ID (unchanged for a retry). * **assetId** (string): unique gateway asset id :: { "moduleId": "RestApiModule1", "$type": 2, "version": 1, "createdUtc": "2026-11-20T10:56:56.0170712Z", "reportedUtc": "2026-11-20T10:56:47.056Z", "id": "7b1ad0e7-2759-48a4-8465-1a795f72c61c", "assetId": "10401990013-123004002" //...webhook message type specific properties } .. _Webhook_MessageFormat_SpecificProperties: Specific Properties ==================== **Gateway Asset Event** * **event.$type** (string): asset to cloud event type. See :ref:`event types `. Other event properties depend on this type. :: { //common properties "event":{ "$type": 1 //...gateway asset event specific properties } } **Gateway Module Event** * **event.$type** (string): module to cloud event type. See :ref:`event types `. Other event properties depend on this type. :: { //common properties "event":{ "$type": 2 //...gateway module event specific properties } } .. _Webhook_MessageFormat_MessageTypes: Message Types ************* * GatewayAssetEvent = 1, * GatewayModuleEvent = 2 .. _Webhook_MessageFormat_DeviceToCloudEventTypes: Device to Cloud Event Types *************************** * **generic** + ConnectionState = 1, + Error = 2, * **managementmodule** * **devicemodule** * **RestApiModule** + HalApiEvent = 300, * **zonecountingmodule** * **napelspaymentkioskmodule**