Disc Golf Course Review APIs
Pro API Documentation

The default output is JSON (JavaScript Object Notation). For more details on JSON and to obtain parsers please reference www.json.org. The API accepts input using both GET and POST.

Common API Parameters

The following parameters must be included in all API requests:

Required

Name Data Type Description
key string The API Key that was provided when access to the DGCourseReview API was granted.
sig string Signature generated via your API Key, API Secret and API Request

To generate your request signature, you must create an MD5 hash as follows:
API_KEY+API_SECRET+REQUEST_MODE
example. md5(XXXXXXXXXXXXYYYYYYYYYYYYcrseinfo);

Optional

Name Data Type Description Potential Values
out string Enables response to be requested in different formats. If this parameter is not specified the default format of JSON will be used. "json" - JavaScript Object Notation.
"xml" - XML response.
The below filter variables are available in the following API methods: near_box, near_rad, findname, findloc, findzip. They can be added to a request URL simply by adding an "&" followed by the name of the variable and the value. (ie. &holes=18)
cname string Will show any course with a name containing the string submitted. user defined
city string Will show any course with a city containing the string submitted. user defined
country string Only standard two letter country abbreviations are accepted. user defined
state string Only standard two letter state/province abbreviations are accepted. user defined
holes integer Minimum number of holes a course should have user defined
coursetype array 1 = Permanent, 2 = Seasonal, 3 = Temporary, 4 = Practice Area 1, 2, 3, 4
landscape array 1 = Mostly Flat, 2 = Moderately Hilly, 3 = Very Hilly 1, 2, 3
terrain array 1 = Open, 2 = Moderately Wooded, 3 = Very Wooded 1, 2, 3
length_min integer Minimum course length user defined
length_max integer Maximum course length user defined
rating_min float Minimum course rating 0-5 (.5 increments)
rating_max float Maximum course rating 0-5 (.5 increments)
photos integer Photo flag 1 or 0
camping integer Camping flag 1 or 0
nopets integer No Pets flag 1 or 0
private integer Private Course flag 1 or 0
paytoplay interger Pay to Play flag 1 or 0

API Methods

Get Course Information:

Retrieves information for a specific course based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crseinfo"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.

Sample Request:

Sample Response:



Get Multiple Course Information:

Retrieves information for a multiple courses based on the supplied IDs.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crseinfo"
ids base 64 encoded, serialized array required An array of the course ids being requestedfor each hole.

Sample Request:

Sample Response:



Get Course Hole Information:

Retrieves hole information for a specific course based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "holeinfo"
id integer required The DGCourseReview course ID for the course you'd like to retrieve hole information for.

Sample Request:

Sample Response:



Get Course Photo:

Retrieves information for a photo for a specific course based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crsephto"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.

Sample Request:

Sample Response:



Get Course Links/Files:

Retrieves links to a course's links and files based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crselnkfle"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.

Sample Request:

Sample Response:

URL to files is as follows: https://www.dgcoursereview.com/course_files/COURSE_ID/FILE_NAME.FILE_EXT

Get Course Videos:

Retrieves videos associated with a course.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crsevideos"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.

Sample Request:

Sample Response:

Video type is either ytube or vimeo

Get Course Reviews:

Retrieves reviews associated with a course. First data setreturned will contain total review count.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "reviews"
uid integer optional The user id of the currently logged in user
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.
page integer optional The current page of results you want to retrieve. Default: 1
perpage integer optional The number of results to include per page. Default: 10
sort string optional The order you want the results in. Options are:
date_desc / date_asc = Order by review date asc/desc
rating_desc / rating_asc = Order by rating asc/desc
member_desc / member_asc = Order by username asc/desc
helpful = Order by a reviews helpfulness
updated = Order by recently updated reviews
curmix = Order by review date mixed with updated reviews

Default: date_desc

Sample Request:

Sample Response:



Get Course News:

Retrieves news associated with a course.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "crsenews"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.

Sample Request:

Sample Response:

Video type is either ytube or vimeo

