User Achievement
Returns User Achievements that a given user has earned on courses.
Resource URIs
Item URI: /v7.0/user_achievement/<pk>/
Collection URI: /v7.0/user_achievement/
Item
Item methods
GET
Allows for retrieval of a single User Achievement.
Collection properties
total_count
the total number of User Achievements matching the search parameters specified
Embedded collections
user_achievement
A collection of UserAchievement
items.
Item properties
Parameter | Description | Type |
---|---|---|
created_datetime |
The time the User Achievement was earned. | Read-Only DateTime string |
achievement |
The User Achievement earned by the user. | Read-Only string |
course |
The course for which the User Achievement was earned. | Read-Only Course |
Collection
Collection methods
GET
Allows for retrieval of a collection of User Achievements for a specifc user.
Collection query parameters
The following query parameters only apply to GET
Parameter | Description | Type | Required? |
---|---|---|---|
user |
Searches for User Achievements that have been earned by given user. | id /href |
Required |
Usage
GET User Achievement entity
Request GET: /v7.0/user_achievement/{pk}/
Response
{
"created_datetime": "2013-05-30T01:02:26+00:00",
"workoutroutecourse": {
"duration": 300
},
"_links": {
"self": [{
"href": "\/v7.0\/user_achievement\/{Achievement ID}\/",
"id": "{Achievement ID}"
}]
},
"achievement": {
"image_uuid": "000x0x0x-00xx-0x0x-x000-00x0000x000x",
"title": "Achievement Title",
"short_name": "at1",
"resource_uri": "\/v7.0\/achievement\/1\/"
},
"course": {
"distance": 892.9403767183,
"href": "\/v7.0\/course\/{Course ID}\/",
"id": {Course ID},
"name": "Course Name"
}
}
GET User Achievement collection
Request GET: /v7.0/user_achievement/?user={User ID}
Response
{
"_links": {
"self": [{
"href": "\/v7.0\/user_achievement\/?limit=20&user={User ID}&offset=0"
}],
"documentation": [{
"href": "https:\/\/developer.mapmyfitness.com\/docs\/${doc_uri}"
}]
},
"_embedded": {
"user_achievement": [{
"created_datetime": "2013-05-30T01:02:26+00:00",
"workoutroutecourse": {
"duration": 300
},
"_links": {
"self": [{
"href": "\/v7.0\/user_achievement\/{Achievement ID}\/",
"id": "{Achievement ID}"
}]
},
"achievement": {
"image_uuid": "000x0x0x-00xx-0x0x-x000-00x0000x000x",
"title": "Achievement Title",
"short_name": "at1",
"resource_uri": "\/v7.0\/achievement\/1\/"
},
"course": {
"distance": 892.9403767183,
"href": "\/v7.0\/course\/{Course ID}\/",
"id": {Course ID},
"name": "Course Name"
}
}]
},
"total_count": 20
}