Make your product
work with UP.

Cardiac

Get cardiac metrics events for a user.

URI Method Response Type Returns
/nudge/api/users/@me/cardiac_events GET application/json Collection>Cardiac
Parameter Type Description
date string Date, formatted as YYYYMMDD. If omitted, returns the information for today..
page_token int Timestamp used to paginate the list of events. 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/cardiac_events 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": 1382377526
   },
  “data”:
   {
      "items": 
      [{
         "xid": "40F7_htRRnT8Vo7nRBZO1X",
         "title": "My heart rate on November 21st, 2013",
         "type": "cardiac",
         "time_created": 1384963500,
         "time_updated": 1385049599,
         "date": 20131121,
         "place_lat": "37.451572",
         "place_lon": "-122.184435",
         "place_acc": 10,
         "place_name": "Gym",
         "heart_rate": 100,
         "systolic_pressure": 120,
         "diastolic_pressure": 80,
         "details": 
         {
            "tz": "America/Los_Angeles"
         }
      },
      {
      ... more items ....
      }],
      "links": 
      {
         "next": "/nudge/api/v.1.0/users/6xl39CsoVp2KirfHwVq_Fx/cardiac_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 cardiac event
type string Type of event, in this case a cardiac event.
time_created int Epoch timestamp when this cardiac event was created.
time_updated int Epoch timestamp when this cardiac event was updated.
date int Date when this cardiac event was created, formatted as YYYYMMDD.
place_lat float Latitude of location where cardiac event was logged.
place_lon float Longitude of location where cardiac event was logged.
place_acc int Accuracy of location where cardiac event was logged, in meters.
place_name string Name of location where cardiac event was logged.
image URI Link to the image of this cardiac event (relative, add prefix https://jawbone.com)
heart_rate int Heart rate of user.
systolic_pressure int Blood pressure metric.
diastolic_pressure int Blood pressure metric.
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 cardiac metric event.

URI Method Response Type Returns
/nudge/api/cardiac_events/{event_xid} GET application/json Cardiac

Example:

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

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "V6p0-s4-qIo",
      "message": "OK",
      "code": 200,
      "time": 1351121147
   },
   "data": 
   {
      "systolic_pressure": 120,
      "xid": "0ac1wXjUAYQ",
      "title": "superman",
      "image": "/nudge/image/d/5087840_image.jpeg",
      "time_removed": 0,
      "note": null,
      "time_updated": 1351104901,
      "time_created": 1351058509,
      "date": 20121023,
      "heart_rate": 1000,
      "type": "cardiac",
      "diastolic_pressure": 80
   }
}
	

Creates a new user event to record cardiac metrics.

URI Method Response Type Returns
/nudge/api/users/@me/cardiac_events POST application/json Cardiac
Parameter Type Description
title string Title of the event.
heart_rate int Heart rate metric.
systolic_pressure int Blood pressure metric.
diastolic_pressure int Blood pressure metric.
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/cardiac_events HTTP/1.1
Host: jawbone.com 
Content-Type: application/x-www-form-urlencoded
title=Cardiac check Oct 24&image_url=http://site.com/image.png& heart_rate=70&systolic_pressure=120&diastolic_pressure=80
	

Will return:

HTTP 201 Created
{
   "meta": 
   {
      "user_xid": "V6p0-s4-qIo",
      "message": "Created",
      "code": 201,
      "time": 1351118230
    },
    "data": 
    {
       "systolic_pressure": 120,
       "xid": "PLDYGKaIhtc",
       "title": "Cardiac check Oct 24",
       "image": "/nudge/image/d/508_image.jpeg",
       "time_removed": 0,
       "time_updated": 0,
       "time_created": 1351118230,
       "date": 20121024,
       "heart_rate": 70,
       "type": "cardiac",
       "diastolic_pressure": 80
    }
}
	

Delete a single cardiac 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/cardiac_events/{event_xid} DELETE application/json Cardiac

Example:

DELETE https://jawbone.com/nudge/api/v.1.0/cardiac_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": "Cardiac event data with xid 0ac1wXjUAYQ was removed",
      "code": 200,
      "time": 1351121565
   },
   "data": {}
}