Make your product
work with UP.

Workouts

Get the user's workout list

Returns the list of workouts of the current user. These are workouts specifically logged by the user via the UP band, manually in the UP app, or via 3rd party partners and will only be a subset of the total activity for the day. See the Moves endpoint for all activity data from the user for the entire day.

This list can be paginated by date or timestamp.
URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/workouts GET application/json Collection>Workout
Parameter Type Description
date int Date, formatted as YYYYMMDD. If omitted, returns the information for today.
page_token int Timestamp used to paginate the list of workouts. The Developer must use the "next" link provided in the "links" section.
start_time int To be used along with end_time. Epoch timestamp that denotes the start of the time range queried for events.
end_time int To be used with start_time. Epoch timestamp that denotes the end of the time range queried for events.
updated_after int Epoch timestamp to list events that are updated later than the timestamp. To be used with start_time to list events that were completed after said start_time.
limit int Maximum number of results to return

Example:

GET https://jawbone.com/nudge/api/v.1.1/users/@me/workouts?start_time=1383289200 HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 Ok
{
   “meta”:
   {
      “user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
      “message”: “OK”,
      “code”: 200
      "time": 1386122022
   },
   “data”:
   {
      "items": 
      [{
         "xid": "40F7_htRRnT8Vo7nRBZO1X",
         "title": "Run",
         "type": "workout",
         "sub_type": 2,
         "time_created": 1384963500,
         "time_updated": 1385049599,
         "time_completed": 1385099220,
         "date": 20131121,
         "place_lat": "37.451572",
         "place_lon": "-122.184435",
         "place_acc": 10,
         "place_name": "Gym",
         "route": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
         "image": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
         "snapshot_image": "/nudge/image/e/1385107735/40F7_htRRnT8VJ5BRfj-_A/grEGutn_3mE.png"
         "details": {
            "steps": 5128
            "time": 2460
            "bg_active_time": 2163
            "meters": 5116
            "km": 5.116
            "intensity": 3
            "calories": 691
            "bmr": 56.071321076
            "bg_calories": 448.95380111
            "bmr_calories": 56.071321076
            "tz": "America/Los_Angeles"
         }
      },
      {
      ... more items ....
      }],
      "links": 
      {
         "next": "/nudge/api/v.1.1/users/6xl39CsoVp2KirfHwVq_Fx/workouts?page_token=1384390680"
      },
      “size”: 10
   }   
}
	
