Spren HRV API
summary spren hrv api is restful and partially async it communicates with json request and response bodies authorization is in the header environments https //test api spren com https //prod api spren com headers/authorization header notes example x api key your api key for authorization x api key \<api key> content type json, if request body present content type application/json endpoints post /submit/sdkdata post /submit/devicedata get /results/{guid} get /populationcomparison post /submit/userdata biomarkers and insights readiness and ansbalance require 2 readings on 2 separate days within 10 days or value will be null this will occur for a user's first reading or after their first reading if they have not performed a reading in the last 10 days, and when this occurs an errordescription of "baseline not set" is returned see get /results/{guid} below for more details response key description type data type return values hr heart rate biomarker number floating point, unrestricted range hrvscore hrv score biomarker number floating point, 0 100 rmssd rmssd biomarker number floating point, unrestricted range breathingrate breathing/respiration rate biomarker number floating point, unrestricted range readiness morning readiness insight number int, 0 10 ansbalance ans balance level insight number int, 1 5 balance ans balance insight string sns | psns signalquality signal quality other number int, 1 3 require 2 readings on 2 separate days within 10 days or value will be null for insights endpoints async post /submit/sdkdata tab examples url https test api spren com submit sdkdata name submit data method post request pathparameters queryparameters headerparameters kind required name x api key type string description your api key kind required name content type type string description application json bodydataparameters kind required name user type string description user id kind required name readingdata type string description spren vision sdk reading data formdataparameters results languages id ibopm m2ir0kyhpjehnld code guid iowq4fdexampleqm ey7n9wgvhsnq6jexamplezb7hsqdask jd1vexamplea3km language 200 customlabel id l0fpbusiflwmxgcdfqib3 code n message bad request error; please check that your payload and parameters are formatted correctly n language 401 customlabel id jjsjc6qqwbn9aaa0l tcz code n message authentication authorization error; please check that your authorization information is correct n language 404 customlabel selectedlanguageid jjsjc6qqwbn9aaa0l tcz examples languages id kqjrquyizeegxwsavakod code n user superawesomesprenuser n readingdata z6dwlcxi5examplerv48go0e7s25ucfcev8mzst4s4oggpkexampleq74abn53c8a8rqotfszeqr6bawwae15al62xeyexample n language json customlabel request body example id tewczame7on0e13yakdpp code n user string user id n readingdata string spren vision sdk reading data n language none customlabel request body schema id bgsp3oabwerrw6ljbwk o code curl location request post https test api spren com submit sdkdata n header x api key yoursprenapikey n header content type application json n data raw user superawesomesprenuser readingdata z6dwlcxi5examplerv48go0e7s25ucfcev8mzst4s4oggpkexampleq74abn53c8a8rqotfszeqr6bawwae15al62xeyexample language curl customlabel selectedlanguageid kqjrquyizeegxwsavakod description from a spren vision sdk reading currentnewparameter label body parameter value bodydataparameters post /submit/devicedata while we accept interbeat intervals (ibis) from any device, the following devices have been tested apple watch polar h7, h9, and h10 garmin hrm dual and hrm pro suunto smart belt 4iiii viiiiva zephyr hxm cardiosport tp3 ambiotex smart shirt with cardio monitor blueleza hrm blue tab examples url https test api spren com submit devicedata name submit data method post request pathparameters queryparameters headerparameters kind required name x api key type string description your api key kind required name content type type string description application json bodydataparameters kind required name user type string description user id kind required name readingdata type object description see request body example and request body schema tabs formdataparameters results languages id 1o1ukpxgnmtueiotreoiz code guid iowq4fdexampleqm ey7n9wgvhsnq6jexamplezb7hsqdask jd1vexamplea3km language 200 customlabel id bpu9caaukcr44 9 vnzok code n message bad request error; please check that your payload and parameters are formatted correctly n language 400 customlabel id i0blwq3re0l9pxcu6suar code n message authentication authorization error; please check that your authorization information is correct n language 401 customlabel selectedlanguageid bpu9caaukcr44 9 vnzok examples languages id sixc u1ygatvfjxi6qdsp code n user superawesomesprenuser n readingdata n n timeinfo n timezoneabbreviation est n readingstarttime 2022 01 31t14 29 47 836 05 00 n timezoneid america new york n regioncode us n n n ibis 1195 1117 1184 1272 1329 1305 1308 1211 1110 1098 1292 1418 1368 1372 1307 1194 1077 1140 1373 1363 1328 1303 1191 1042 954 1011 1396 1360 1363 1348 1262 1172 1183 1309 1338 1317 1264 1171 1051 1111 1317 1330 1303 1240 1153 1042 1088 1288 1265 1304 1241 1168 1060 1106 1223 1273 1265 1244 1173 1054 1004 1084 1252 1284 1210 1108 1128 1062 1072 1188 1289 1278 1251 1178 1055 1011 1090 1231 1293 1278 1225 1128 1048 1064 1177 1256 1220 1193 1175 1129 1056 994 981 1209 1314 1271 1255 1208 1113 1002 981 1164 1322 1302 1264 1216 1115 1044 1082 1227 1245 1224 1189 1181 1127 1087 1046 1187 1307 1322 1282 1232 1126 1039 1010 1154 1305 1292 n ibiresolution 1 1024 n n devicetype bluetoothcheststrap n devicemodel h7 n devicebrand polar n sourceapp health n n additionaldata spo2 97 n n language json customlabel request body example id ti1kdtxjto4k5skm5u4bz code n user user string n readingdata n n timeinfo n timezoneabbreviation string e g est n readingstarttime datetime string yyyy mm dd t hh mm ss ssszzzzz e g 2022 01 31t14 29 47 836 05 00 n timezoneid string timezone id e g america new york n regioncode string region code e g us n n n ibis number minimum of 50 ibis limited to 10 minutes n ibiresolution 1 1000 or 1 1024 or 1 for apple watch n n devicetype required if sourceapp not set string n devicemodel optional string n devicebrand optional string n sourceapp required if devicetype not set string n n additionaldata optional json string e g spo2 97 limited to 300kb n n language none customlabel request body schema id t6ldok wmrredk4batcjv code n user superawesomesprenuser n readingdata n n timeinfo n timezoneabbreviation est n readingstarttime 2022 01 31t14 29 47 836 05 00 n timezoneid america new york n regioncode us n n n ibis 0 4843750298023224 1 5517280101776123 2 657050609588623 3 7742903232574463 4 8220062255859375 5 828125 6 844399929046631 7 88457727432251 8 874582290649414 9 875000953674316 10 967329025268555 12 10489273071289 13 176104545593262 14 196523666381836 15 272435188293457 16 402050018310547 17 508533477783203 18 508146286010742 19 565383911132812 20 672771453857422 21 826953887939453 22 902862548828125 23 955883026123047 25 045291900634766 26 14838218688965 27 140625 28 0631103515625 29 03072738647461 30 06393051147461 31 15479278564453 32 248600006103516 33 2828369140625 34 322052001953125 35 37783432006836 36 442169189453125 37 405731201171875 38 28491973876953 39 21875 40 21875 41 2934455871582 42 304595947265625 43 25 44 24182891845703 45 2844352722168 46 29751968383789 47 407127380371094 48 56134033203125 49 62022399902344 50 61715316772461 51 67640686035156 52 78999328613281 53 88925552368164 54 94934844970703 56 047752380371094 57 1885871887207 58 228050231933594 59 27463150024414 60 37499997019768 61 511565804481506 62 5560462474823 63 58746147155762 64 65309286117554 65 76651000976562 66 74961137771606 67 78284978866577 68 83904552459717 69 81901168823242 70 83590984344482 71 9028434753418 73 02445411682129 74 03125 75 09842586517334 76 24885749816895 77 40503883361816 78 48084449768066 79 59456634521484 80 71140098571777 81 6954460144043 82 7123031616211 83 77799224853516 84 8914566040039 85 89860343933105 86 88304710388184 87 91612434387207 89 01422882080078 90 03980827331543 91 07221603393555 92 15488052368164 93 27340316772461 94 42807006835938 95 55830001831055 96 65484619140625 97 79670715332031 98 91775512695312 100 0401725769043 101 07981491088867 102 06212997436523 103 09540176391602 104 18608856201172 105 26212692260742 106 20312118530273 107 1871223449707 108 24712753295898 109 34455108642578 110 3766098022461 111 44198608398438 112 5404052734375 113 64141082763672 114 65488052368164 115 60173034667969 116 58527755737305 117 67549896240234 118 80835723876953 119 85273742675781 120 89062494039536 122 00082588195801 123 14705157279968 124 25875854492188 125 3061637878418 126 35422229766846 127 45398759841919 128 60808849334717 129 73786735534668 130 734375 131 7749319076538 132 8654270172119 133 97714042663574 135 07672595977783 136 07035446166992 137 1374282836914 138 23282432556152 139 33598518371582 140 385591506958 141 32812690734863 142 29640007019043 143 34667015075684 144 45397567749023 145 5405979156494 146 53087043762207 147 5640640258789 148 63706588745117 149 70759201049805 150 71924018859863 151 71843910217285 152 74370193481445 153 81671524047852 154 79243087768555 155 76891708374023 156 8154640197754 157 9302635192871 159 03949737548828 160 0385971069336 161 03913497924805 162 0733299255371 163 13729858398438 164 21561431884766 165 26880645751953 166 37579727172852 167 48523712158203 168 57672119140625 169 53887176513672 170 4471778869629 171 37500381469727 172 37499618530273 173 3820915222168 174 4233741760254 175 42995834350586 176 3671531677246 177 34336471557617 178 40122604370117 179 48114013671875 180 484375 181 47623324394226 182 47652959823608 183 51719069480896 184 531964302063 185 4995265007019 186 46076440811157 187 47742462158203 188 5016269683838 189 54054927825928 190 53085708618164 191 54897117614746 192 6414270401001 193 7691478729248 194 8837947845459 195 890625 196 88312530517578 197 91597366333008 198 97961807250977 200 05919075012207 201 0953254699707 202 16857528686523 203 25482940673828 204 21105575561523 205 14818954467773 206 14062690734863 207 1816349029541 208 23711967468262 209 30925941467285 210 4228115081787 211 5224323272705 212 5230941772461 213 53190994262695 214 56406784057617 215 54646682739258 216 5797882080078 217 67046737670898 218 67993927001953 219 65573501586914 220 65625 221 6724967956543 222 659912109375 223 68122482299805 224 74639129638672 n ibiresolution 1 n n devicetype watch n devicemodel 6 n devicebrand apple n sourceapp applehealth n n additionaldata spo2 97 n n language json customlabel apple watch example id lvv4hahp3u7 hn g3qifu code curl location request post https test api spren com submit devicedata n header x api key yoursprenapikey n header content type application json n data raw user superawesomesprenuser readingdata timeinfo timezoneabbreviation est readingstarttime 2022 01 31t14 29 47 836 05 00 timezoneid america new york regioncode us ibis 1195 1117 1184 1272 1329 1305 1308 1211 1110 1098 1292 1418 1368 1372 1307 1194 1077 1140 1373 1363 1328 1303 1191 1042 954 1011 1396 1360 1363 1348 1262 1172 1183 1309 1338 1317 1264 1171 1051 1111 1317 1330 1303 1240 1153 1042 1088 1288 1265 1304 1241 1168 1060 1106 1223 1273 1265 1244 1173 1054 1004 1084 1252 1284 1210 1108 1128 1062 1072 1188 1289 1278 1251 1178 1055 1011 1090 1231 1293 1278 1225 1128 1048 1064 1177 1256 1220 1193 1175 1129 1056 994 981 1209 1314 1271 1255 1208 1113 1002 981 1164 1322 1302 1264 1216 1115 1044 1082 1227 1245 1224 1189 1181 1127 1087 1046 1187 1307 1322 1282 1232 1126 1039 1010 1154 1305 1292 ibiresolution 1 1024 devicetype bluetoothcheststrap devicemodel h7 devicebrand polar sourceapp health additionaldata spo2 97 language curl customlabel selectedlanguageid t6ldok wmrredk4batcjv description from an external measurement device currentnewparameter label body parameter value bodydataparameters get /results/{guid} for certain insights, a minimum number of readings are required see the biomarkers/insights section status/value for each biomarker or insight, a status/value json object is returned status/value { "status" \<string, "pending", "complete", or "error"> "value" \<string, number, optional, null on error, see biomarkers/insights section below for precision and range>, "errordescription" \<string, optional> } state permutations status description value (for calculated biomarker/insight) errordescription pending calculation is in progress null null complete calculation is complete string, number, see biomarkers/insights section below for precision and range null error calculation has errored null string, error encountered tab examples url https test api spren com results guid name get biomarkers and insights method get request pathparameters queryparameters headerparameters kind required name x api key type string description your api key bodydataparameters formdataparameters results languages id gaoslah ifnejt3hbnt5w code see response body example n language 200 customlabel id 5omkqb89mju2kandhetoa code n message bad request error; please check that your payload and parameters are formatted correctly n language 400 customlabel id kup1bjmfyqg5igylehwmt code n message authentication authorization error; please check that your authorization information is correct n language 401 customlabel selectedlanguageid gaoslah ifnejt3hbnt5w examples languages id fjdo8j43d9zlejz54erki code see the biomarkers insights section for additional info about value precision and range n n biomarkers n hr n value 79 7994974014928 n status complete n errordescription null n n hrvscore n value 61 691193950645186 n status complete n errordescription null n n rmssd n value 51 25768235103885 n status complete n errordescription null n n breathingrate n value 11 7 n status complete n errordescription null n n n insights n readiness n value null n status complete n errordescription null n n ansbalance n value null n status complete n errordescription null n n balance n value null n status complete n errordescription null n n n signalquality n value 2 n status complete n errordescription null n n n stress insight coming soon! n language json customlabel response body example id 7umphc5933nm2hdd 24lv code n biomarkers n biomarker name string status value see above n n n insights n insight name string status value see above n n n signalquality status value see above n language none customlabel response body schema id gjr5vjjujs6uhmvopzahl code curl location request get https test api spren com results iowq4fdexampleqm ey7n9wgvhsnq6jexamplezb7hsqdask jd1vexamplea3km n header x api key yoursprenapikey language curl customlabel selectedlanguageid fjdo8j43d9zlejz54erki description with a guid from a sdk or device data endpoint post response currentnewparameter label header parameter value headerparameters endpoints sync get /populationcomparison types in response gender male female other age range age 18 25 age 26 35 age 36 45 age 46 55 age 56 65 age 66 1000 mean/range object, result object mean/range { "mean" \<number>, "range" \[ \<range start, number>, \<range end, number> ] } result "result" { \<mean/range>, "bygender" { "male" \<mean/range>, "female" \<mean/range>, "other" \<mean/range>, } } tab examples url https test api spren com populationcomparison name get population comparison data method get request pathparameters queryparameters headerparameters bodydataparameters kind required name x api key type string description your api key formdataparameters results languages id 5fyae qptizagq6osywsg code see response body example n language 200 customlabel id rfahdbhgc0pjl6ygyes18 code n message bad request error; please check that your payload and parameters are formatted correctly n language 400 customlabel id qw7igcq0q tmctzbgemem code n message authentication authorization error; please check that your authorization information is correct n language 401 customlabel selectedlanguageid 5fyae qptizagq6osywsg examples languages id ptbciak1trldqe2zn7jcy code n hrv n result n mean 59 48192017501054 n range n 24 884232390998157 n 94 07960795902292 n n bygender n male n mean 59 15151765546141 n range n 24 553829871449025 n 93 7492054394738 n n n female n mean 58 14132921101882 n range n 23 543641427006435 n 92 7390169950312 n n n other n mean 59 48820715817252 n range n 30 65680067149553 n 88 31961364484951 n n n n n age 18 25 n result n mean 67 30673952641166 n range n 38 47533303973467 n 96 13814601308866 n n bygender n male n mean 67 70155230781934 n range n 38 87014582114235 n 96 53295879449632 n n n female n mean 65 13206135428358 n range n 42 066936164941986 n 88 19718654362518 n n n other n mean 0 n range n 0 n 0 n n n n n n n n hr n see hrv above n n n language json customlabel response body example id biyw03teaxh3ir0myptal code n t t hrv n t t t t result n t t t t age range string n t t t t t t result n t t t t n t t n t t hr n t t t t result n t t t t age range string n t t t t t t result n t t t t n t t n language json customlabel response body schema id db lzojj0axusrfxxzlpv code curl location request get https test api spren com populationcomparison n header x api key yoursprenapikey language curl customlabel selectedlanguageid db lzojj0axusrfxxzlpv description for genders and age ranges currentnewparameter label body parameter value bodydataparameters post /submit/userdata tab examples url https test api spren com submit userdata name submit user data method post request pathparameters queryparameters headerparameters kind required name x api key type string description your api key kind required name content type type string description application json bodydataparameters kind required name user type string description user id kind optional name birthdate type string description user birthdate kind optional name gender type string description user gender formdataparameters results languages id sawrpngdtr4pu4kgi9wf9 code language 200 customlabel id 3ctuyoxu83hlhijsqk rr code n message bad request error; please check that your payload and parameters are formatted correctly n language 400 customlabel id w8wwvt a8oskqknwgy2kz code n message authentication authorization error; please check that your authorization information is correct n language 401 customlabel selectedlanguageid sawrpngdtr4pu4kgi9wf9 examples languages id g0 rlht8yiftkdmzcib1u code n user superawesomesprenuser n birthdate 2017 09 19 n gender female n language json customlabel request body example id itx6zk5ykijh8wbdqwy m code n user string n birthdate optional string yyyy mm dd n gender optional string male female or other n language none customlabel request body schema id rvcszbcc hbr13dg4ov6q code curl location request post https test api spren com submit userdata n header x api key yoursprenapikey n header content type application json n data raw user superawesomesprenuser birthdate 2017 09 19 gender female language curl customlabel selectedlanguageid g0 rlht8yiftkdmzcib1u description birthdate and gender for future intra customer hr and hrv population comparisons currentnewparameter label body parameter value bodydataparameters