| POST | /bets/place |
|---|
export enum BetSource
{
Landbase = 0,
Web = 1,
}
export class TransactionDtoBase
{
public transaction_id: string;
public transaction_time: string;
public transaction_amount: number;
public game_name: string;
public betting_place_id: string;
public betting_terminal_id: string;
public jmbg: string;
public passport_number: string;
public source: BetSource;
public identification_document_country: string;
public identification_document_type: string;
public constructor(init?: Partial<TransactionDtoBase>) { (Object as any).assign(this, init); }
}
export class TicketDto
{
public sy: string;
public nc: number;
public ac: number;
public e: RecordList<RecordList<IBetEvent>>;
public constructor(init?: Partial<TicketDto>) { (Object as any).assign(this, init); }
}
export enum BetType
{
Real = 0,
Promo = 1,
}
export class BetDto extends TransactionDtoBase
{
public min_odds: number;
public max_odds: number;
public min_win: number;
public max_win: number;
public min_bonus: number;
public max_bonus: number;
public max_payout: number;
public promo_amount: number;
public ticket_id: string;
public ticket: TicketDto;
public bet_type: BetType;
public constructor(init?: Partial<BetDto>) { super(init); (Object as any).assign(this, init); }
}
export class ReportBetPlacements
{
public betPlacements: RecordList<BetDto>;
public constructor(init?: Partial<ReportBetPlacements>) { (Object as any).assign(this, init); }
}
export class RecordList<T> extends Array<T>
{
public constructor(init?: Partial<RecordList<T>>) { super(); (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: api.prod-mnta.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
betPlacements:
[
{
min_odds: 0,
max_odds: 0,
min_win: 0,
max_win: 0,
min_bonus: 0,
max_bonus: 0,
max_payout: 0,
promo_amount: 0,
ticket_id: String,
ticket:
{
sy: String,
nc: 0,
ac: 0,
e:
[
[
{
}
]
]
},
bet_type: 0,
transaction_id: String,
transaction_time: 0001-01-01,
transaction_amount: 0,
game_name: String,
betting_place_id: String,
betting_terminal_id: String,
jmbg: String,
passport_number: String,
source: 0,
identification_document_country: String,
identification_document_type: String
}
]
}
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
}
}