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": {
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"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"
}
]
}
Get sleep summary for 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": {
"device_id": "550e8400-e29b-41d4-a716-446655440000",
"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>'
Vital Team API Key
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
Successful Response
The response is of type object
.