Retrieves photos associated with a course. First data set returned will contain total photo count.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "gallery"
id integer required The DGCourseReview course ID for the course you'd like to retrieve information for.
hole integer optional Specify a hole # to only get images for that hole
page integer optional The current page of results you want to retrieve. Default: 1
perpage integer optional The number of results to include per page. Default: 10

Sample Request:

Sample Response:



Searching by Map Bounding Box:

Allows the retrieval of course information based on the bounding box of a particular map. A request can be sent to the DGCourseReview API using the "top-right latitude and longitude" and "bottom-left latitude and longitude" for a geographical bounding box.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "near_box"
limit integer optional Specifies the number of courses to return in the result set. Default is 10. Minimum value is 1 and maximum value is 50
tr_lat double required Top right latitude of bounding box
tr_lon double required Top right longitude of bounding box
bl_lat double required Bottom left latitude of bounding box
bl_lon double required Bottom left longitude of bounding box
uid integer optional The DGCR user ID of the person performing the search
exp integer optional Flag to indicate whether to exclude the user's played courses from the search results. This is a premium only option.

Sample Request:

Sample Response:



Searching by Geo-Point and Radius:

Enables searching for course information within a certain radius of a particular location.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "near_rad"
limit integer optional Specifies the number of courses to return in the result set. Default is 10. Minimum value is 1 and maximum value is 25
lat double required Latitude of geo-point to search near.
lon double required Longitude of geo-point to search near.
rad integer optional Radius to use while searching around specified geo-point. Maximum value = 25. Default value = 10.
uid integer optional The DGCR user ID of the person performing the search
exp integer optional Flag to indicate whether to exclude the user's played courses from the search results. This is a premium only option.

Sample Request:

Sample Response:



Find Courses by Name:

Retrieves information on courses that fit the search criteria.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "findname"
cname string required The course name to search for.
uid integer optional The DGCR user ID of the person performing the search
exp integer optional Flag to indicate whether to exclude the user's played courses from the search results. This is a premium only option.

Sample Request:

Sample Response:



Find Courses by Location:

Retrieves information on courses that fit the search criteria.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "findloc"
city string required The city/town name to search for
state string required The state to search within. Only required if searching for courses within the US or Canada. Only standard two letter state/province abbreviations are accepted.
country string required The country to search within. Only standard two letter country abbreviations are accepted.
uid integer optional The DGCR user ID of the person performing the search
exp integer optional Flag to indicate whether to exclude the user's played courses from the search results. This is a premium only option.

Sample Request:

Sample Response:



Find Courses by US Zip Code:

Retrieves information on courses that fit the search criteria.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "findzip"
limit integer optional Specifies the number of courses to return in the result set. Default is 10. Minimum value is 1 and maximum value is 25
rad integer optional Radius to use while searching around specified geo-point. Maximum value = 25. Default value = 10.
zip string required The US Zip code to use as a center point.
uid integer optional The DGCR user ID of the person performing the search
exp integer optional Flag to indicate whether to exclude the user's played courses from the search results. This is a premium only option.

Sample Request:

Sample Response:



Find Nearby Premium Shops:

Retrieves information on premium shops that are nearby. This is typically called with crse_info to provide zip, country, latitude and longitude.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "premshops"
country integer requires The country id
zip string required if country is "US" The course's zip code
lat double required if country is not "US" Latitude of a course
lon double required if country is not "US" Longitude of a course

Sample Request:

Sample Response:



Update Course Conditions:

Updates the conditions for a course. Recommended to use POST for this call.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "updcond"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
id integer required The course id of the course to be added to the user's played list
cond integer required The course conditions.
1 = Unplayable
2 = Bad
3 = Decent
4 = Good
5 = Perfect
info string optional Information or comment to go along with the conditions

Sample Request:



Get User's Played Courses List:

Retrieves a user's list of played courses.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "playlist"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
start string optional Only show courses marked as played after this date

Sample Request:

Sample Response:



Get User's Scored Courses List:

Retrieves a user's list of course's a user has recorded scores for.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "scorelist"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
start string optional Only show courses with rounds recorded after this date

Sample Request:

Sample Response:



Mark Course as Played:

Marks a course as Played for the user

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "markplay"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
id integer required The course id of the course to be added to the user's played list

