Starnet.MontenegroTaxationAuthority.WebApi

<back to all web services

ReportBetPlacements

The following routes are available for this service:
POST/bets/place
"use strict";
/** @typedef {number} */
export var BetSource;
(function (BetSource) {
    BetSource[BetSource["Landbase"] = 0] = "Landbase"
    BetSource[BetSource["Web"] = 1] = "Web"
})(BetSource || (BetSource = {}));
export class TransactionDtoBase {
    /** @param {{transaction_id?:string,transaction_time?:string,transaction_amount?:number,game_name?:string,betting_place_id?:string,betting_terminal_id?:string,jmbg?:string,passport_number?:string,source?:BetSource,identification_document_country?:string,identification_document_type?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    transaction_id;
    /** @type {string} */
    transaction_time;
    /** @type {number} */
    transaction_amount;
    /** @type {string} */
    game_name;
    /** @type {string} */
    betting_place_id;
    /** @type {string} */
    betting_terminal_id;
    /** @type {string} */
    jmbg;
    /** @type {string} */
    passport_number;
    /** @type {BetSource} */
    source;
    /** @type {string} */
    identification_document_country;
    /** @type {string} */
    identification_document_type;
}
export class TicketDto {
    /** @param {{sy?:string,nc?:number,ac?:number,e?:RecordList<RecordList<IBetEvent>>}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    sy;
    /** @type {number} */
    nc;
    /** @type {number} */
    ac;
    /** @type {RecordList<RecordList<IBetEvent>>} */
    e;
}
/** @typedef {number} */
export var BetType;
(function (BetType) {
    BetType[BetType["Real"] = 0] = "Real"
    BetType[BetType["Promo"] = 1] = "Promo"
})(BetType || (BetType = {}));
export class BetDto extends TransactionDtoBase {
    /** @param {{min_odds?:number,max_odds?:number,min_win?:number,max_win?:number,min_bonus?:number,max_bonus?:number,max_payout?:number,promo_amount?:number,ticket_id?:string,ticket?:TicketDto,bet_type?:BetType,transaction_id?:string,transaction_time?:string,transaction_amount?:number,game_name?:string,betting_place_id?:string,betting_terminal_id?:string,jmbg?:string,passport_number?:string,source?:BetSource,identification_document_country?:string,identification_document_type?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    min_odds;
    /** @type {number} */
    max_odds;
    /** @type {number} */
    min_win;
    /** @type {number} */
    max_win;
    /** @type {number} */
    min_bonus;
    /** @type {number} */
    max_bonus;
    /** @type {number} */
    max_payout;
    /** @type {number} */
    promo_amount;
    /** @type {string} */
    ticket_id;
    /** @type {TicketDto} */
    ticket;
    /** @type {BetType} */
    bet_type;
}
export class ReportBetPlacements {
    /** @param {{betPlacements?:RecordList<BetDto>}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {RecordList<BetDto>} */
    betPlacements;
}
/** @typedef T {any} */
export class RecordList extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript 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: api.sbbet-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
	}
}