Six4Win.WebApi

<back to all web services

PlaceBet

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

Namespace Global

    Namespace Betting.Common

        Public Partial Class BettingApp
            Public Overridable Property Name As String
            Public Overridable Property Version As String
        End Class

        Public Partial Class Origin
            Public Overridable Property Application As BettingApp
            Public Overridable Property IP As String
            Public Overridable Property Organization As RefEx
            Public Overridable Property Region As Ref
            Public Overridable Property LocationGroup As Ref
            Public Overridable Property Location As RefEx
            Public Overridable Property Device As RefEx
            Public Overridable Property Clerk As Ref
        End Class
    End Namespace

    Namespace Six4Win.WebApi.ServiceModel

        Public Partial Class PlaceBet
            Public Overridable Property Id As String
            Public Overridable Property SlipId As String
            Public Overridable Property Bettor As Ref
            Public Overridable Property Origin As Origin
            Public Overridable Property PlacedAt As Date
            Public Overridable Property OrdinalOfAvailableRoundToAssignTo As Integer
            Public Overridable Property Content As String
            Public Overridable Property Stake As Decimal
            Public Overridable Property Payload As Dictionary(Of String, String)
        End Class
    End Namespace

    Namespace Starnet.Common

        Public Partial Class RecordDictionary(Of TKey, TVal)
            Inherits Dictionary(Of TKey, TVal)
        End Class

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

        Public Partial Class RefEx
            Inherits Ref
            Public Overridable Property Data As RecordDictionary(Of String, String)
        End Class
    End Namespace
End Namespace

VB.NET PlaceBet DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /cmd/bets HTTP/1.1 
Host: s4w2.api.bettor.cc 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","slipId":"String","bettor":{"id":"String","val":"String"},"origin":{"application":{"name":"String","version":"String"},"ip":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"locationGroup":{"id":"String","val":"String"},"location":{"data":{"String":"String"},"id":"String","val":"String"},"device":{"data":{"String":"String"},"id":"String","val":"String"},"clerk":{"id":"String","val":"String"}},"placedAt":"0001-01-01T00:00:00.0000000Z","ordinalOfAvailableRoundToAssignTo":0,"content":"String","stake":0,"payload":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

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