Page
A Page is a representation of an entity (user, brand, athlete etc.) that allows entities to share stories and to connect with an audience.
A public Page (see Page Type) can be followed by User and a Page can be Page Association with other Pages to automatically aggregate social content.
Resource URIs
Item URI: /v7.1/page/{pk}/
Item URI: /v7.1/page/{alias}/
Collection URI: /v7.1/page/
Item
Item Methods
GET
Retrieve a Page by ID. Pages can be retrieved by ID or alias. Ex. /page/123/
or /page/uarunning/
PUT
Replaces a Page with a new Page. The Page ID must be used with PUT.
PATCH
Update a part of a Page. The Page ID must be used with PATCH.
Item properties
Name | Description | Type | HTTP Support |
---|---|---|---|
alias |
A URL-friendly unique identifier for a page. May contain lower-case letters and numbers [a-z0-9] and must start with letter. | text | GET: required, PUT: required, PATCH: required, POST: required |
title |
Page title. For personal pages this is the display name of the user. | text | GET: required, PUT: required, PATCH: required, POST: required |
description |
A short description of the page. | text | GET: required, PUT: required, PATCH: required, POST: required |
headline |
A short headline | text | GET: required, PUT: required, PATCH: required, POST: required |
url |
URL to the web representation of this page. | text | GET: required, PUT: required, PATCH: required, POST: required |
website |
The URL to the official website of the entity (ex. http://www.mistycopeland.com) | text | GET: required, PUT: required, PATCH: required, POST: required |
location |
The location of the user. | text | GET: required, PUT: required, PATCH: required, POST: required |
profile_photo |
Profile photos are available for public_figure and public_entity Page Type. To access the profile photo for the user associated with a personal page see User Profile Photo. | text | GET: required, PUT: required, PATCH: required, POST: required |
settings |
Currently this property is read only. | text | GET: optional |
cover_photo |
Cover photos are available for public_figure and public_entity Page Type. | text | GET: required, PUT: required, PATCH: required, POST: required |
Example values
location
For a public_figure or personal page, the location of the user:
{
"country": "US",
"region": "Colorado",
"locality": "Denver"
}
profile_photo
Example profile_photo
(see Image for more information). The profile_photo
can be updated via Image
{
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
}
settings
For personal pages: null. For public_entity and public_figure pages, a simple dictionary of page settings:
{
"featured_gallery_enabled": true,
"qs_graph_enabled": true,
"cta_text": null,
"cta_link": null,
"cta_target": null,
"template": "default"
}
cover_photo
Example response cover_photo
(see Image for more information). The cover_photo
can be updated via Image
{
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
}
Item links
page_type
Represents the type of the page.
followers
Link to a list of followers of the page and the pages that the user is following (if this is a public figure page).
Available for public_figure
and public_entity
pages only. Includes count.
followers, with name: followers
Link to a list of users that are following this page.
followers, with name: following
Link to a list of pages that the user behind the public_figure
page is following (will only be included for public_figure
pages)
follow
Link to POST url to add a follow, present if the current user is not following this page.
unfollow
Link to DELETE url to remove a follow, present if the current user is following this page.
associations
Links to a list of page associations for the page (includes count) for each association direction. A named link is provided for each direction.
associations, with name: from
Link to a list of pages that this page has created associations with (associations made from this page).
associations, with name: to
Link to a list of pages that have created associations with this page (associations made to this page).
activity_feed
Links to the activity feed and the featured posts feed for this page. A named link is provided for each feed that is available for the page.
activity_feed with name: activity_feed
A link to the page activity feed
activity_feed with name: featured
A link to a feed of featured items for the page. This link will only be included if the page type supported a feature item feed and if the featured item feed is enabled in the page settings.
user
Link to the associated user. Available for public_figure
and personal
pages only.
workouts
Link to the workouts for this page’s user. Available for public_figure
and personal
pages only.
actigraphies
Link to actigraphies associated with this user represented by the page. Available for public_figure
and personal
pages only.
Collection
Collection methods
GET
Gets a list of pages sorted by alias
. Only public_figure
and public_entity
pages can be retrieved.
POST
Create a new page. Only public_figure
and public_entity
page types can be created. See Page Type for more information.
Collection query parameters
Name | Description | Type | Required |
---|---|---|---|
page_type_id |
Filter pages by Page Type (one of public_figure or public_entity ) |
number | Yes |
view |
Retrieve a specified subset of pages (one of initial or suggested ). |
text | Yes |
interests |
Used optionally with view=suggested to filter suggested pages to one or more interests. Multiple interests can be specified in a comma-delimited list. Currently available interests include: americanfootball , baseball , basketball , bike , boxing , cheer , dance , female , fish , globalfootball , golf , gymnastics , hockey , hunt , lacrosse , male , martialarts , mountain , nutrition , run , softball , surf , swim , tennis , track , trail , train , triathlon , volleyball , walk , weights yoga |
text | No |
campaigns |
Used optionally with view=suggested to filter suggested pages by campaign. Multiple campaigns can be specified in a comma-delimited list. Can be used in conjunction with interests. Currently available interests include: h12015_basketball , h12015_run |
text | No |
offset |
The Page offset | number | No |
limit |
The number per Page | number | No |
Example values
initial
Pages that should be initially followed (auto-followed) by newly registered users.
suggested
Suggested pages to follow for the authenticated user. Can by used with page_type_id
to get suggestions for a specific Page Type.
Collection links
self
A link to this resource
next
A link to the next page given the per-page limit
Embedded collections
page
A collection of Pages with properties as described under [Item properties][] and links as described under [Item links][]
Usage
GET Page entity
Request GET: /v7.1/page/{pk}/
or GET: /v7.1/page/{alias}/
Response
{
"website": "http://",
"description": "A description of the page",
"title": "Some Title",
"url": "http://record.ua.com/page_alias",
"alias": "page_alias",
"cover_photo": {
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
},
"profile_photo": {
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
},
"_links": {
"associations": [
{
"name": "from",
"count": 0,
"href": "/v7.1/page_association/?from_page_id=2127610"
},
{
"name": "to",
"count": 0,
"href": "/v7.1/page_association/?to_page_id=2127610"
}
],
"follow": [
{
"href": "/v7.1/page_follow/"
}
],
"self": [
{
"href": "/v7.1/page/2127610/",
"id": "2127610"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/Page"
}
],
"followers": [
{
"count": 0,
"href": "/v7.1/page_follow/?page_id=2127610",
"name": "followers"
}
],
"activity_feed": [
{
"name": "activity_feed",
"href": "/v7.1/activity_story/?feed_type=page&feed_id=2127610"
},
{
"name": "featured",
"href": "/v7.1/activity_story/?feed_type=page&feed_id=2127610&feed_view=featured"
}
],
"page_type": [
{
"href": "/v7.1/page_type/public_entity/",
"id": "public_entity"
}
]
},
"location": null,
"settings": {
"featured_gallery_enabled": true,
"qs_graph_enabled": true,
"cta_text": null,
"cta_link": null,
"cta_target": null,
"template": "default"
}
}
GET public_figure
page
Request GET: /page/17832762/ or /page/page_alias/
Response
{
"website": "http://",
"description": "A description of the page",
"title": "Some Title",
"url": "http://record.ua.com/page_alias",
"alias": "page_alias",
"cover_photo": {
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
},
"profile_photo": {
"uri": "https://res.cloudinary.com/mapmyfitness/image/upload/00c016bc14be4c9d980625592c04f181",
"template": "https://res.cloudinary.com/mapmyfitness/image/upload/w_,h_,c_fit/00c016bc14be4c9d980625592c04f181"
},
"_links": {
"associations": [
{
"name": "from",
"count": 0,
"href": "/v7.1/page_association/?from_page_id=2127610"
},
{
"name": "to",
"count": 0,
"href": "/v7.1/page_association/?to_page_id=2127610"
}
],
"follow": [
{
"href": "/v7.1/page_follow/"
}
],
"self": [
{
"href": "/v7.1/page/17832762/",
"id": "17832762"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/Page"
}
],
"followers": [
{
"count": 0,
"href": "/v7.1/page_follow/?page_id=2127610",
"name": "followers"
},
{
"count": 0,
"href": "/v7.1/page_follow/?user_id=19357095",
"name": "following"
}
],
"user": [
{
"href": "/v7.1/user/19357095/",
"id": "19357095"
}
],
"activity_feed": [
{
"name": "activity_feed",
"href": "/v7.1/activity_story/?feed_type=page&feed_id=2127610"
},
{
"name": "featured",
"href": "/v7.1/activity_story/?feed_type=page&feed_id=2127610&feed_view=featured"
}
],
"actigraphies": [
{
"href": "/v7.1/actigraphy/?user=19357095"
}
],
"workouts": [
{
"href": "/v7.1/workout/?user=19357095"
}
],
"page_type": [
{
"href": "/v7.1/page_type/public_figure/",
"id": "public_figure"
}
]
},
"location": {
"country": null,
"region": null,
"locality": null
},
"settings": {
"featured_gallery_enabled": true,
"qs_graph_enabled": true,
"cta_text": null,
"cta_link": null,
"cta_target": null,
"template": "default"
}
}
PUT Page entity (Replace)
Request PUT: /page/{pk}/
Send a complete page representation as expected for POST
Patch a Page entity
Request PATCH: /page/{pk}/
{
"title": "New Title",
"description": "new description"
}
GET Page collection
Request GET: /page/?limit=10
Response
{
"_links": {
"self": [
{
"href": "/vx/page/?limit=10&offset=0"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/${doc_uri}"
}
],
"next": [
{
"href": "/vx/page/?limit=10&offset=10"
}
]
},
"_embedded": {
"pages": [
{...}
]
},
"total_count": 12
}
GET suggested Pages collection
Request GET: /page/?view=suggested
Response
{
"_links": {
"self": [
{
"href": "/vx/page/?limit=20&offset=0"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/${doc_uri}"
}
]
},
"_embedded": {
"pages": [
{...}
]
},
"total_count": 3
}
GET suggested public_figure
Pages collection
Request GET: /page/?page_type_id=public_figure&view=suggested
Response
{
"_links": {
"self": [
{
"href": "/vx/page/?limit=20&offset=0"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/${doc_uri}"
}
]
},
"_embedded": {
"pages": [
{...}
]
},
"total_count": 2
}
GET Get initial (auto-follow) pages
Request GET: /page/?view=initial
Response
{
"_links": {
"self": [
{
"href": "/vx/page/?limit=20&offset=0"
}
],
"documentation": [
{
"href": "https://developer.mapmyfitness.com/docs/Page"
}
]
},
"_embedded": {
"pages": [
{...}
]
},
"total_count": 5
}
POST a public_figure
Page entity
Request POST: /v7.1/page/
{
"page_type": "/v7.1/page_type/public_figure/",
"user": "/v7.1/user/123/",
"alias": "pagealias",
"title": "Some Title",
"description": "A description of the page",
"website": "http://"
}
POST a public_entity
Page entity
Request POST: /v7.1/page/
{
"page_type": "/v7.1/page_type/public_entity/",
"alias": "pagealias",
"title": "Some Title",
"description": "A description of the page",
"website": "http://"
}
Post update of Page profile_photo
Request POST: /image/
See Image for details on the format required for posting an image.
This example just shows the data JSON that needs to be provided to upload a profile_photo.
{
"href": "/vx/page/12345",
"rel": "profile_photo"
}
Post update of Page cover_photo
Request POST: /image/
See Image for details on the format required for posting an image.
This example only shows the JSON-encoded object that should be provided as the “data” file in the multipart POST.
{
"href": "/vx/page/12345",
"rel": "cover_photo"
}