Make your product
work with UP.

Body

Get body composition metrics record events for a user.

URI Method Response Type Returns
/nudge/api/users/@me/body_events GET application/json Collection>Body
Parameter Type Description
date string Date, formatted as YYYYMMDD.
page_token int Timestamp used to paginate the list of sleeps. 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 have been updated later than the timestamp.
limit int Maximum number of results to return

Example:

GET https://jawbone.com/nudge/api/v.1.0/users/@me/body_events HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200
      "time": 1382377526
   },
  “data”:
   {
      "items": 
      [{
         "xid": "40F7_htRRnT8Vo7nRBZO1X",
         "title": "Measurement from Nov 21st",
         "type": "body",
         "time_created": 1384963500,
         "time_updated": 1385049599,
         "date": 20131121,
         "place_lat": "37.451572",
         "place_lon": "-122.184435",
         "place_acc": 10,
         "place_name": "Gym",
         "image": "/nudge/image/d/770eca483cd211e3910e22000a1fb6b5_image.png"
         "note": "My Weight",
         "lean_mass": 35,
         "weight": 75,
         "body_fat": 13,
         "bmi": 18,
         "details": 
         {
            "tz": "America/Los_Angeles"
         }
      },
      {
      ... more items ....
      }],
      "links": 
      {
         "next": "/nudge/api/v.1.0/users/6xl39CsoVp2KirfHwVq_Fx/body_events?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 body event
type string Type of event, in this case a body event.
time_created int Epoch timestamp when this body event was created.
time_updated int Epoch timestamp when this body event was updated.
date int Date when this body event was created, formatted as YYYYMMDD.
place_lat float Latitude of location where body event was logged.
place_lon float Longitude of location where body event was logged.
place_acc int Accuracy of location where body event was logged, in meters.
place_name string Name of location where body event was logged.
image URI Link to the image of this body event (relative, add prefix https://jawbone.com)
Note string Note on this body event
lean_mass float Lean mass percentage
Weight float Body weight in kilograms.
body_fat float Body fat percentage.
bmi float Body mass index.
tz int Time zone when this body event was logged, Olson format.
size int Number of items in this list.
next URI Link to next page of data (relative, add https://jawbone.com as prefix).

Get a single body composition metric event.

URI Method Response Type Returns
/nudge/api/body_events/{event_xid} GET application/json Body

Example:

GET https://jawbone.com/nudge/api/v.1.0/body_events/0ac1wXjUAYQ HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200
      "time": 1382377526
   },
  “data”:
   {
      "xid": "40F7_htRRnT8Vo7nRBZO1X",
      "title": "Measurement from Nov 21st",
      "type": "body",
      "time_created": 1384963500,
      "time_updated": 1385049599,
      "date": 20131121,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Gym",
      "image": "/nudge/image/d/770eca483cd211e3910e22000a1fb6b5_image.png"
      "note": "My Weight",
      "lean_mass": 35,
      "weight": 75,
      "body_fat": 13,
      "bmi": 18,
      "details": 
      {
         "tz": "America/Los_Angeles"
      }
   }
}
	

Creates a new user event to record body composition metrics.

URI Method Response Type Returns
/nudge/api/users/@me/body_events POST application/json Body
Parameter Type Description
title string Title of the event.
weight float Body weight in kilograms.
body_fat float Body fat percentage.
lean_mass float Lean mass percentage.
bmi float Body Mass Index.
note string Notes associated with the event.
image_url string URL of the image to include in the event.
time_created int Unix timestamp when the event was recorded.
tz string Time zone where the event was recorded

Example:

POST https://jawbone.com/nudge/api/v.1.0/users/@me/body_events HTTP/1.1
Host: jawbone.com 
Content-Type: application/x-www-form-urlencoded
title=Measurements on Oct 24&image_url=http://site.com/image.png& weight=75&lean_mass=35&bmi=18&body_fat=13
	

Will return:

HTTP 201 Created
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200
      "time": 1382377526
   },
  “data”:
   {
      "xid": "40F7_htRRnT8Vo7nRBZO1X",
      "title": "Measurements on Oct 24",
      "type": "body",
      "time_created": 1384963500,
      "time_updated": 1385049599,
      "date": 20131024,
      "place_lat": null,
      "place_lon": null,
      "place_acc": 0,
      "place_name": "",
      "image": "/nudge/image/d/770eca483cd211e3910e22000a1fb6b5_image.png"
      "note": null,
      "lean_mass": 35,
      "weight": 75,
      "body_fat": 13,
      "bmi": 18,
      "details": 
      {
         "tz": null
      }
   }
}
	

Delete a single Body metric event.

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

Example:

DELETE https://jawbone.com/nudge/api/v.1.0/body_events/0ac1wXjUAYQ HTTP/1.1
Host: jawbone.com
Content-Type: application/x-www-form-urlencoded
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "V6p0-s4-qIo",
      "message": "Body composition event data with xid 0ac1wXjUAYQ was removed",
      "code": 200,
      "time": 1351121565
   },
   "data": {}
}