Sample Request:



Cast Review Vote:

Cast a vote for a review

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "revvote"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
rid integer required The review id of the review being voted on
vote integer required The vote being cast, 0 = no, 1 = yes

Sample Request:



Verify Credentials:

Verify that a username/password combination is valid. If valid, returns the user's id.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "verify"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.

Sample Request:

Sample Response:



Verify Premium Membership:

Verify that a user is a premium member

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "premium"
uid integer required A user's user id

Sample Request:

Sample Response:



Get DGCR Player Rating:

Get a user's DGCR Player Rating

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "prating"
uid integer required A user's user id

Sample Request:

Sample Response:



Submit a Score:

Submits a round to a user's DGCR Scorebook. This request is submitted using POST to the following URL: https://www.dgcoursereview.com/api/pro.php

Input Parameters:

Name Data Type Required / Optional Description
key string required Your API key
sig string required Your generated API signature
mode string required Value must be "addround"
username string required The user's DGCR username.
password string required An MD5 hash of the user's DGCR password.
id integer optional The course id for the course where the round being submitted was played.
holes integer required The number of holes the user played
tee integer optional The tee played for the round being submitted. This will be either 1, 2, 3, or 4. Valid tee(s) can be retrieved using the Hole Information method.
date_played date required The date the round being submitted was played. Format is: YYYY-MM-DD
time_hour string optional The hour the round being submitted was played. Format is: hh
time_min string optional The minute the round being submitted was played. Format is: mm
time_ap string optional The time of day the round being submitted was played. Value is either: AM or PM
temp integer optional The temperature at the time the round was played.
end_date date required The date the round being submitted was completed. Format is: YYYY-MM-DD
end_hour string optional The hour the round being submitted was completed. Format is: hh
end_min string optional The minute the round being submitted was completed. Format is: mm
end_ap string optional The time of day the round was completed. Value is either: AM or PM
temp_fc character optional 'F' for Fahrenheit or 'C' for celsius
weather integer optional

The weather at the time the round was played.

1 = Cloudy
2 = Rain
3 = Snow
4 = Sunny

wind integer optional

The wind at the time the round was played.

1 = None
2 = Calm
3 = Moderate
4 = Strong

round_notes string optional Notes for the round being submitted. Generally entered by the user.
score base 64 encoded, serialized array required An array of the user's scores for each hole. A 0 value indicates the hole was skipped by the user. Array size MUST match "holes" parameter.
putts base 64 encoded, serialized array optional An array of the user's putts for each hole. Array size MUST match "holes" parameter.
penalty base 64 encoded, serialized array optional An array of the user's penalty shots for each hole. Array size MUST match "holes" parameter.
holenotes base 64 encoded, serialized array optional An array of the user's notes for each hole. Array size MUST match "holes" parameter.

Sample Request in PHP (using CURL):



Round History:

Returns a list of rounds for a member for importing .

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "roundhist"
uid integer required The DGCR user ID of the person to retrieve rounds for
id integer required The DGCR course ID for the course to retrieve rounds for

Sample Request:

Sample Response:



Get Tournament List:

Retrieves a list of tournaments

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "tournlist"
start string optional

Date to start/show. Format: YYYY-mm-dd
Default: Current Day

dwm character required Return list of tournaments for that day, week or month.
d = Day
w = week (returns tournaments between start date -> 7 days past)
m = Month
Default: Month
zip string optional The US Zip code to use as a center point.
rad integer optional

Bottom left latitude of bounding box
Maximum Value: 150 Miles, Default Value: 50 miles

state string optional The state to search within. Only standard two letter state/province abbreviations are accepted.
country string optional The country to search within. Only standard two letter country abbreviations are accepted. Required to be "US" for state to be recognized.

Sample Request:

Sample Response:



Searching Tournaments by Geo-Point & Radius:

Enables searching for tournaments within a certain radius of a particular location.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "tournnear_rad"
start string optional

Date to start/show. Format: YYYY-mm-dd
Default: Current Day

