Betting.WebApi

<back to all web services

InstallProductInstance

Requires Authentication
The following routes are available for this service:
POST/cmd/products/instances
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 InstallProductInstance
{
    open var id:String? = null
    open var name:String? = null
    open var title:String? = null
    open var product:ProductReference? = null
    open var currency:Ref? = null
    open var bettingPolicies:BettingPolicies? = null
    open var apiUrl:String? = null
    open var backOfficeUrl:String? = null
    open var instanceUrl:String? = null
    open var feedPlayerUrl:String? = 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 Ref
{
    open var id:String? = null
    @SerializedName("val") open var Val:String? = null
}

open class BettingPolicies
{
    open var payinConstraints:RecordList<PayinConstraint>? = null
    open var payinTaxationPolicyId:String? = null
    open var winningsCaps:RecordList<WinningsCap>? = null
    open var winningsTaxationPolicyId:String? = null
}

open class RecordList<T> : ArrayList<T>()
{
}

open class PayinConstraint
{
    @SerializedName("type") open var Type:PayinConstraintType? = null
    open var min:Money? = null
    @SerializedName("default") open var Default:Money? = null
    open var warningThreshold:Money? = null
    open var max:Money? = null
}

enum class PayinConstraintType(val value:Int)
{
    @SerializedName("0") SingleBet(0),
    @SerializedName("1") MultiBet(1),
    @SerializedName("2") SystemBet(2),
}

open class Money
{
    open var amount:BigDecimal? = null
    open var currency:String? = null
}

open class WinningsCap
{
    @SerializedName("type") open var Type:WinningsCapType? = null
    open var cap:Money? = null
}

enum class WinningsCapType(val value:Int)
{
    @SerializedName("0") SingleBet(0),
    @SerializedName("1") MultiBet(1),
    @SerializedName("2") SystemBet(2),
}

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

{
	id: String,
	name: String,
	title: String,
	product: 
	{
		id: String,
		value: String,
		category: String,
		productProvider: 
		{
			id: String,
			val: String
		}
	},
	currency: 
	{
		id: String,
		val: String
	},
	bettingPolicies: 
	{
		payinConstraints: 
		[
			{
				type: 0,
				min: 
				{
					amount: 0,
					currency: String
				},
				default: 
				{
					amount: 0,
					currency: String
				},
				warningThreshold: 
				{
					amount: 0,
					currency: String
				},
				max: 
				{
					amount: 0,
					currency: String
				}
			}
		],
		payinTaxationPolicyId: String,
		winningsCaps: 
		[
			{
				type: 0,
				cap: 
				{
					amount: 0,
					currency: String
				}
			}
		],
		winningsTaxationPolicyId: String
	},
	apiUrl: String,
	backOfficeUrl: String,
	instanceUrl: String,
	feedPlayerUrl: 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
	}
}