API Documentation v1

Introduction

GoBogey provides a simple API for interacting with the site. The API is still in development and should be considered experimental. If you have any requests or comments, do not hesitate to contact admin@gobogey.com The API works over HTTP and returns JSON formatted data. Some services in the API requires authentication, so you need a registered user in order to use these.

HTTP headers

The following HTTP headers should be set on all requests:

Accept: application/json
Content-Type: application/x-www-form-urlencoded

Authentication

For services requiring authentication, the username and password is transferred using the following HTTP headers.

X-gobogey-api-username: <username>
X-gobogey-api-password: <SHA-1 hash of password>

The password value must be hashed using the SHA-1 hashing algorithm.

Example:

For a user with username tiger and password abc the following headers should be sent:

X-gobogey-api-username: tiger
X-gobogey-api-password: a9993e364706816aba3e25717850c26c9cd0d89d

Services

List courses by country

Lists all registered courses in a country.

GET https://api.gobogey.com/v1/course/list/{countryCode}

countryCode should be a two-character ISO 3166 country code.

Returns maximum of 200 results.

Optional parameters:

max: The maximum number of results to return. Values greater than 200 will be ignored. Default is 200
offset: The offset

Example: https://api.gobogey.com/v1/course/list/no

Get course data

Gets all registered data about a course

GET https://api.gobogey.com/v1/course/{courseId}

courseId is the id for the course to retrieve.

Optional parameters:

stats: If present and true statistics for the course and each hole will be included in the response.

Example: https://api.gobogey.com/v1/course/16?stats=true

Update pinposition

Requires authentication

Updates the current pinposition for a hole. A pinposition will be valid for 24 hours.

PUT https://api.gobogey.com/v1/hole/{holeId}/pinposition

holeId is the id for the hole to update pinposition for.

Required parameteres:

positionOnGreen The current position of the pin on the green. One of FrontLeft, FrontCenter, FrontRight, CenterLeft, Center, CenterRight, BackLeft, BackCenter, BackRight

Start new LiveRound

Requires authentication

Starts a new live round with score available at https://www.gobogey.com/liveround The round will not be permanently registered untill it is finished and registered as a permanent round. Live rounds not updated in 1440 minutes will be deleted

POST https://api.gobogey.com/v1/course/{courseId}/liveround

Required parameteres:

teeColor: The color of the tee the round is played from. Must be a valid teeColor for the course and current user.

Optional parameters:

valid Should the round be valid for handicap adjustment. true / false
putsEnabled Toggle put statistics. true/false
chipsEnabled Toggle chip statistics. true/false
penaltyStrokesEnabled Toggle penaltystroke statistics. true/false
fairwayhitEnabled Toggle fairwayhit statistics. true/false
inWaterEnabled Toggle water statistics. true/false
inSandEnabled Toggle bunker statistics. true/false
obEnabled Toggle Out of bounds statistics. true/false
lostBallEnabled Toggle Lost balls statistics. true/false

Update LiveRound

Requires authentication

Updates a live round in progress

PUT https://api.gobogey.com/v1/liveround/{liveroundId}

Optional parameters:

teeColor: The color of the tee the round is played from. Must be a valid teeColor for the course and current user.
valid Should the round be valid for handicap adjustment. true / false
putsEnabled Toggle put statistics. true/false
chipsEnabled Toggle chip statistics. true/false
penaltyStrokesEnabled Toggle penaltystroke statistics. true/false
fairwayhitEnabled Toggle fairwayhit statistics. true/false
inWaterEnabled Toggle water statistics. true/false
inSandEnabled Toggle bunker statistics. true/false
obEnabled Toggle Out of bounds statistics. true/false
lostBallEnabled Toggle Lost balls statistics. true/false

Delete LiveRound

Requires authentication

Deletes a live round in progress

DELETE https://api.gobogey.com/v1/liveround/{liveroundId}

Register LiveRound as permanent Round

Requires authentication

Registers a finished liveround as a permanent round, updating hcp and statistics.

PUT https://api.gobogey.com/v1/liveround/register/{liveroundId}

Register new LiveResult

Requires authentication

Registers a new result to a live round in progress

POST https://api.gobogey.com/v1/liveround/{liveroundId}/liveresult

Required parameteres:

hole: The current played hole, A number between 1 and 18 (also for 9- and 6-hole courses)
strokes or pickedUp Strokes must be entered or pickedUp must be true.

Optional parameters:

inWater In water on current result. true/false
inSand In bunker on current result. true/false
ob Out of bounds on current result. true/false
lostBall Lost ball on current result. true/false
fairwayhit Fairwayhit on current result. true/false
puts Number of puts on current result.
chips Number of chips on current result.
penaltyStrokes Number of penaltystrokes on current result.

Update LiveResult

Requires authentication

Updates an existing result in a live round

PUT https://api.gobogey.com/v1/liveresult/{liveresultId}

Required parameteres:

hole: The current played hole, A number between 1 and 18 (also for 9- and 6-hole courses)

Optional parameters:

strokes Number of strokes on current result.
pickedUp Hole was aborted before completion. true/false
inWater In water on current result. true/false
inSand In bunker on current result. true/false
ob Out of bounds on current result. true/false
lostBall Lost ball on current result. true/false
fairwayhit Fairwayhit on current result. true/false
puts Number of puts on current result.
chips Number of chips on current result.
penaltyStrokes Number of penaltystrokes on current result.

Delete LiveResult

Requires authentication

Deletes an existing result in a live round

DELETE https://api.gobogey.com/v1/liveresult/{liveresultId}

 
Privacy policy | API | Status