dwm character required Return list of tournaments for that day, week or month.
d = Day
w = week (returns tournaments between start date -> 7 days past)
m = Month
Default: Month
lat double required Latitude of geo-point to search near.
lon double required Longitude of geo-point to search near.
rad integer optional Radius to use while searching around specified geo-point. Maximum value = 200. Default value = 50.

Sample Request:

Sample Response:



Searching Tournaments by Map Bounding Box:

Allows the retrieval of tournament information based on the bounding box of a particular map. A request can be sent to the DGCourseReview API using the "top-right latitude and longitude" and "bottom-left latitude and longitude" for a geographical bounding box.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "tournnear_box"
start string optional

Date to start/show. Format: YYYY-mm-dd
Default: Current Day

dwm character required Return list of tournaments for that day, week or month.
d = Day
w = week (returns tournaments between start date -> 7 days past)
m = Month
Default: Month
tr_lat double required Top right latitude of bounding box
tr_lon double required Top right longitude of bounding box
bl_lat double required Bottom left latitude of bounding box
bl_lon double required Bottom left longitude of bounding box

Sample Request:

Sample Response:



Get Tournament Information:

Retrieves information for a specific tournament based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "tourninfo"
tid integer required The DGCourseReview tournament ID for the tournament you'd like to retrieve information for.

Sample Request:

Sample Response:



Get Shop List:

Retrieves a list of shops

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "shoplist"
zip string optional The US Zip code to use as a center point.
rad integer optional

Radius to use while searching around specified zip code
Maximum Value: 150 Miles, Default Value: 50 miles

state string optional The state to search within. Only standard two letter state/province abbreviations are accepted.
country string optional The country to search within. Only standard two letter country abbreviations are accepted. Required to be "US" for state to be recognized.

Sample Request:

Sample Response:



Find Shops by Name:

Retrieves information on shops that fit the search criteria.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "shopname"
sname string required The shop name to search for.
zip string optional The US Zip code to use as a center point.
rad integer optional

Radius to use while searching around specified zip code
Maximum Value: 150 Miles, Default Value: 50 miles

state string optional The state to search within. Only standard two letter state/province abbreviations are accepted.
country string optional The country to search within. Only standard two letter country abbreviations are accepted. Required to be "US" for state to be recognized.

Sample Request:

Sample Response:



Searching Shops by Geo-Point & Radius:

Enables searching for shops within a certain radius of a particular location.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "shopnear_rad"
lat double required Latitude of geo-point to search near.
lon double required Longitude of geo-point to search near.
rad integer optional Radius to use while searching around specified geo-point. Maximum value = 200. Default value = 50.

Sample Request:

Sample Response:



Searching Shops by Map Bounding Box:

Allows the retrieval of shop information based on the bounding box of a particular map. A request can be sent to the DGCourseReview API using the "top-right latitude and longitude" and "bottom-left latitude and longitude" for a geographical bounding box.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "shopnear_box"
tr_lat double required Top right latitude of bounding box
tr_lon double required Top right longitude of bounding box
bl_lat double required Bottom left latitude of bounding box
bl_lon double required Bottom left longitude of bounding box

Sample Request:

Sample Response:



Get Shop Information:

Retrieves information for a specific shop based on the supplied ID.

Input Parameters:

Name Data Type Required / Optional Description
mode string required Value must be "shopinfo"
sid integer required The DGCourseReview shop ID for the shop you'd like to retrieve information for.

Sample Request:

Sample Response:


Submit App Error:

Submits an app error to the error log for the DGCR App. This request is submitted using POST to the following URL: https://www.dgcoursereview.com/api/pro.php

Input Parameters:

Name Data Type Required / Optional Description
key string required Your API key
sig string required Your generated API signature
mode string required Value must be "error"
os string required The device's OS
device string required The device type
version string required App version
timestamp string required Time stamp (YYYY-MM-DD HH:MM:SS format)
exception string required The error/exception string

Sample Request in PHP (using CURL):



Generate Round Image:

Generates a round image for sharing on social media, etc. T

Input Parameters:

