Betting.WebApi

<back to all web services

AddLocationDevice

Requires Authentication
The following routes are available for this service:
POST/cmd/locations/devices/add
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


open class AddLocationDevice
{
    open var id:String? = null
    open var device:Device? = null
}

open class Device
{
    open var id:String? = null
    open var name:String? = null
    open var isActive:Boolean? = null
    open var profile:DeviceProfile? = null
    open var integrationsData:RecordDictionary<String, String>? = null
}

open class DeviceProfile
{
    open var usageMode:DeviceUsageMode? = null
    open var userInterface:DeviceUserInterface? = null
    open var wallet:Ref? = null
    open var managedBy:DeviceManagement? = null
}

enum class DeviceUsageMode(val value:Int)
{
    @SerializedName("0") ClerkServiced(0),
    @SerializedName("1") Personal(1),
    @SerializedName("2") SelfService(2),
    @SerializedName("-1") Unknown(-1),
}

enum class DeviceUserInterface(val value:Int)
{
    @SerializedName("0") Tablet(0),
    @SerializedName("1") Kiosk(1),
    @SerializedName("2") Default(2),
    @SerializedName("-1") Unknown(-1),
}

open class Ref
{
    open var id:String? = null
    @SerializedName("val") open var Val:String? = null
}

enum class DeviceManagement(val value:Int)
{
    @SerializedName("1") Partner(1),
    @SerializedName("2") Platform(2),
}

open class RecordDictionary<TKey, TVal> : HashMap<TKey,TVal>()
{
}

Kotlin 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
	}
}