This is the endpoint for accounts with customized routes. These are submitted by
http://www.traillink.com/submit/submitroute.aspx
GET
http://traillink.com/v1.6/Accounts/
/Routes
Resource URI
/Accounts/6226602/Routes
Resource Properties
Parameter | Format | Description | Allows Null |
routeID |
Int64 |
Unique ID for routes |
no
|
name |
string |
Name given to route created |
no
|
description |
string |
Description for route |
no
|
length |
decimal |
Length of route in miles |
no |
gpx |
string |
|
no |
dateCreated |
DateTime |
Date and time the route was created |
no
|
Error Responses
404 - "Invalid Account ID" - Users without an account will not be able to add routes.
403 - "Forbidden" - Users will not be able to see routes that were created if the login information is incorrect.
"No routes found" - Users without created routes will end up without routes.
HTTP GET
Returns a information about route submittted by acctID. OAuth is required.
JSON Request:
Request body is empty
JSON Response:
[
{
"description": " ",
"gpx": "",
"length": 31.9345150610194,
"name": "3 points 2 points 1 point",
"routeID": 7544,
"dateCreated": MM/DD/YY
},
{
"description": " ",
"gpx": "",
"length": 15.4807899358607,
"name": "Two points II",
"routeID": 8361,
"dateCreated": MM/DD/YY
}
]
XML Request:
XML Response:
HTTP PUT
This updates the route already created.
JSON Request:
"routeID": 7544,
"dateCreated": MM/DD/YY
},
{
"description": " ",
"gpx": "",
"length": 15.4807899358607,
"name": "Two points II",
"routeID": 8361,
"dateCreated": MM/DD/YY
}
]
JSON Response:
XML Request:
XML Response:
HTTP DELETE
Deletes route information created by user.
JSON Request:
Request body is empty
JSON Response:
true
XML Request:
XML Response:
REST API: Accounts/Routes Set
Returns a information about route submittted by acctID. OAuth is required.
Resource URI
/Accounts/7440532/Routes
Set Filters
HTTP POST
Creates user's new route.
JSON Request:
[
{
"description": " ",
"gpx": "",
"length": 31.9345150610194,
"name": "3 points 2 points 1 point",
}
]
JSON Response:
8361
XML Request:
XML Response: