API usage

The API consists of two sets of endpoints. One set is for public access allowing apps or users to login whereas the other set of endpoints is used for secure access to data (after login).

Public endpoints are available at /api
Secured endpoints ara available at /api/secure

Please use https://... for all calls to the API? All requests made on http://... will be rejected with a 505 error.

Public API endpoints and descriptions

/api/login

To use the secured endpoints, you'll have to be issued with a token from the server. Use this endpoint to get this token.

Method Type : POST
Content Type : application/json
Request Payload: { "username": "yourappname", "password": "yourapppassword"}
Response : { "token": "some encoded token from the server", "expires": 1418901760177, "key": "ios"}

Use the 'token' and 'key' values from the Response in the 'x-access-token' and 'x-key' header values in all secure API method calls.

Secured API endpoints and descriptions

All calls to the secured API endpoints must contain the following two headers:

x-access-token
x-key

These must be populated with the 'token' and 'key' values received from the /api/login request.

/api/secure/racing

The racing API contains all endpoints for data related to the horse racing.

/cardchange

/going

/carryovers

/megawin

/winsoftheweek

/racingtoday

/tips

/jockeys

/trainers

/blitzpa

/blitzbipot

/quickmix

/notice

/news

/api/secure/rugby

All endpoints related to the Rugby data.

/fixtures/1

/fixtures/5

/results/1

/results/5

/carryover

/tips

/news

/api/secure/soccer

All endpoints related to the Soccer data.

/fixtures/1

/fixtures/4

/fixtures/6

/fixtures/10

/fixtures/13

/results/1

/results/4

/results/6

/results/10

/results/13

/scoresoftheweek

/carryover

/matchpreview

/megawin

/news