Greyhounds.WebApi

<back to all web services

PlaceBets

The following routes are available for this service:
POST/bets/v2
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Greyhounds.WebApi.ServiceModel;

namespace Greyhounds.WebApi.ServiceModel
{
    public partial class BettingApp
    {
        public virtual string? Name { get; set; }
        public virtual string? Version { get; set; }
    }

    public partial class Origin
    {
        public virtual BettingApp? Application { get; set; }
        public virtual string? IP { get; set; }
        public virtual Reference? Organization { get; set; }
        public virtual Reference? Device { get; set; }
        public virtual Reference? Location { get; set; }
        public virtual Reference? LocationGroup { get; set; }
        public virtual Reference? Clerk { get; set; }
    }

    public partial class PlaceBets
    {
        public virtual string? SlipId { get; set; }
        public virtual Reference? Bettor { get; set; }
        public virtual Origin? Origin { get; set; }
        public virtual DateTime PlacedAt { get; set; }
        public virtual List<Bet>? Bets { get; set; }
        public partial class Bet
        {
            public virtual string? Id { get; set; }
            public virtual string? JPId { get; set; }
            public virtual string? RoundId { get; set; }
            public virtual int OutcomeId { get; set; }
            public virtual float Odds { get; set; }
            public virtual decimal Stake { get; set; }
        }

    }

    public partial class Reference
    {
        public virtual string? Id { get; set; }
        public virtual string? Value { get; set; }
    }

}

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

{
	slipId: 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,
	bets: 
	[
		{
			id: String,
			jpId: String,
			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
	}
}