| POST | /bets/place |
|---|
export class BettorState
{
public id: string;
public accountBalanceBeforeBet: number;
public accountBalanceAfterBet: number;
public constructor(init?: Partial<BettorState>) { (Object as any).assign(this, init); }
}
export class Reference
{
public id: string;
public value: string;
public constructor(init?: Partial<Reference>) { (Object as any).assign(this, init); }
}
export enum ProductCategory
{
Sportsbook = 0,
RNG = 1,
}
export class ProductReference
{
public id: string;
public value: string;
public category: ProductCategory;
public productProvider: Reference;
public constructor(init?: Partial<ProductReference>) { (Object as any).assign(this, init); }
}
export class ProductInstanceRef
{
public id: string;
public name: string;
public product: ProductReference;
public constructor(init?: Partial<ProductInstanceRef>) { (Object as any).assign(this, init); }
}
export class Origin
{
public device: Reference;
public location: Reference;
public locationGroup: Reference;
public organization: Reference;
public productInstance: ProductInstanceRef;
public constructor(init?: Partial<Origin>) { (Object as any).assign(this, init); }
}
export enum PaymentOrigin
{
POS = 0,
SMS = 1,
Internet = 2,
}
export class PayinRecap
{
public payin: number;
public taxAmount: number;
public stake: number;
public constructor(init?: Partial<PayinRecap>) { (Object as any).assign(this, init); }
}
export class PayoutRecap
{
public winnings: number;
public taxAmount: number;
public payout: number;
public constructor(init?: Partial<PayoutRecap>) { (Object as any).assign(this, init); }
}
export class BetPlacement
{
public id: string;
public betCode: string;
public bettorState: BettorState;
public origin: Origin;
public betIssuedAt: string;
public isLive: boolean;
public isSystemBet: boolean;
public payload: { [index:string]: string; };
public paymentOrigin: PaymentOrigin;
public payinRecap: PayinRecap;
public possiblePayoutRecap: PayoutRecap;
public constructor(init?: Partial<BetPlacement>) { (Object as any).assign(this, init); }
}
export class ReportBetPlacements
{
public betPlacements: BetPlacement[];
public constructor(init?: Partial<ReportBetPlacements>) { (Object as any).assign(this, init); }
}
TypeScript ReportBetPlacements DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}
}