Data Value Type Description
xid string Unique ID for this event. Can be used to retrieve data for this specific event, see below.
title string Title of this workout
type string Type of event, in this case a workout.
sub_type int Workout type, see Type table below.
time_created int Epoch timestamp when this workout was created.
time_updated int Epoch timestamp when this workout was updated.
time_completed int Epoch timestamp when this workout was completed.
date int Date when this workout was created, formatted as YYYYMMDD.
place_lat float Latitude of location where workout was logged.
place_lon float Longitude of location where workout was logged.
place_acc int Accuracy of location where workout was logged, in meters.
place_name string Name of location where workout was logged.
route URI Link to the image of route taken for workout (relative, add prefix https://jawbone.com)
image URI Link to the image of this workout (relative, add prefix https://jawbone.com)
snapshot_image URI Link to the image of this workout's intensity (relative, add prefix https://jawbone.com)
steps int Number of steps during this workout. Note steps will only be provided if the user was wearing the physical UP band during workout.
time int Total time for this workout, in seconds.
bg_active_time int Total time in movement as logged by the UP band. Note bg_active_time will only be provided if the user was wearing the physical UP band during workout.
meters int Total distance travelled, in meters.
km int Total distance travelled, in meters.
intensity int Intensity of the workout as selected by the user or 3rd party app. 1 = easy, 2 = moderate, 3 = intermediate, 4 = difficult, 5 = hard
calories int Total calories burned during workout.
bmr int Basal metabolic rate during workout.
bg_calories int Calories burned as logged by the UP band. Note bg_calories will only be provided if the user was wearing the physical UP band during workout.
tz int Time zone when this event was generated. Whenever possible, Olson format (e.g., "America/Los Angeles") will be returned, otherwise the GMT offset (e.g., "GMT+0800") will be returned.
size int Number of items in this list.
next URI Link to next page of data (relative, add https://jawbone.com as prefix).
Type Description
1 walk
2 run
3 lift weights
4 cross train
5 nike training
6 yoga
7 pilates
8 body weight exercise
9 crossfit
10 p90x
11 zumba
12 trx
13 swim
14 bike
15 elliptical
16 bar method
17 kinect exercises
18 tennis
19 basketball
20 golf
21 soccer
22 ski snowboard
23 dance
24 hike
25 cross country skiing
26 stationary bike
27 cardio
28 game
29 other

Get information about a specific workout

Returns detailed information about the given workout.
URI Method Response Type Returns
/nudge/api/v.1.1/workouts/{xid} GET application/json Workout

Example:

GET https://jawbone.com/nudge/api/v.1.1/workouts/40F7_htRRnT8Vo7nRBZO1X HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 Ok
{
   “meta”:
   {
      “user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
      “message”: “OK”,
      “code”: 200
      "time": 1386122022
   },
   “data”:
   {
      "xid": "40F7_htRRnT8Vo7nRBZO1X",
      "title": "Run",
      "type": "workout",
      "sub_type": 2,
      "time_created": 1384963500,
      "time_updated": 1385049599,
      "time_completed": 1385099220,
      "date": 20131121,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Gym",
      "route": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "image": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "snapshot_image": "/nudge/image/e/1385107735/40F7_htRRnT8VJ5BRfj-_A/grEGutn_3mE.png"
      "details": {
         "steps": 5128
         "time": 2460
         "bg_active_time": 2163
         "meters": 5116
         "km": 5.116
         "intensity": 3
         "calories": 691
         "bmr": 56.071321076
         "bg_calories": 448.95380111
         "bmr_calories": 56.071321076
         "tz": "America/Los_Angeles"
   }
}
	

Get the user's workout graphs

Returns the image of the given workout.
URI Method Response Type Returns
/nudge/api/v.1.1/workouts/{xid}/image GET image/png Binary image

Example:

GET https://jawbone.com/nudge/api/v.1.1/workouts/40F7_htRRnT8Vo7nRBZO1X/image HTTP/1.1
Host: jawbone.com
	

Will return:

Binary contents of the image.
	

Get workout ticks

Returns granular details for the specific Workout event. Each entry contains a tick bucket with the details for that time slice. Currently the tick bucket can be 10 seconds or 60 seconds wide depending how the workout was recorded. This may be subject to change in the future, so please utilize the timestamp included.

NOTE: the v1.0 endpoint, /snapshot, has been deprecated but is still useable, but as it may not be supported in future versions we recommend updating to this endpoint. You can view the deprecated snapshot endpoint documentation here.

URI Method Response Type Returns
/nudge/api/v.1.1/workouts/{xid}/ticks GET application/json Ticks

Example:

GET https://jawbone.com/nudge/api/v.1.1/workouts/40F7_htRRnT8Vo7nRBZO1X/ticks HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 Ok
{
   “meta”:
   {
      “user_xid”: “b9yCLa3f01yf”,
      “message”: “OK”,
      “code”: 200
      "time": 1386296310
   },
   “data”:
   {
      "items": 
      [{
         "distance": 7, 
         "active_time": 9, 
         "calories": 1.48109316826, 
         "steps": 23, 
         "time": 1395714660, 
         "speed": 1.0
      }, {
         "distance": 27, 
         "active_time": 8,  
         "calories": 3.83396744728, 
         "steps": 54, 
         "time": 1395714720, 
         "speed": 1
      },
      ...
      }],
      "size": 50
   }
}
	
Data Value Type Description
distance int Distance travelled in meters.
active_time int Active time during this tick bucket, in seconds.
calories int Calories burned during this tick bucket.
steps int Steps taken during this tick bucket.
time int Time stamp for start of this tick bucket.
speed int Speed is calculated as distance/active_time (m/s)

Create workout

Creates a new workout.
URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/workouts POST application/json Workout
Parameter Type Description
sub_type int Type of workout (see list below)
time_created int [required] Start time of the workout (seconds since the epoch)
time_completed int End time of the workout (seconds since the epoch)
place_lat float Latitude of the location where the workout was created
place_lon float Longitude of the location where the workout was created
place_acc float Accuracy (meters) of the location where the workout was created
place_name string Name of the location where the workout was created
tz string Time zone when this event was generated. Whenever possible, Olson format (e.g., "America/Los Angeles") will be returned, otherwise the GMT offset (e.g., "GMT+0800") will be returned.
share boolean Set whether to share event on user's public feed. Will not override if user's privacy setting is set to not share.
calories int Number of calories burned during the workout.
distance int Distance traveled during the workout, in meters.
image_url string URL with an image of the workout.
intensity int Intensity of the workout (1 = easy, 2 = moderate, 3 = intermediate, 4 = difficult, 5 = hard).
Type Description
1 walk
2 run
3 lift weights
4 cross train
5 nike training **
6 yoga
7 pilates
8 body weight exercise **
9 crossfit **
10 p90x **
11 zumba **
12 trx **
13 swim
14 bike
15 elliptical
16 bar method **
17 kinect exercises **
18 tennis
19 basketball
20 golf **
21 soccer
22 ski snowboard
23 dance
24 hike
25 cross country skiing
26 stationary bike
27 cardio
28 game
29 other

** The UP client currently does not support these workout subtypes. These subtypes will appear as generic workout events on the UP client. But these subtypes can be stored and retrieved via the workouts API.

Example:

POST https://jawbone.com/nudge/api/v.1.1/users/@me/workouts HTTP/1.1
Host: jawbone.com
time_created=1368652731&time_completed=1368656325&sub_type=3&calories=115
	

Will return:

HTTP 201 Created
{
   “meta”:
   {
      “user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
      “message”: “OK”,
      “code”: 200
      "time": 1386122022
   },
   “data”:
   {
      "xid": "40F7_htRRnT8Vo7nRBZO1X",
      "title": "Run",
      "type": "workout",
      "sub_type": 2,
      "time_created": 1384963500,
      "time_updated": 1385049599,
      "time_completed": 1385099220,
      "date": 20131121,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Gym",
      "route": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "image": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "snapshot_image": "/nudge/image/e/1385107735/40F7_htRRnT8VJ5BRfj-_A/grEGutn_3mE.png"
      "details": {
         "steps": 5128
         "time": 2460
         "bg_active_time": 2163
         "meters": 5116
         "km": 5.116
         "intensity": 3
         "calories": 691
         "bmr": 56.071321076
         "bg_calories": 448.95380111
         "bmr_calories": 56.071321076
         "tz": "America/Los_Angeles"
   }
}
	

Representation in UP app:

Note cropping on 640x440 image. Each little square is 10x10 in images below.

At feed level:

At detail level:


Update workout

Updates an existing workout.
URI Method Response Type Returns
/nudge/api/v.1.1/workouts/{xid}/partialUpdate POST application/json Workout
Parameter Type Description
sub_type int Type of workout (see list below)
time_created int Start time of the workout (seconds since the epoch)
time_completed int End time of the workout (seconds since the epoch)
place_lat float Latitude of the location where the workout was created
place_lon float Longitude of the location where the workout was created
place_acc float Accuracy (meters) of the location where the workout was created
place_name string Name of the location where the workout was created
tz string Time zone when this event was generated. Whenever possible, Olson format (e.g., "America/Los Angeles") will be returned, otherwise the GMT offset (e.g., "GMT+0800") will be returned.
share boolean Set whether to share event on user's public feed. Will not override if user's privacy setting is set to not share.
calories int Number of calories burned during the workout.
distance int Distance traveled during the workout, in meters.
image_url string URL with an image of the workout.
intensity int Intensity of the workout (1 = easy, 2 = moderate, 3 = intermediate, 4 = difficult, 5 = hard).

Example:

POST https://jawbone.com/nudge/api/v.1.1/workouts/{xid}/partialUpdate HTTP/1.1
Host: jawbone.com
sub_type=2&calories=300
	

Will return:

HTTP 200 OK
{
   “meta”:
   {
      “user_xid”: “6xl39CsoVp2KirfHwVq_Fx”,
      “message”: “OK”,
      “code”: 200
      "time": 1386122022
   },
   “data”:
   {
      "xid": "40F7_htRRnT8Vo7nRBZO1X",
      "title": "Run",
      "type": "workout",
      "sub_type": 2,
      "time_created": 1384963500,
      "time_updated": 1385049599,
      "time_completed": 1385099220,
      "date": 20131121,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Gym",
      "route": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "image": "/nudge/image/d/3c1b0970533811e39d7f12313d00449a_image.png"
      "snapshot_image": "/nudge/image/e/1385107735/40F7_htRRnT8VJ5BRfj-_A/grEGutn_3mE.png"
      "details": {
         "steps": 5128
         "time": 2460
         "bg_active_time": 2163
         "meters": 5116
         "km": 5.116
         "intensity": 3
         "calories": 691
         "bmr": 56.071321076
         "bg_calories": 448.95380111
         "bmr_calories": 56.071321076
         "tz": "America/Los_Angeles"
   }
}
	

Delete workout event.

Deletes an existing workout event. The event must have been created by the partner for this call to succeed.
URI Method Response Type Returns
/nudge/api/v.1.1/workouts/{xid} DELETE application/json Status

Example:

DELETE https://jawbone.com/nudge/api/v.1.1/workouts/40F7_htRRnT8Vo7nRBZO1X HTTP/1.1
Host: jawbone.com
Content-Type: application/x-www-form-urlencoded
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200,
      "time": 1351121565
   },
   "data": {}
}