Fetch one user's intra-day detail data (v2)
curl --request GET \
--url https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"_time": "2025-02-21T08:00:00+00:00",
"uid": "user123",
"API_ver": "2.0.0",
"fw_ver": 1022,
"health_hr": 72,
"health_hrv": 45,
"health_spo2": 98,
"health_stress": 25,
"health_T": 33.5,
"health_lf": 120.5,
"health_hf": 250.3,
"sleep_hr": 58,
"sleep_hrv": 52,
"sleep_spo2": 97,
"sleep_stage": 1,
"sleep_odi": 2,
"sleep_respiration": 14,
"activity_steps": 150,
"activity_calorie": 12,
"activity_zcm": 128,
"activity_pim": 256,
"activity_sleep_awake": 5
}
]{
"error": "bad-request",
"error_msg": "The range of start_day and end_day should not exceed 31 days."
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "User '<uid>' not found"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Data (v2)
Fetch one user's intra-day detail data (v2)
Fetch daily detail data (SX_Detail_Prod) with standardized field names.
Parameters
query_uid(path, required) - the user whose records are read.start_day/end_day(query, optional) -YYYY-MM-DD, both inclusive. An ISO 8601 value with an explicit time is also accepted; a time-valuedend_dayremains the exclusive end instant. Omit both for the last 30 days.format(query, optional) -json(default) orcsv.
Response
200withformat=jsonreturns an array of intra-day records with standardized field names.200withformat=csvreturns the same rows as a file download.- A range holding no rows is still a
200: the array is empty.
Errors
| Status | Condition |
|---|---|
| 400 | start_day or end_day is neither YYYY-MM-DD nor an ISO 8601 datetime, end_day is earlier than start_day, or the range exceeds the per-user limit |
| 404 | No user holds that query_uid |
Response fields
SX_Detail_Prod (v2 output)
| Field | Unit | Description |
|---|---|---|
_time | datetime | Time: Data timestamp |
uid | string | User ID: User identifier |
API_ver | string | API Version: API version in effect at the time of the record |
fw_ver | string | Firmware Version: Raw FW_version aligned onto the detail time series |
activity_zcm | Activity - Zero Crossing Count: Raw zc field. Unit and value details are not documented in the schema list | |
activity_pim | Activity - Activity Amount: Raw acti field. Unit and value details are not documented in the schema list | |
activity_jerk | Activity - Jerk: Listed as an output column, but nothing in the repository writes it, so it does not appear in the response | |
activity_mets | METs | Activity - METs: Physical activity intensity in multiples of the resting metabolic rate |
activity_sleep_awake | Activity - Sleep or Awake: Raw sleep_f field. Unit and value details are not documented in the schema list | |
activity_calorie | kcal | Activity - Calories Burned: Calories burned |
activity_steps | count | Activity - Steps: Number of steps |
activity_confirm | flag | Activity - Confirmation Flag: Data confirmation flag (1: confirmed, 0: unconfirmed) |
activity_type | category | Activity - Type: Activity type (0: resting, 1: walking, 2: running, 3: other, 9: unknown) |
activity_strength | ratio | Activity - Intensity: Index of activity intensity |
activity_act_mlc | category | Activity - Edge Processing Data: Edge processing data (act_mlc) |
health_T | °C | Health - Skin Temperature: Skin temperature |
health_cbt | °C | Health - Core Body Temperature: Always null. Core body temperature is not yet stored in the database |
health_hr | bpm | Health - Heart Rate: Average heart rate |
health_hrv | ms | Health - Heart Rate Variability: Heart rate variability (RMSSD) |
health_lf | Health - LF: Raw LF field, the low frequency component of heart rate variability. Unit and value details are not documented in the schema list | |
health_hf | Health - HF: health_lf divided by the raw lf_hf ratio; null where lf_hf is 0. Unit and value details are not documented in the schema list | |
health_spo2 | % | Health - Blood Oxygen Saturation: Blood oxygen saturation |
health_stress | pt | Health - Stress Level: Stress level |
health_hr_dB | Health - Heart Rate Signal Level: Raw HR_dB field. Unit and value details are not documented in the schema list | |
sleep_hr | bpm | Sleep - Heart Rate: Heart rate during sleep |
sleep_hrv | ms | Sleep - Heart Rate Variability: Heart rate variability during sleep (RMSSD) |
sleep_spo2 | % | Sleep - SpO2: health_spo2 restricted to epochs that are asleep and not awake; null on every other row |
sleep_stage | category | Sleep - Stage (4 Categories): Sleep stage (0: deep sleep, 1: light sleep, 2: REM, 3: awake or undetermined) |
sleep_stage_1min | category | Sleep - 1-Minute Stage (4 Categories): Sleep stage for each minute, one digit per minute joined into an integer (0: deep sleep, 1: light sleep, 2: REM, 3: awake or undetermined) |
sleep_odi | index | Sleep - ODI: 3% oxygen desaturation index (ODI) |
sleep_respiration | breath/min | Sleep - Respiratory Rate: Respiratory rate |
utc_offset_mins | mins | UTC Offset: Time difference from UTC in minutes |
Authorization
- Scheme:
Authorization: Bearer <idToken>orsoxai-api-key: <api key>. - Accepted roles:
PartnerAdmin,Admin,OrgAdmin - No role is required when
{query_uid}is the caller’s own uid. - Otherwise
PartnerAdminreaches only uids in its own company andOrgAdminonly uids in its own org; a caller holding both is confined to the intersection. - Denials: a
PartnerAdminreaching outside its company receives403 PartnerAdmin can fetch only the user's data that belongs to your company; anOrgAdminreaching outside its org receives403 OrgAdmin can fetch only the user's data that belongs to your org; anyone else receives403 Not enough permission.
GET
/
api
/
v2
/
DailyDetailData
/
{query_uid}
Fetch one user's intra-day detail data (v2)
curl --request GET \
--url https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://web-api.soxai.site/api/v2/DailyDetailData/{query_uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"_time": "2025-02-21T08:00:00+00:00",
"uid": "user123",
"API_ver": "2.0.0",
"fw_ver": 1022,
"health_hr": 72,
"health_hrv": 45,
"health_spo2": 98,
"health_stress": 25,
"health_T": 33.5,
"health_lf": 120.5,
"health_hf": 250.3,
"sleep_hr": 58,
"sleep_hrv": 52,
"sleep_spo2": 97,
"sleep_stage": 1,
"sleep_odi": 2,
"sleep_respiration": 14,
"activity_steps": 150,
"activity_calorie": 12,
"activity_zcm": 128,
"activity_pim": 256,
"activity_sleep_awake": 5
}
]{
"error": "bad-request",
"error_msg": "The range of start_day and end_day should not exceed 31 days."
}{
"error": "http-error",
"error_msg": "Invalid authentication credentials. <reason>"
}{
"error": "forbidden",
"error_msg": "Not enough permission"
}{
"error": "not-found",
"error_msg": "User '<uid>' not found"
}{
"error": "unprocessable-entity",
"error_msg": "body.<field>: <validation message>"
}{
"error": "rate-limited",
"error_msg": "Rate limit exceeded. Retry after <n> seconds."
}{
"error": "internal-server-error",
"error_msg": "Failed to fetch data: <error_message>"
}Authorizations
HTTPBearerSoxaiApiKey
Query Parameters
Response
Daily detail data fetched successfully with renamed fields. A json request always answers with an array, empty when the range holds no rows; format=csv answers with a file download.