Name Data Type Required / Optional Description
key string required Your API key
sig string required Your generated API signature
mode string required Value must be "roundimage"
cname string optional The name of the course that was played. Including this is recommended.
id integer required The course id for the course that was played
holes integer required The number of holes that were played
tee integer optional The tee played for the round. This will be either 1, 2, 3, or 4.
date_played date required The date the round being submitted was played. Format is: YYYY-MM-DD
time_hour string optional The hour the round being submitted was played. Format is: hh
time_min string optional The minute the round being submitted was played. Format is: mm
time_ap string optional The time of day the round being submitted was played. Value is either: AM or PM
end_date date required The date the round being submitted was completed. Format is: YYYY-MM-DD
end_hour string optional The hour the round being submitted was completed. Format is: hh
end_min string optional The minute the round being submitted was completed. Format is: mm
end_ap string optional The time of day the round was completed. Value is either: AM or PM
temp integer optional The temperature at the time the round was played.
temp_fc character optional 'F' for Fahrenheit or 'C' for celsius
weather integer optional

The weather at the time the round was played.

1 = Cloudy
2 = Rain
3 = Snow
4 = Sunny

wind integer optional

The wind at the time the round was played.

1 = None
2 = Calm
3 = Moderate
4 = Strong

round_notes string optional Notes for the round being submitted. Generally entered by the user.
dist_unit string required

The distance the app was set to.

m = Meters
ft = Feet

distances base 64 encoded, serialized array optional An array of the hole distances associated with this round.
pars base 64 encoded, serialized array optional An array of the pars associated with this round.
scores base 64 encoded, serialized array required An array of the player's scores. If more than one player is on the card, this is an array of arrays.
players base 64 encoded, serialized array required An array of the player names on the scorecard
ratings base 64 encoded, serialized array optional An array of the round ratings for each player. Please keep them in the same order as the players array.
filename string required

The name of the image file. Something unique is recommended. We recommend PNG as the file format. The final image will be located at: https://www.dgcoursereview.com/temp_storage/filename for 12 hours.

Sample Request in PHP (using CURL):



Response Codes:

This section outlines the response codes that can be expected.

Response Code Response Message Description
3 Client Request Limit Exceeded Indicates the hourly request limit for the client has been reached.
4 Key Request Limit Exceeded Indicates the daily request limit for the API key has been reached.
5 Nonexistent Course Indicates the course being queried does not exist
6 Bad Zip Indicates the supplied zip code is invalid.
7 Bad User Credentials Indicates the supplied user credentials were invalid.
8 Score Array and Holes Played Do Not Match Indicates the "holes" field and the size of the score array do not match.
9 Putts Array and Holes Played Do Not Match Indicates the "holes" field and the size of the putts array do not match.
10 Penalty Array and Holes Played Do Not Match Indicates the "holes" field and the size of the penalty array do not match.
11 Negative or Non-Numeric Values in Score Array Indicates the score array contains negative or non-numeric values
12 Negative or Non-Numeric Values in Putts Array Indicates the putts array contains negative or non-numeric values
13 Negative or Non-Numeric Values in Penalty Array Indicates the penalty array contains negative or non-numeric values
14 Bad Date Format Indicates the supplied date is not formatted correctly.
15 Course is Extinct Indicates the course the round is being submitted for is extinct.
16 Course Not Marked as Played By User Indicates the course the round is being submitted for has not been played by the user.
17 Invalid Tee Indicates the tee associated with the round being submitted is invalid.
18 Hole Notes Array and Holes Played Do Not Match Indicates the "holes" field and the size of the hole notes array do not match.
19 Nonexistent User ID Indicates the provided user id does not exist
20 Review Vote Error Indicates there was an error when attempting to cast a review vote
21 Review Vote Recently Cast Indicates that a review vote for a member was cast recently and the vote wait time has not yet transpired.
22 Nonexistent Tournament Indicates the tournament being queried does not exist
23 Nonexistent Shop Indicates the shop being queried does not exist
24 Non-Premium Shop Indicates the shop being queried is not a premium shop
25 No Filename Specified No filename was specified for the round image.
200 OK Indicates the request completed without error.
400 Bad Request Indicates an improperly formatted API request was sent. Usually this is due to not including required variables in your request.
401 Unauthorized Indicates an invalid API request was sent.
501 Not Implemented Indicates an invalid method request was sent.