TBS Apps API

<back to all web services

SearchRequest

The following routes are available for this service:
POST/SearchSearch for a participant in a master eventSearch for a participant in a master event
SearchRequest Parameters:
NameParameterData TypeRequiredDescription
TermbodystringNoSearch term
MasterEventTypeIdbodyintNo0-All,1-Racing,2-Sports. Default is 0
EventTypeIdbodyList<int>NoList of EventTypeId
PagebodyintNoPage Number. Default 1 (first page)
PageSizebodyintNoPage size. Default 10. Maximum 100
SearchResponse Parameters:
NameParameterData TypeRequiredDescription
ErrorNoformintNo
MessageformstringNo
ResultsformList<MasterEventSearchResult>No
PageformintNo
PageSizeformintNo
ResultsFoundformintNo
HasNextformboolNo
MasterEventSearchResult Parameters:
NameParameterData TypeRequiredDescription
EventIdformintNo
EventNameformstringNo
EventTypeIdformintNo
EventTypeformstringNo
MasterEventNameformstringNo
CategoryNameformstringNo
MasterCategoryNameformstringNo
StartDateformDateTimeNo
RaceNumberformint?No
SecondsToJumpformintNo
OutcomeIdformint?No
OutcomeNameformstringNo
JockeyformstringNo
TrainerformstringNo
BarrierBoxformint?No
Weightformdecimal?No

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 /Search HTTP/1.1 
Host: tstextweb20.np.bluebet.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Term: String,
	MasterEventTypeId: 0,
	EventTypeId: 
	[
		0
	],
	Page: 0,
	PageSize: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ErrorNo: 0,
	Message: String,
	Results: 
	[
		{
			EventId: 0,
			EventName: String,
			EventTypeId: 0,
			EventType: String,
			MasterEventName: String,
			CategoryName: String,
			MasterCategoryName: String,
			StartDate: 0001-01-01,
			RaceNumber: 0,
			SecondsToJump: -2147483648,
			OutcomeId: 0,
			OutcomeName: String,
			Jockey: String,
			Trainer: String,
			BarrierBox: 0,
			Weight: 0
		}
	],
	Page: 0,
	PageSize: 0,
	ResultsFound: 0,
	HasNext: True
}