Sleep
Sleep Cycle
Meal
Workouts
Profile
Activity
Body
Menstrual Cycle
Electrocardiogram
Vitals Timeseries
Body Timeseries
Activity Timeseries
Workout Stream Timeseries
Wellness Timeseries
Diary Timeseries
Nutrition Timeseries
Sleep
Summary
Get sleep summary for user_id
GET
/
v2
/
summary
/
sleep
/
{user_id}
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{user_id}?start_date={{START_DATE}}&end_date={{END_DATE}} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"sleep": [
{
"average_hrv": 78,
"awake": 2400,
"bedtime_start": "2023-02-27T12:31:24+00:00",
"bedtime_stop": "2023-02-27T12:31:24+00:00",
"calendar_date": "2023-02-27",
"created_at": "2023-02-27T20:31:24+00:00",
"date": "2023-02-27T12:31:24+00:00",
"deep": 2400,
"duration": 28800,
"efficiency": 0.97,
"hr_average": 50,
"hr_lowest": 43,
"id": "e2e0eb04-6641-4858-9de5-649efb41b346",
"latency": 1000,
"light": 2400,
"rem": 2400,
"respiratory_rate": 14,
"skin_temperature": 36.5,
"source": {
"provider": "oura",
"type": "unknown"
},
"temperature_delta": -0.2,
"timezone_offset": 2400,
"total": 28800,
"updated_at": "2023-02-28T01:22:38+00:00",
"user_id": "1449752e-0d8a-40e0-9206-91ab099b2537"
}
]
}
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{user_id}?start_date={{START_DATE}}&end_date={{END_DATE}} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
Authorizations
Vital Team API Key
Path Parameters
Query Parameters
Provider oura/strava etc
Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00
Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59
Response
200
application/json
Successful Response
The response is of type object
.
curl --request GET \
--url {{BASE_URL}}/v2/summary/sleep/{user_id}?start_date={{START_DATE}}&end_date={{END_DATE}} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>'
{
"sleep": [
{
"average_hrv": 78,
"awake": 2400,
"bedtime_start": "2023-02-27T12:31:24+00:00",
"bedtime_stop": "2023-02-27T12:31:24+00:00",
"calendar_date": "2023-02-27",
"created_at": "2023-02-27T20:31:24+00:00",
"date": "2023-02-27T12:31:24+00:00",
"deep": 2400,
"duration": 28800,
"efficiency": 0.97,
"hr_average": 50,
"hr_lowest": 43,
"id": "e2e0eb04-6641-4858-9de5-649efb41b346",
"latency": 1000,
"light": 2400,
"rem": 2400,
"respiratory_rate": 14,
"skin_temperature": 36.5,
"source": {
"provider": "oura",
"type": "unknown"
},
"temperature_delta": -0.2,
"timezone_offset": 2400,
"total": 28800,
"updated_at": "2023-02-28T01:22:38+00:00",
"user_id": "1449752e-0d8a-40e0-9206-91ab099b2537"
}
]
}