This endpoint deals with reviews for a trail. Use PUT or DELETE to modify an existing review. The Set has GET and POST. PUT, DELETE and POST require Oauth, GET requires an API key only.
Resource URI
/Trails/6683560/Reviews/319639
Resource Properties
Parameter
|
Format
|
Description
|
Allows Null
|
rating |
decimal |
the user's trail rating attached to this review |
no |
reviewDate |
date |
Date of the review |
no |
reviewID |
long |
the unique identifier for the review |
no |
reviewText |
string |
The text of the review |
no |
submitterAcctID |
long |
the acctID of the user who submitted the review |
no |
submitterName |
string |
the username of the user who submitted the review |
no |
title |
string |
the title of the review |
no |
trailID |
long |
the acctID of the trail being reviewed |
no |
trailName |
string |
the name of the trail being reviewed |
no |
Error Responses
Trail ID is required
HTTP PUT
Update an existing review. The only fields which can be updated are title and reviewText. Requires OAuth.
JSON Request:
{
"rating": 5,
"reviewDate": "2011-01-23 20:34:16Z",
"reviewID": 319639,
"reviewText": "This is my review",
"submitterAcctID": 0,
"submitterName": "",
"title": "Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}
JSON Response:
true
XML Request:
XML Response:
HTTP DELETE
Delete an existing review. Requires OAuth.
JSON Request:
Request body empty
JSON Response:
true
XML Request:
XML Response:
REST API: Trails/Reviews Set
List of reviews for a trail id.
Resource URI
/Trails/6683560/Reviews/?api_key=xxxx
Set Filters
HTTP GET
Get the Set of reviews for a trail.
JSON Request:
Request body empty
JSON Response:
[{
"rating": 0,
"reviewDate": "2013-03-02 16:43:55Z",
"reviewID": 321239,
"reviewText": "This is a great trail. I recommend it.",
"submitterAcctID": 0,
"submitterName": "jcm",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}, {
"rating": 5,
"reviewDate": "2011-01-23 20:34:16Z",
"reviewID": 319639,
"reviewText": "",
"submitterAcctID": 0,
"submitterName": "johnqsample",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}]
XML Request:
XML Response:
HTTP POST
Insert a new review of a trail. Pass 0 for the reviewID and submitterAcctID, and emptry string for submitterName. The new reviewID will be returned. The review will not be visible on TrailLink.com until it has been approved by RTC staff. Requires OAuth.
JSON Request:
{
"rating": 5,
"reviewDate": "2011-01-23 20:34:16Z",
"reviewID": 0,
"reviewText": "",
"submitterAcctID": 0,
"submitterName": "",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}
JSON Response:
321237
XML Request:
XML Response: