server

Playtech.API. server

Methods

# (static) checkIfUsernameIsAvailable(options) → {Promise.<{usernameAvailable: boolean, phoneAvailable: boolean, emailAvailable: string, suggestions: Array.<string>}>}

Check if player's userName is available. If not, return also list of suggested userNames. See ims docs
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
userName string i.e. testplayer.
email string i.e. test@playtech.com.
phone string i.e. +1-555-55-55
country string i.e. Ukraine
token string <optional>
external verification token, e.g. from ReCaptcha.
Returns:
emailAvailable values: 'available', 'unavailable', 'unknown'
Type
Promise.<{usernameAvailable: boolean, phoneAvailable: boolean, emailAvailable: string, suggestions: Array.<string>}>
Example
Playtech.API.server.checkIfUsernameIsAvailable({
     userName: 'testplayer'
}).then((data) => { ... });

# (static) checkInDotComListenerRequest(options) → {Promise.<{actions: Object}>}

See ims docs
Parameters:
Name Type Description
options Object
Properties
Name Type Description
getParameters Array.<Object> get parameters of the request.
Properties
Name Type Description
key string
value string
requestContent string base64 content of the data received from CheckIn.com.
Returns:
Type
Promise.<{actions: Object}>
Example
Playtech.API.server.checkInDotComListenerRequest({
    getParameters: [{
        key: "pinNumber",
        value: "7924"
    }],
    "requestContent":"ew0KI..."
}).then((data) => { ... });

# (static) getJWTToken(serverUrl) → {Promise.<{data: {jwtToken: string}}>}

Request for get JWT token for Zendesk integration. ServerUrl - url to chat-admin server.
Parameters:
Name Type Description
serverUrl string
Returns:
Type
Promise.<{data: {jwtToken: string}}>
Example
Playtech.API.server.getJWTToken('https://www.example.com').then((data) => { ... });

# (static) getURLTemplate(options) → {Promise.<(string|undefined)>}

Retrieve URL template url with the highest priority from IMS. If "priority" parameter is passed, url with specified priority will be returned.
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
urlTypeList Array.<string>
priority number <optional>
priority of the specific url template
casinoName string <optional>
casinoName from CMS
clientSkin string <optional>
clientSkin from CMS
clientPlatform string <optional>
clientPlatform from device settings
clientType string <optional>
clientType from CMS
language string <optional>
user language
creferer string <optional>
creferer from user details
Returns:
Type
Promise.<(string|undefined)>
Example
Playtech.API.server.getURLTemplate({ urlTypeList: ['cashier'], priority: 1 }).then((url) => { ... });

# (static) getURLTemplates(options) → {Promise.<{data: {urlList: Array.<{priority: number, url: string, urlType: string}>}}>}

Retrieve URL templates from IMS. See ims docs
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
urlTypeList Array.<string>
casinoName string <optional>
casinoName from CMS
clientSkin string <optional>
clientSkin from CMS
clientPlatform string <optional>
clientPlatform from device settings
clientType string <optional>
clientType from CMS
language string <optional>
user language
creferer string <optional>
creferer from user details
Returns:
Type
Promise.<{data: {urlList: Array.<{priority: number, url: string, urlType: string}>}}>
Example
// {data:{urlList:[{urlType:"cashier",url:"https://core12.playtechgaming.com/quick-deposit?back_url=[back_url]",priority:1}],correlationId:"correlationId_24797775-56d7-4a92-881f-4a613e92537f"},ID:35845}
Playtech.API.server.getURLTemplates({ urlTypeList: ['cashier'] }).then((data) => { ... });

# (static) initiateDocumentUpload(options) → {Promise.<{data: {redirectURL: string, reference: string}}>}

Used to initiate Document upload for logged-in users. See ims docs
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
successUrl string
errorUrl string
service string <optional>
'netverify'
documentType string <optional>
remotePaymentAccountId string <optional>
Returns:
Type
Promise.<{data: {redirectURL: string, reference: string}}>
Example
Playtech.API.server.initiateDocumentUpload({
     errorUrl: 'https://error.com',
     documentType: 'PASSPORT',
     successUrl: 'https://success.com',
     remotePaymentAccountId: 'ePIl8ceR',
});

# (static) pasSend(actionName, callbackName, args) → {Promise.<{Object}>}

Call PAS action by name Hidden and only available in debug mode. Returns send to pas
Parameters:
Name Type Description
actionName string
callbackName string
args Array
Returns:
Type
Promise.<{Object}>
Example
Playtech.API.server.pasSend('iapiEmailLoginAndGetTempToken', 'iapiCALLOUT_LOGINANDGETTEMPTOKEN', [ 'userName', 'password', 1, 'languageCode']).then((data) => { ... });

# (static) registerPushApplication(options) → {Promise.<{Object}>}

Used to assign player personal device/browser. This device can later be used to push notifications. See ims docs
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
application string i.e. casino_mobile_2017.
deviceId string <optional>
Default value is taken from stored device settings.
pushId string <optional>
deviceType string <optional>
Values: 'ios', 'android', 'chrome', 'firefox'.
Returns:
Type
Promise.<{Object}>
Example
Playtech.API.server.registerPushApplication({
     application: 'TestApp',
     deviceId: 'asdf2dvaxdf',
     pushId: 'asdfasdrfqw34asdfzxcvq345dfgGDSFSDfasdfASDfasdfSDF',
     deviceType: 'android'
}).then(() => { ... });

# (static) send(ID) → {Promise.<{Object}>}

Hidden and only available in debug mode. Returns send function.
Parameters:
Name Type Description
ID string
Returns:
Depends on request
Type
Promise.<{Object}>
Example
Playtech.API.server.send({
     ID: 72057,
     description: 'Get JWT Token request',
     responses: [72058, 72059],
     serverUrl: 'https://www.example.com'
}).then((data) => { ... });