FBiHBetting.Aggregator.WebApi

<back to all web services

ReportBetPlacements

The following routes are available for this service:
POST/bets/place
import Foundation
import ServiceStack

public class ReportBetPlacements : Codable
{
    public var betPlacements:[BetPlacement]

    required public init(){}
}

public class BetPlacement : Codable
{
    public var id:String
    public var betCode:String
    public var bettorState:BettorState
    public var origin:Origin
    public var betIssuedAt:Date
    public var isLive:Bool
    public var isSystemBet:Bool
    public var payload:[String:String]
    public var paymentOrigin:PaymentOrigin
    public var payinRecap:PayinRecap
    public var possiblePayoutRecap:PayoutRecap

    required public init(){}
}

public class BettorState : Codable
{
    public var id:String
    public var accountBalanceBeforeBet:Double
    public var accountBalanceAfterBet:Double

    required public init(){}
}

public class Origin : Codable
{
    public var device:Reference
    public var location:Reference
    public var locationGroup:Reference
    public var organization:Reference
    public var productInstance:ProductInstanceRef

    required public init(){}
}

public class Reference : Codable
{
    public var id:String
    public var value:String

    required public init(){}
}

public class ProductInstanceRef : Codable
{
    public var id:String
    public var name:String
    public var product:ProductReference

    required public init(){}
}

public class ProductReference : Codable
{
    public var id:String
    public var value:String
    public var category:ProductCategory
    public var productProvider:Reference

    required public init(){}
}

public enum ProductCategory : Int, Codable
{
    case Sportsbook = 0
    case RNG = 1
}

public enum PaymentOrigin : Int, Codable
{
    case POS = 0
    case SMS = 1
    case Internet = 2
}

public class PayinRecap : Codable
{
    public var payin:Double
    public var taxAmount:Double
    public var stake:Double

    required public init(){}
}

public class PayoutRecap : Codable
{
    public var winnings:Double
    public var taxAmount:Double
    public var payout:Double

    required public init(){}
}


Swift ReportBetPlacements 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 /bets/place HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
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-01,
			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: text/jsv
Content-Length: length

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