Betting.WebApi

<back to all web services

OpenLocation

Requires Authentication
The following routes are available for this service:
POST/cmd/locations
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 OpenLocation
{
    open var id:String? = null
    open var name:String? = null
    open var organization:RefEx? = null
    open var region:Ref? = null
    open var group:Ref? = null
    open var address:Address? = null
    open var devices:ArrayList<Device>? = null
    open var productInstances:ArrayList<ProductInstanceRef>? = null
    open var locale:Locale? = null
    open var integrationsData:HashMap<String,String>? = null
}

open class RefEx : Ref()
{
    @SerializedName("data") open var Data:RecordDictionary<String, String>? = null
}

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

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

open class Address
{
    open var street:String? = null
    open var city:String? = null
    open var state:String? = null
    open var postalCode:String? = null
    open var country:Ref? = null
    open var gps:GPSCoordinates? = null
    @SerializedName("data") open var Data:RecordDictionary<String, String>? = null
}

open class GPSCoordinates
{
    open var lat:Double? = null
    open var lng:Double? = null
}

open class Device
{
    open var id:String? = null
    open var name:String? = null
    open var isActive:Boolean? = null
    @SerializedName("type") open var Type:DeviceType? = null
    open var integrationsData:RecordDictionary<String, String>? = null
}

enum class DeviceType(val value:Int)
{
    @SerializedName("0") ClerkServicedKiosk(0),
    @SerializedName("1") PersonalOnline(1),
    @SerializedName("2") SelfServiceKiosk(2),
    @SerializedName("-1") Unknown(-1),
}

open class ProductInstanceRef
{
    open var id:String? = null
    open var name:String? = null
    open var title:String? = null
    open var product:ProductReference? = null
}

open class ProductReference
{
    open var id:String? = null
    open var value:String? = null
    open var category:String? = null
    open var productProvider:Ref? = null
}

open class Locale
{
    open var timeZone:Ref? = null
    open var currency:Ref? = null
    open var language:Ref? = null
}

Kotlin OpenLocation 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 HTTP/1.1 
Host: api.sbbet.ath.cx 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	name: String,
	organization: 
	{
		data: 
		{
			String: String
		},
		id: String,
		val: String
	},
	region: 
	{
		id: String,
		val: String
	},
	group: 
	{
		id: String,
		val: String
	},
	address: 
	{
		street: String,
		city: String,
		state: String,
		postalCode: String,
		country: 
		{
			id: String,
			val: String
		},
		gps: 
		{
			lat: 0,
			lng: 0
		},
		data: 
		{
			String: String
		}
	},
	devices: 
	[
		{
			id: String,
			name: String,
			isActive: False,
			type: 0,
			integrationsData: 
			{
				String: String
			}
		}
	],
	productInstances: 
	[
		{
			id: String,
			name: String,
			title: String,
			product: 
			{
				id: String,
				value: String,
				category: String,
				productProvider: 
				{
					id: String,
					val: String
				}
			}
		}
	],
	locale: 
	{
		timeZone: 
		{
			id: String,
			val: String
		},
		currency: 
		{
			id: String,
			val: String
		},
		language: 
		{
			id: String,
			val: String
		}
	},
	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
	}
}