Greyhounds.WebApi

<back to all web services

PlaceBet

The following routes are available for this service:
POST/bets
// @ts-nocheck

export class Reference
{
    public id?: string;
    public value?: string;

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

export class BettingApp
{
    public name?: string;
    public version?: string;

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

export class Origin
{
    public application?: BettingApp;
    public ip?: string;
    public organization?: Reference;
    public device?: Reference;
    public location?: Reference;
    public locationGroup?: Reference;
    public clerk?: Reference;

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

export class PlaceBet
{
    public id?: string;
    public slipId?: string;
    public jpId?: string;
    public bettor?: Reference;
    public origin?: Origin;
    public placedAt: string;
    public roundId?: string;
    public outcomeId: number;
    public odds: number;
    public stake: number;

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

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

{
	id: String,
	slipId: String,
	jpId: String,
	bettor: 
	{
		id: String,
		value: String
	},
	origin: 
	{
		application: 
		{
			name: String,
			version: String
		},
		ip: String,
		organization: 
		{
			id: String,
			value: String
		},
		device: 
		{
			id: String,
			value: String
		},
		location: 
		{
			id: String,
			value: String
		},
		locationGroup: 
		{
			id: String,
			value: String
		},
		clerk: 
		{
			id: String,
			value: String
		}
	},
	placedAt: 0001-01-01,
	roundId: String,
	outcomeId: 0,
	odds: 0,
	stake: 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
	}
}