Metrics
API Version 2 (V2)
Body
You can retrieve user body data by user_id and filter by date range
Get body 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.
Header Parameters
authorizationtoken
optional
String
Client access token (deprecated)
x-spike-auth
required
String
Client access token
Python
Node.js
Ruby
Java
Curl
1curl -X GET \
2 'https://api.spikeapi.com/v2/metrics/body/?user_id=fa1e3803-6068-4ea7-9788-eccce210daa1&start_date=2020-05-01&end_date=2020-05-01' \
3 -H 'x-spike-auth: fa0b3803-1111-2222-9788-eccce210d30c'
Responses
200
1{
2 "user_id": "fa1e3803-6068-4ea7-9788-eccce210daa1",
3 "type": "body",
4 "source": [
5 {
6 "name": "withings",
7 "status": "ok"
8 }
9 ],
10 "data": [
11 {
12 "source": "withings",
13 "timezone_offset": 3600,
14 "body_data": {
15 "weight_kg": {
16 "value": 100.3,
17 "timeseries": [
18 {
19 "timestamp": "2020-05-01T21:19:43",
20 "value": 111.1
21 }
22 ]
23 },
24 "height_cm": {
25 "value": 190,
26 "timeseries": [
27 {
28 "timestamp": "2020-05-01T21:19:43",
29 "value": 111.1
30 }
31 ]
32 },
33 "BMI": {
34 "value": 10.3,
35 "timeseries": [
36 {
37 "timestamp": "2020-05-01T21:19:43",
38 "value": 11.2
39 }
40 ]
41 },
42 "bodyfat_percentage": {
43 "value": 10.3,
44 "timeseries": [
45 {
46 "timestamp": "2020-05-01T21:19:43",
47 "value": 11.2
48 }
49 ]
50 },
51 "bone_mass_g": {
52 "value": 10.3,
53 "timeseries": [
54 {
55 "timestamp": "2020-05-01T21:19:43",
56 "value": 11.2
57 }
58 ]
59 },
60 "muscle_mass_g": {
61 "value": 10.3,
62 "timeseries": [
63 {
64 "timestamp": "2020-05-01T21:19:43",
65 "value": 11.2
66 }
67 ]
68 },
69 "water_percentage": {
70 "value": 10.3,
71 "timeseries": [
72 {
73 "timestamp": "22020-05-01T21:19:43",
74 "value": 11.2
75 }
76 ]
77 }
78 },
79 "temperature_data": {
80 "skin_temperature": {
81 "temperature_celsius": 36.6,
82 "timeseries": [
83 {
84 "timestamp": "2020-05-01T21:19:43",
85 "temperature_celsius": 36.1111
86 }
87 ]
88 },
89 "core_temperature": {
90 "temperature_celsius": 36.6,
91 "timeseries": [
92 {
93 "timestamp": "2020-05-01T21:19:43",
94 "temperature_celsius": 36.1111
95 }
96 ]
97 },
98 "baseline_core_temperature": {
99 "temperature_celsius": 36.8,
100 "timeseries": [
101 {
102 "timestamp": "2020-05-01T08:00:00Z",
103 "temperature_celsius": 36.8
104 }
105 ]
106 },
107 "diff_from_baseline_temperature": {
108 "diff_temperature_celsius": -1.6,
109 "timeseries": [
110 {
111 "timestamp": "2020-05-01T21:19:43",
112 "diff_temperature_celsius": -2.0
113 },
114 {
115 "timestamp": "2020-05-01T21:19:43",
116 "diff_temperature_celsius": 0.2
117 }
118 ]
119 }
120
121 },
122 "blood_pressure_data": [
123 {
124 "timestamp": "2020-05-01T21:19:43",
125 "systolic_blood_pressure": 120,
126 "diastolic_blood_pressure": 70
127 }
128 ]
129 }
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">Body.timezone_offset</h3>
33<ul class="list-wrapper">
34 <li class="list">Type: Int</li>
35 <li class="list">Unit: Seconds</li>
36 <li class="list">Example: 60</li>
37</ul>
38<p class="description">Time zone offset from UTC as seconds.</p>
39
40<h3 class="h3">Body.body_data.weight_kg.value</h3>
41<ul class="list-wrapper">
42 <li class="list">Type: Float</li>
43 <li class="list">Example: 100.9</li>
44</ul>
45<p class="description">The value of body weight in kgs</p>
46
47<h3 class="h3">Body.body_data.weight_kg.timeseries.timestamp</h3>
48<ul class="list-wrapper">
49 <li class="list">Type: String</li>
50 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
51 <li class="list">Example: 2021-05-01T09:36:13</li>
52</ul>
53<p class="description">Local time when weight was recorded</p>
54
55<h3 class="h3">Body.body_data.weight_kg.timeseries.value</h3>
56<ul class="list-wrapper">
57 <li class="list">Type: Float</li>
58 <li class="list">Example: 99.2</li>
59</ul>
60<p class="description">value when weight was recorded</p>
61
62<h3 class="h3">Body.body_data.height_cm.value</h3>
63<ul class="list-wrapper">
64 <li class="list">Type: Float</li>
65 <li class="list">Example: 100.9</li>
66</ul>
67<p class="description">The value of height in cms</p>
68
69<h3 class="h3">Body.body_data.height_cm.timeseries.timestamp</h3>
70<ul class="list-wrapper">
71 <li class="list">Type: String</li>
72 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
73 <li class="list">Example: 2021-05-01T09:36:13</li>
74</ul>
75<p class="description">Local time when height was recorded</p>
76
77<h3 class="h3">Body.body_data.height_cm.timeseries.value</h3>
78<ul class="list-wrapper">
79 <li class="list">Type: Float</li>
80 <li class="list">Example: 99.2</li>
81</ul>
82<p class="description">value when height was recorded</p>
83
84<h3 class="h3">Body.body_data.BMI.value</h3>
85<ul class="list-wrapper">
86 <li class="list">Type: Float</li>
87 <li class="list">Example: 10.9</li>
88</ul>
89<p class="description">The value of BMI</p>
90
91<h3 class="h3">Body.body_data.BMI.timeseries.timestamp</h3>
92<ul class="list-wrapper">
93 <li class="list">Type: String</li>
94 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
95 <li class="list">Example: 2021-05-01T09:36:13</li>
96</ul>
97<p class="description">Local time when BMI was recorded</p>
98
99<h3 class="h3">Body.body_data.BMI.timeseries.value</h3>
100<ul class="list-wrapper">
101 <li class="list">Type: Float</li>
102 <li class="list">Example: 9.2</li>
103</ul>
104<p class="description">value when BMI was recorded</p>
105
106<h3 class="h3">Body.body_data.bodyfat_percentage.value</h3>
107<ul class="list-wrapper">
108 <li class="list">Type: Float</li>
109 <li class="list">Example: 10.9</li>
110</ul>
111<p class="description">The value of bodyfat percentage</p>
112
113<h3 class="h3">Body.body_data.bodyfat_percentage.timeseries.timestamp</h3>
114<ul class="list-wrapper">
115 <li class="list">Type: String</li>
116 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
117 <li class="list">Example: 2021-05-01T09:36:13</li>
118</ul>
119<p class="description">Local time when body fat percentage was recorded</p>
120
121<h3 class="h3">Body.body_data.bodyfat_percentage.timeseries.value</h3>
122<ul class="list-wrapper">
123 <li class="list">Type: Float</li>
124 <li class="list">Example: 99.2</li>
125</ul>
126<p class="description">value when bodyfat percentage was recorded</p>
127
128<h3 class="h3">Body.body_data.bone_mass_g.value</h3>
129<ul class="list-wrapper">
130 <li class="list">Type: Float</li>
131 <li class="list">Example: 10.9</li>
132</ul>
133<p class="description">The value of Bone Mass</p>
134
135<h3 class="h3">Body.body_data.bone_mass_g.timeseries.timestamp</h3>
136<ul class="list-wrapper">
137 <li class="list">Type: String</li>
138 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
139 <li class="list">Example: 2021-05-01T09:36:13</li>
140</ul>
141<p class="description">Local time when Bone Mass was recorded</p>
142
143<h3 class="h3">Body.body_data.bone_mass_g.timeseries.value</h3>
144<ul class="list-wrapper">
145 <li class="list">Type: Float</li>
146 <li class="list">Example: 9.2</li>
147</ul>
148<p class="description">value when Bone Mass was recorded</p>
149
150<h3 class="h3">Body.body_data.muscle_mass_g.value</h3>
151<ul class="list-wrapper">
152 <li class="list">Type: Float</li>
153 <li class="list">Example: 10.9</li>
154</ul>
155<p class="description">The value of Muscle Mass</p>
156
157<h3 class="h3">Body.body_data.muscle_mass_g.timeseries.timestamp</h3>
158<ul class="list-wrapper">
159 <li class="list">Type: String</li>
160 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
161 <li class="list">Example: 2021-05-01T09:36:13</li>
162</ul>
163<p class="description">Local time when muscle mass was recorded</p>
164
165<h3 class="h3">Body.body_data.muscle_mass_g.timeseries.value</h3>
166<ul class="list-wrapper">
167 <li class="list">Type: Float</li>
168 <li class="list">Example: 9.2</li>
169</ul>
170<p class="description">value when muscle mass was recorded</p>
171
172<h3 class="h3">Body.body_data.water_percentage.value</h3>
173<ul class="list-wrapper">
174 <li class="list">Type: Float</li>
175 <li class="list">Example: 10.9</li>
176</ul>
177<p class="description">The value of water pecentage</p>
178
179<h3 class="h3">Body.body_data.water_percentage.timeseries.timestamp</h3>
180<ul class="list-wrapper">
181 <li class="list">Type: String</li>
182 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
183 <li class="list">Example: 2021-05-01T09:36:13</li>
184</ul>
185<p class="description">Local time when water percentage was recorded</p>
186
187<h3 class="h3">Body.body_data.water_percentage.timeseries.value</h3>
188<ul class="list-wrapper">
189 <li class="list">Type: Float</li>
190 <li class="list">Example: 99.2</li>
191</ul>
192<p class="description">value when water percentage was recorded</p>
193
194<h3 class="h3">Body.temperature_data.skin_temprature.temperature_celsius</h3>
195<ul class="list-wrapper">
196 <li class="list">Type: Float</li>
197 <li class="list">Example: 36.9</li>
198</ul>
199<p class="description">The value of skin temprature in celcius</p>
200
201<h3 class="h3">Body.temperature_data.skin_temprature.timeseries.timestamp</h3>
202<ul class="list-wrapper">
203 <li class="list">Type: String</li>
204 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
205 <li class="list">Example: 2021-05-01T09:36:13</li>
206</ul>
207<p class="description">Local time when skin temprature was recorded</p>
208
209<h3 class="h3">Body.temperature_data.skin_temprature.timeseries.temperature_celsius</h3>
210<ul class="list-wrapper">
211 <li class="list">Type: Float</li>
212 <li class="list">Example: 36.2</li>
213</ul>
214<p class="description">value when skin temprature was recorded</p>
215
216<h3 class="h3">Body.temperature_data.core_temprature.temperature_celsius</h3>
217<ul class="list-wrapper">
218 <li class="list">Type: Float</li>
219 <li class="list">Example: 36.9</li>
220</ul>
221<p class="description">The value of core temprature in celcius</p>
222
223<h3 class="h3">Body.temperature_data.core_temprature.timeseries.timestamp</h3>
224<ul class="list-wrapper">
225 <li class="list">Type: String</li>
226 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
227 <li class="list">Example: 2021-05-01T09:36:13</li>
228</ul>
229<p class="description">Local time when core temprature was recorded</p>
230
231<h3 class="h3">Body.temperature_data.core_temprature.timeseries.temperature_celsius</h3>
232<ul class="list-wrapper">
233 <li class="list">Type: Float</li>
234 <li class="list">Example: 36.2</li>
235</ul>
236<p class="description">value when core temprature was recorded</p>
237
238<h3 class="h3">Body.temperature_data.baseline_core_temprature.temperature_celsius</h3>
239<ul class="list-wrapper">
240 <li class="list">Type: Float</li>
241 <li class="list">Example: 36.9</li>
242</ul>
243<p class="description">The value of core temprature in celcius</p>
244
245<h3 class="h3">Body.temperature_data.baseline_core_temprature.timeseries.timestamp</h3>
246<ul class="list-wrapper">
247 <li class="list">Type: String</li>
248 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
249 <li class="list">Example: 2021-05-01T09:36:13</li>
250</ul>
251<p class="description">Local time when core temprature was recorded</p>
252
253<h3 class="h3">Body.temperature_data.baseline_core_temprature.timeseries.temperature_celsius</h3>
254<ul class="list-wrapper">
255 <li class="list">Type: Float</li>
256 <li class="list">Example: 36.2</li>
257</ul>
258<p class="description">value when core temprature was recorded</p>
259
260<h3 class="h3">Body.temperature_data.diff_from_baseline_temperature.diff_temperature_celsius</h3>
261<ul class="list-wrapper">
262 <li class="list">Type: Float</li>
263 <li class="list">Example: 36.9</li>
264</ul>
265<p class="description">The value of difference from Baseline Temprature in celcius</p>
266
267<h3 class="h3">Body.temperature_data.diff_from_baseline_temperature.timeseries.timestamp</h3>
268<ul class="list-wrapper">
269 <li class="list">Type: String</li>
270 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
271 <li class="list">Example: 2021-05-01T09:36:13</li>
272</ul>
273<p class="description">Local time when core temprature was recorded</p>
274
275<h3 class="h3">Body.temperature_data.diff_from_baseline_temperature.timeseries.diff_temperature_celsius</h3>
276<ul class="list-wrapper">
277 <li class="list">Type: Float</li>
278 <li class="list">Example: 36.2</li>
279</ul>
280<p class="description">value when core temprature was recorded</p>
281<h3 class="h3">Body.blood_pressure_data.timestamp</h3>
282<ul class="list-wrapper">
283 <li class="list">Type: String</li>
284 <li class="list">Format: Date time, YYYY-MM-DDThh:mm:ss</li>
285 <li class="list">Example: 2021-05-01T09:36:13</li>
286</ul>
287<p class="description">Local time when blood pressure was recorded</p>
288
289<h3 class="h3">Body.blood_pressure_data.systolic_blood_pressure</h3>
290<ul class="list-wrapper">
291 <li class="list">Type: Int</li>
292 <li class="list">Example: 120</li>
293</ul>
294<p class="description">Systolic blood pressure value</p>
295
296<h3 class="h3">Body.blood_pressure_data.diastolic_blood_pressure</h3>
297<ul class="list-wrapper">
298 <li class="list">Type: Int</li>
299 <li class="list">Example: 80</li>
300</ul>
301<p class="description">Diastolic blood pressure value</p>