FBiHBetting.Aggregator.WebApi

<back to all web services

ReportBetPlacements

The following routes are available for this service:
POST/bets/place
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class ReportBetPlacements
{
    open var betPlacements:ArrayList<BetPlacement>? = null
}

open class BetPlacement
{
    open var id:String? = null
    open var betCode:String? = null
    open var bettorState:BettorState? = null
    open var origin:Origin? = null
    open var betIssuedAt:Date? = null
    open var isLive:Boolean? = null
    open var isSystemBet:Boolean? = null
    open var payload:HashMap<String,String>? = null
    open var paymentOrigin:PaymentOrigin? = null
    open var payinRecap:PayinRecap? = null
    open var possiblePayoutRecap:PayoutRecap? = null
}

open class BettorState
{
    open var id:String? = null
    open var accountBalanceBeforeBet:BigDecimal? = null
    open var accountBalanceAfterBet:BigDecimal? = null
}

open class Origin
{
    open var device:Reference? = null
    open var location:Reference? = null
    open var locationGroup:Reference? = null
    open var organization:Reference? = null
    open var productInstance:ProductInstanceRef? = null
}

open class Reference
{
    open var id:String? = null
    open var value:String? = null
}

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

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

enum class ProductCategory(val value:Int)
{
    @SerializedName("0") Sportsbook(0),
    @SerializedName("1") Rng(1),
}

enum class PaymentOrigin(val value:Int)
{
    @SerializedName("0") Pos(0),
    @SerializedName("1") Sms(1),
    @SerializedName("2") Internet(2),
}

open class PayinRecap
{
    open var payin:BigDecimal? = null
    open var taxAmount:BigDecimal? = null
    open var stake:BigDecimal? = null
}

open class PayoutRecap
{
    open var winnings:BigDecimal? = null
    open var taxAmount:BigDecimal? = null
    open var payout:BigDecimal? = null
}

Kotlin ReportBetPlacements DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /bets/place HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"betPlacements":[{"id":"String","betCode":"String","bettorState":{"id":"String","accountBalanceBeforeBet":0,"accountBalanceAfterBet":0},"origin":{"device":{"id":"String","value":"String"},"location":{"id":"String","value":"String"},"locationGroup":{"id":"String","value":"String"},"organization":{"id":"String","value":"String"},"productInstance":{"id":"String","name":"String","product":{"id":"String","value":"String","category":0,"productProvider":{"id":"String","value":"String"}}}},"betIssuedAt":"0001-01-01T00:00:00.0000000Z","isLive":false,"isSystemBet":false,"payload":{"String":"String"},"paymentOrigin":0,"payinRecap":{"payin":0,"taxAmount":0,"stake":0},"possiblePayoutRecap":{"winnings":0,"taxAmount":0,"payout":0}}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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