Destinity Inspire
Vendor Onboarding Guide

Prepared by : Sachith Kalehe Watta
Team Destinity Inspire
Scienter Technologies (PTE) LTD
2026-01-20

Table of Contents

1. Vendor Integration Guide

1.1 Introduction

This guide explains how vendors (IPTV, Wifi, Key Card) can integrate with the Hospitality PMS WebSocket (WSS) platform to receive real-time guest and room events.

1.2 Architecture Overview

Vendor Application (IPTV, Wifi, Key Card) → OAuth 2.0 Token Endpoint → WebSocket Server (/subscriptions) → Real-time PMS Events → Vendor Application (IPTV, Wifi, Key Card)

1.3 Authentication & Token Flow

Vendors must obtain an OAuth 2.0 access token using the Client Credentials flow. Tokens are scoped per enterprise and expire after 60 minutes.

1.4 WebSocket Connection Lifecycle

After establishing a WebSocket connection, the client must immediately send a connection_init message with the access token and app key.

1.5 Event Subscription & Streaming

Subscriptions are created per property(s) (chainCode). Unauthorized chain codes are rejected server-side.

1.6 Sample Requests & Messages


OAuth Token – Sample cURL

curl --location 'https://destinity-wss.azurewebsites.net/oauth/v1/tokens' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <base64(clientId:clientSecret)>' \
--header 'x-app-key: APPKEY001' \
--header 'enterpriseId: BROWNS' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=urn:pms:events'

WebSocket Init

{
  "type": "connection_init",
  "payload": {
    "Authorization": "Bearer <access_token>",
    "x-app-key": "APPKEY001"
  }
}

Subscribe to Events

{
  "id": "sub-1",
  "type": "subscribe",
  "payload": {
    "query": "subscription { newEvent(input: { chainCode: \"TTE\" }) { metadata { offset } moduleName eventName detail { elementName oldValue newValue } } }"
  }
}

Subscribe to Events with Offset (subscribe again afetr a disconnect)

An offset is a sequence number assigned to each event by the PMS WebSocket server. If your vendor application disconnects and reconnects later, it must tell the server where it left off.
Use offset to: Continue from the last processed event. Avoid missing important guest updates


{
  "id": "sub-1",
  "type": "subscribe",
  "payload": {
    "query": "subscription { newEvent(input: { chainCode: \"HTBTTE\" }) { metadata { offset } moduleName eventName detail { elementName oldValue newValue } } }",
    "extensions": {
      "fromOffset": 42
    }
  }
}

1.7 Error Handling & Best Practices

2. Sequence Diagram


+------------------------+----------------------+----------------------+----------------------+
| Vendor Application     | Token Service        | WSS Server           | PMS Core             |
+------------------------+----------------------+----------------------+----------------------+
|                        |                      |                      |                      |
| ---- OAuth Token ----> |                      |                      |                      |
| <--- Access Token ---- |                      |                      |                      |
|                        |                      |                      |                      |
| ------------------------------- Connect (WSS) ---------------------> |                      |
|                        |                      |                      |                      |
| ---- connection_init (JWT) ---->              |                      |                      |
| <--- connection_ack ----------                |                      |                      |
|                        |                      |                      |                      |
| ---- subscribe (chainCode) --->               |                      |                      |
| <--- event (GuestCheckedIn) --- <-- PMS Event |                      |                      |
|                        |                      |                      |                      |
| ---- ping -------------------->               |                      |                      |
| <--- pong --------------------                |                      |                      |
|                        |                      |                      |                      |
+------------------------+----------------------+----------------------+----------------------+

3. Internal Operations Guide

3.1 Security Enforcement Model

All authorization is enforced via JWT claims. Chain codes are validated per subscription request.

3.2 Offset Management & Replay

Offsets are monotonically increasing per chain code and can be used for replay or recovery scenarios.

3.3 Multi-Property Isolation

Each client is restricted to its allowed propertie(s) using chain code. Single chain code can have access to multiple properties. Property mapping to chain code will done from the service configuration.

3.4 Operational Monitoring

Connection lifecycle, subscriptions, and event delivery are logged for auditing and diagnostics.

4. Working Samples (Verified)

4.1 Token Generation

curl --location 'https://destinity-wss.azurewebsites.net/oauth/v1/tokens' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic Y2xpZW50LWFwcC0wMDE6c2VjcmV0LTAwMQ==' \
--header 'x-app-key: APPKEY001' \
--header 'enterpriseId: BROWNS' \
--header 'X-Request-Id: 7f2a1a36-2e41-4b62-9d4f-5cfa8c1b52b2' \
--header 'Cookie: ARRAffinity=f4edef8e8ae33d792aa347f6380e743b9805a4dd08725995c30ae1f829052383; ARRAffinitySameSite=f4edef8e8ae33d792aa347f6380e743b9805a4dd08725995c30ae1f829052383' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=urn:pms:events'

4.2 WebSocket Subscription

URL : wss://destinity-wss.azurewebsites.net/subscriptions?key=QVBQS0VZMDAx

INIT

{
  "type": "connection_init",
  "payload": {
    "Authorization": "Bearer <access_token>",
    "x-app-key": "APPKEY001"
  }
}

SUBSCRIBE

{
  "id": "JlMGVmLTZhYWMtNDJlOC1iNWFmL",
  "type": "subscribe",
  "payload": {
    "query": "subscription { newEvent(input: { chainCode: \"TTE\" }) { metadata { offset } moduleName eventName detail { oldValue newValue elementName } } }"
  }
}

PING

{
  "type": "ping"
}

COMPLETE

{
  "id": "JlMGVmLTZhYWMtNDJlOC1iNWFmL",
  "type": "complete"
}

4. Support & Contact

Contact : Team Destinity Inspire
Email : sachithk@scienter.lk
Phone : +94 71 999 2193