Metrics
API Version 2 (V2)
Oxygen Saturation (SP02)
You can retrieve user oxygen saturation by user_id and filter by date range
Get a oxygen saturation data by user_id
GET
Request
Query Parameters
user_id
required
String
User ID returned by add integration request. This key should be stored in your database against the user and used for all interactions with the Spike API.
start_date
required
String
Date from in YYYY-MM-DD format
end_date
required
String
Date to in YYYY-MM-DD format
Header Parameters
authorizationtoken
optional
String
Client access token (deprecated)
x-spike-auth
required
String
Client access token
Python
Node.js
Ruby
Java
Curl
1import requests
2
3url = "https://api.spikeapi.com/v2/metrics/oxygen_saturation/?user_id=fa1e3803-6068-4ea7-9788-eccce210daa1&start_date=2020-05-01&end_date=2020-05-03"
4headers = {}
5headers['x-spike-auth'] = 'fa0b3803-1111-2222-9788-eccce210d30c'
6response = requests.request("GET", url, headers=headers)
7
8print(response.text)
Responses
200
1{
2 "user_id": "fa1e3803-6068-4ea7-9788-eccce210daa1",
3 "start_date": "2020-05-01",
4 "end_date": "2020-05-03",
5 "type": "oxygen_saturation",
6 "source": [
7 {
8 "name": "fitbit",
9 "status": "ok"
10 }
11 ],
12 "data": [
13 {
14 "date": "2020-05-01",
15 "avg": 97.2,
16 "min": 95.1,
17 "max": 99.2,
18 "intraday_data": [
19 {
20 "value": 94.0,
21 "time": "2023-05-01T01:07:00"
22 },
23 {
24 "value": 94.0,
25 "time": "2023-05-01T01:08:00"
26 }
27 ],
28 "source": "fitbit"
29 },
30 {
31 "date": "2020-05-02",
32 "avg": 96.2,
33 "min": 91.1,
34 "max": 99.2,
35 "intraday_data": [
36 {
37 "value": 94.0,
38 "time": "2023-05-02T01:07:00"
39 },
40 {
41 "value": 94.0,
42 "time": "2023-05-02T01:08:00"
43 }
44 ],
45 "source": "fitbit"
46 },
47 {
48 "date": "2020-05-03",
49 "avg": 97.4,
50 "min": 95.1,
51 "max": 99.2,
52 "intraday_data": [
53 {
54 "value": 94.0,
55 "time": "2023-05-03T01:07:00"
56 },
57 {
58 "value": 94.0,
59 "time": "2023-05-03T01:08:00"
60 }
61 ],
62 "source": "fitbit"
63 }
64 ]
65}
1<style>
2@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');
3
4.h2, .h3, .list, .description{
5 font-family: 'Poppins', sans-serif;
6 font-weight: 500;
7}
8
9.h2 {
10 margin-top: -20px;
11 margin-bottom: 20px;
12
13 font-size: 30px;
14}
15
16.h3 {
17 font-size: 22px;
18 margin-top: -20px;
19}
20
21.list-wrapper {
22 white-space: normal;
23 margin-top: -10px;
24}
25
26.list, .description {
27 font-size: 14px;
28}
29
30</style>
31<h2 class="h2">Fields</h2>
32<h3 class="h3">Oxygen_saturation.date</h3>
33<ul class="list-wrapper">
34 <li class="list">Type: String</li>
35 <li class="list">Format: Date, YYYY-MM-DD</li>
36 <li class="list">Example: 2020-05-01</li>
37</ul><p class="description">Date of measurement. For Whoop, date when the cycle ende</p>
38
39<h3 class="h3">Oxygen_saturation.avg</h3>
40<ul class="list-wrapper">
41 <li class="list">Type: Float</li>
42 <li class="list">Example: 97.5</li>
43</ul><p class="description">The mean of the 1 minute SpO2 levels calculated as a percentage value.</p>
44
45<h3 class="h3">Oxygen_saturation.min</h3>
46<ul class="list-wrapper">
47 <li class="list">Type: Float</li>
48 <li class="list">Example: 96</li>
49</ul><p class="description">The minimum daily SpO2 level calculated as a percentage value.</p>
50
51<h3 class="h3">Oxygen_saturation.max</h3>
52<ul class="list-wrapper">
53 <li class="list">Type: Float</li>
54 <li class="list">Example: 100</li>
55</ul><p class="description">The maximum daily SpO2 level calculated as a percentage value.</p>
56
57<h3 class="h3">Oxygen_saturation.intraday_data.value</h3>
58<ul class="list-wrapper">
59 <li class="list">Type: Float</li>
60 <li class="list">Example: 100.1</li>
61
62<h3 class="h3">Oxygen_saturation.intraday_data.time</h3>
63<ul class="list-wrapper">
64 <li class="list">Type: String</li>
65 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
66 <li class="list">Example: 2021-05-01T09:36:13</li>
67
68
69<h3 class="h3">Oxygen_saturation.source</h3>
70<ul class="list-wrapper">
71 <li class="list">Type: String</li>
72 <li class="list">Example: fitbit</li>
73</ul><p class="description">Data source</p>
74