FBiHBetting.Aggregator.WebApi

<back to all web services

ReportBetPayouts

The following routes are available for this service:
POST/bets/payout

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 PayoutRecap
{
    public winnings: number;
    public taxAmount: number;
    public payout: number;

    public constructor(init?: Partial<PayoutRecap>) { (Object as any).assign(this, init); }
}

export class BetPayout
{
    public id: string;
    public origin: Origin;
    public betPaidOutAt: string;
    public payload: { [index:string]: string; };
    public paymentOrigin: PaymentOrigin;
    public payoutRecap: PayoutRecap;

    public constructor(init?: Partial<BetPayout>) { (Object as any).assign(this, init); }
}

export class ReportBetPayouts
{
    public betPayouts: BetPayout[];

    public constructor(init?: Partial<ReportBetPayouts>) { (Object as any).assign(this, init); }
}

TypeScript ReportBetPayouts 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/payout HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	betPayouts: 
	[
		{
			id: String,
			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
						}
					}
				}
			},
			betPaidOutAt: 0001-01-01,
			payload: 
			{
				String: String
			},
			paymentOrigin: 0,
			payoutRecap: 
			{
				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
	}
}