1. Help for Partners
  2. WebSocket - POS partners

Connection

First up you'll need to establish a connection to the Doshii WebSocket. Please check out this more detailed WebSocket guide

URL wss://socket.<environment>.doshii.co/pos/socket?token=<locationToken> 

If you're a Cloud POS Vendor then your connection is slightly different as you no longer need to connect for each location. 

URL wss://socket.<environment>.doshii.co/vendor/socket?token=<jwt>&vendor=<apiName> 

 The JWT token is built using the same technique described in POS Authentication with the only difference being the Vendor API Name is included rather than the location token.

"vendor": The POS Vendor API name
"timestamp": The current timestamp in EPOC-Seconds for validating the request expiry time, default is 10 minutes.

 

Parameters

Example

Event

{
    "type": "message",
    "data": {
       "doshii": {
            "pong": 1539144663417,
            "version": '3.2.123'
       }
    }
}