Betting.WebApi

<back to all web services

InstallProductInstance

The following routes are available for this service:
POST/products/instances
InstallProductInstance Parameters:
NameParameterData TypeRequiredDescription
IdbodystringNo
NamebodystringNo
ProductbodyProductReferenceNo
ApiUrlbodystringNo
CurrencybodyReferenceNo
BettingPoliciesbodyBettingPoliciesNo
ProductReference Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ValueformstringNo
CategoryformstringNo
ProductProviderformReferenceNo
Reference Parameters:
NameParameterData TypeRequiredDescription
IdformstringNo
ValueformstringNo
BettingPolicies Parameters:
NameParameterData TypeRequiredDescription
PayinConstraintsformList<PayinConstraint>No
PayinTaxationPolicyIdformstringNo
WinningsCapsformList<WinningsCap>No
WinningsTaxationPolicyIdformstringNo
PayinConstraint Parameters:
NameParameterData TypeRequiredDescription
TypeformPayinConstraintTypeNo
MinformMoneyNo
DefaultformMoneyNo
WarningThresholdformMoneyNo
MaxformMoneyNo
PayinConstraintType Enum:
NameValue
SingleBet0
MultiBet1
SystemBet2
Money Parameters:
NameParameterData TypeRequiredDescription
AmountformdecimalNo
CurrencyformstringNo
WinningsCap Parameters:
NameParameterData TypeRequiredDescription
TypeformWinningsCapTypeNo
CapformMoneyNo
WinningsCapType Enum:
NameValue
SingleBet0
MultiBet1
SystemBet2

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

{
	id: String,
	name: String,
	product: 
	{
		id: String,
		value: String,
		category: String,
		productProvider: 
		{
			id: String,
			value: String
		}
	},
	apiUrl: String,
	currency: 
	{
		id: String,
		value: 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
	}
}
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
	}
}