Route
This resource provides Routes created by users as a list of links to Routes.
Resource URIs
Item URI: /v7.1/route_bookmark/{pk}/
Collection URI: /v7.1/route_bookmark/
Item
Item methods
GET
Retrieve a Route by id
DELETE
Delete a Route by id
Item links
route
The route being bookmarked
user
The user that created the bookmark
Collection
Collection methods
GET
Retrieve several Routes
POST
Create a Route
Collection query parameters
Name | Description | Type | Required |
---|---|---|---|
user |
Specifies user to retrieve Routes for. | string | Yes |
Collection properties
Name | Description | Type | Units | HTTP Support |
---|---|---|---|---|
total_count |
the total number of bookmarks that apply to the query. | int | GET: Required |
Embedded collections
route_bookmarks
A collection of bookmarks with links as described under Item links
Collection links
Pagination links available.
Usage
GET Route entity
Request GET: /v7.1/route_bookmark/{pk}/
Response: 200
{
"_links": {
"route": [
{
"href": "/v7.1/route/351989943/",
"id": "351989943"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/"
}
],
"self": [
{
"href": "/v7.1/route_bookmark/9911829/",
"id": "9911829"
}
],
"user": [
{
"href": "/v7.1/user/123456/",
"id": "123456"
}
]
},
"from_user": "/v7.1/user/123456/"
}
DELETE Route entity
Request DELETE: /v7.1/route_bookmark/{pk}/
Response: 204
GET Route collection
Request GET: /v7.1/route_bookmark/?user={user_id}
Response: 200
{
"_embedded": {
"route_bookmarks": [
{
"_links": {
"route": [
{
"href": "/v7.1/route/351989943/",
"id": "351989943"
}
],
"self": [
{
"href": "/v7.1/route_bookmark/9911829/",
"id": "9911829"
}
],
"user": [
{
"href": "/v7.1/user/43334387/",
"id": "43334387"
}
]
},
"from_user": "/v7.1/user/{user_id}/"
}
]
},
"total_count": 1
}
POST Route entity
Request POST: /v7.1/route_bookmark/
{
"_links": {
"route": [
{
"href": "/v7.1/route/86373519/",
"id": "86373519"
}
],
"user": [
{
"href": "/v7.1/user/123456/",
"id": "123456"
}
]
}
}
Response: 201
{
"_links": {
"route": [
{
"href": "/v7.1/route/86373519/",
"id": "86373519"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/"
}
],
"self": [
{
"href": "/v7.1/route_bookmark/12713128/",
"id": "12713128"
}
],
"user": [
{
"href": "/v7.1/user/123456/",
"id": "123456"
}
]
},
"from_user": "/v7.1/user/123456/"
}