Betting.WebApi

<back to all web services

AddLocationDevice

Requires Authentication
The following routes are available for this service:
POST/cmd/locations/devices/add
"use strict";
/** @typedef {number} */
export var DeviceUsageMode;
(function (DeviceUsageMode) {
    DeviceUsageMode[DeviceUsageMode["ClerkServiced"] = 0] = "ClerkServiced"
    DeviceUsageMode[DeviceUsageMode["Personal"] = 1] = "Personal"
    DeviceUsageMode[DeviceUsageMode["SelfService"] = 2] = "SelfService"
    DeviceUsageMode[DeviceUsageMode["Unknown"] = -1] = "Unknown"
})(DeviceUsageMode || (DeviceUsageMode = {}));
/** @typedef {number} */
export var DeviceUserInterface;
(function (DeviceUserInterface) {
    DeviceUserInterface[DeviceUserInterface["Tablet"] = 0] = "Tablet"
    DeviceUserInterface[DeviceUserInterface["Kiosk"] = 1] = "Kiosk"
    DeviceUserInterface[DeviceUserInterface["Default"] = 2] = "Default"
    DeviceUserInterface[DeviceUserInterface["Unknown"] = -1] = "Unknown"
})(DeviceUserInterface || (DeviceUserInterface = {}));
export class Ref {
    /** @param {{id?:string,val?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    val;
}
/** @typedef {number} */
export var DeviceManagement;
(function (DeviceManagement) {
    DeviceManagement[DeviceManagement["Partner"] = 1] = "Partner"
    DeviceManagement[DeviceManagement["Platform"] = 2] = "Platform"
})(DeviceManagement || (DeviceManagement = {}));
export class DeviceProfile {
    /** @param {{usageMode?:DeviceUsageMode,userInterface?:DeviceUserInterface,wallet?:Ref,managedBy?:DeviceManagement}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DeviceUsageMode} */
    usageMode;
    /** @type {DeviceUserInterface} */
    userInterface;
    /** @type {?Ref} */
    wallet;
    /** @type {?DeviceManagement} */
    managedBy;
}
export class Device {
    /** @param {{id?:string,name?:string,isActive?:boolean,profile?:DeviceProfile,integrationsData?:RecordDictionary<string, string>}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {?string} */
    name;
    /** @type {boolean} */
    isActive;
    /** @type {?DeviceProfile} */
    profile;
    /** @type {?RecordDictionary<string, string>} */
    integrationsData;
}
export class AddLocationDevice {
    /** @param {{id?:string,device?:Device}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    id;
    /** @type {?Device} */
    device;
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef  TVal {any} */
export class RecordDictionary extends Dictionary {
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript AddLocationDevice DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /cmd/locations/devices/add HTTP/1.1 
Host: api.bettor.webhop.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","device":{"id":"String","name":"String","isActive":false,"profile":{"usageMode":0,"userInterface":0,"wallet":{"id":"String","val":"String"},"managedBy":0},"integrationsData":{"String":"String"}}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}