Betting.WebApi

<back to all web services

AddLocationDevice

Requires Authentication
The following routes are available for this service:
POST/cmd/locations/devices/add
// @ts-nocheck

export enum DeviceUsageMode
{
    ClerkServiced = 0,
    Personal = 1,
    SelfService = 2,
    Unknown = -1,
}

export enum DeviceUserInterface
{
    Tablet = 0,
    Kiosk = 1,
    Default = 2,
    Unknown = -1,
}

export class Ref
{
    public id: string;
    public val: string;

    public constructor(init?: Partial<Ref>) { (Object as any).assign(this, init); }
}

export enum DeviceManagement
{
    Partner = 1,
    Platform = 2,
}

export class DeviceProfile
{
    public usageMode: DeviceUsageMode;
    public userInterface: DeviceUserInterface;
    public wallet?: Ref;
    public managedBy?: DeviceManagement;

    public constructor(init?: Partial<DeviceProfile>) { (Object as any).assign(this, init); }
}

export class Device
{
    public id?: string;
    public name?: string;
    public isActive: boolean;
    public profile?: DeviceProfile;
    public integrationsData?: RecordDictionary<string, string>;

    public constructor(init?: Partial<Device>) { (Object as any).assign(this, init); }
}

export class AddLocationDevice
{
    public id?: string;
    public device?: Device;

    public constructor(init?: Partial<AddLocationDevice>) { (Object as any).assign(this, init); }
}

export class Dictionary<T> { [Key: string]: T; }

export class RecordDictionary<TKey, TVal> extends Dictionary<TVal>
{

    public constructor(init?: Partial<RecordDictionary<TKey, TVal>>) { super(); (Object as any).assign(this, init); }
}

TypeScript AddLocationDevice DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
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/jsv
Content-Length: length

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