Betting.WebApi

<back to all web services

InstallProductInstance

Requires Authentication
The following routes are available for this service:
POST/cmd/products/instances
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Betting.WebApi.ServiceModel
Imports Betting.Common
Imports Starnet.Common

Namespace Global

    Namespace Betting.Common

        Public Partial Class BettingPolicies
            Public Overridable Property PayinConstraints As RecordList(Of PayinConstraint)
            Public Overridable Property PayinTaxationPolicyId As String
            Public Overridable Property WinningsCaps As RecordList(Of WinningsCap)
            Public Overridable Property WinningsTaxationPolicyId As String
        End Class

        Public Partial Class PayinConstraint
            Public Overridable Property Type As PayinConstraintType
            Public Overridable Property Min As Money
            Public Overridable Property [Default] As Money
            Public Overridable Property WarningThreshold As Money
            Public Overridable Property Max As Money
        End Class

        Public Enum PayinConstraintType
            SingleBet = 0
            MultiBet = 1
            SystemBet = 2
        End Enum

        Public Partial Class ProductReference
            Public Overridable Property Id As String
            Public Overridable Property Value As String
            Public Overridable Property Category As String
            Public Overridable Property ProductProvider As Ref
        End Class

        Public Partial Class WinningsCap
            Public Overridable Property Type As WinningsCapType
            Public Overridable Property Cap As Money
        End Class

        Public Enum WinningsCapType
            SingleBet = 0
            MultiBet = 1
            SystemBet = 2
        End Enum
    End Namespace

    Namespace Betting.WebApi.ServiceModel

        Public Partial Class InstallProductInstance
            Public Overridable Property Id As String
            Public Overridable Property Name As String
            Public Overridable Property Title As String
            Public Overridable Property Product As ProductReference
            Public Overridable Property Currency As Ref
            Public Overridable Property BettingPolicies As BettingPolicies
            Public Overridable Property ApiUrl As String
            Public Overridable Property BackOfficeUrl As String
            Public Overridable Property InstanceUrl As String
            Public Overridable Property FeedPlayerUrl As String
        End Class
    End Namespace

    Namespace Starnet.Common

        Public Partial Class Money
            Public Overridable Property Amount As Decimal
            Public Overridable Property Currency As String
        End Class

        Public Partial Class RecordList(Of T)
            Inherits List(Of T)
        End Class

        Public Partial Class Ref
            Public Overridable Property Id As String
            Public Overridable Property Val As String
        End Class
    End Namespace
End Namespace

VB.NET InstallProductInstance DTOs

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

HTTP + OTHER

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

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