Skip to content

Provider data statistics user trend

GET v1/ad/provider/data/:provider_id/total/:user_id

Request

namenecessarytypedefaultdescribe
start_datefalsestring-开始日期(start date)
end_datefalsestring-结束日期(end date)

Response data struct

namenecessarytypedefaultdescribe
codetrueint-错误码(error code)
messagetruestring-错误信息(error message)
causetruestring-错误原因(error cause)
detailstrueobject-详情(details)
-wire_timetruearray-佩戴时间(wire time)
--datetruestring-日期(date)
--valuetrueint-值(value)
-wire_time_avgtruefloat-佩戴时间平均值(wire time avg)
-sleep_scoretruearray-睡眠分数(sleep score)
--datetruestring-日期(date)
--valuetrueint-值(value)
-sleep_score_avgtruefloat-睡眠分数平均值(sleep score avg)
-blood_oxygentruearray-血氧(bloodoxygen)
--datetruestring-日期(date)
--valuetruefloat-值(value)
-blood_oxygen_avgtruefloat-血氧平均值(bloodoxygen avg)
-odi_indextruearray-odi指标(odi index)
--datetruestring-日期(date)
--valuetruefloat-值(value)
-odi_index_avgtruefloat-odi指标(odi index
-heart_ratetruearray-心率(heart rate)
--datetruestring-日期(date)
--valuetruefloat-值(value)
-heart_rate_avgtruefloat-心率平均值(heart rate avg)
-advancement_positiontruearray-滴定值(advancement position)
--datetruestring-日期(date)
--valuetruefloat-值(value)

Example

  • Url params: v1/ad/provider/data/20221201092014WSUxccxp/total/36

  • Query params:

keyvalue
start_date2022-10-01
end_date2022-10-31
  • Header:
keyvalue
x-api-keyyour's key value
  • Response body:
json
{
    "code": 0,
    "message": "Success",
    "cause": "",
    "details": {
        "wire_time": [
            {
                "date": "2022-10-26",
                "value": 2
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "wire_time_avg": 0.6666666666666667,
        "wire_time_peak": {
            "max_value": 2,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-29"
        },
        "sleep_score": [
            {
                "date": "2022-10-26",
                "value": 20
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "sleep_score_avg": 6.666666666666667,
        "sleep_score_peak": {
            "max_value": 20,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-29"
        },
        "blood_oxygen": [
            {
                "date": "2022-10-26",
                "value": 93.48
            },
            {
                "date": "2022-10-29",
                "value": 93.59
            },
            {
                "date": "2022-10-30",
                "value": 99
            }
        ],
        "blood_oxygen_avg": 95.33333333333333,
        "blood_oxygen_peak": {
            "max_value": 99,
            "max_date": "2022-10-30",
            "min_value": 93.48,
            "min_date": "2022-10-26"
        },
        "odi_index": [
            {
                "date": "2022-10-26",
                "value": 0
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "odi_index_avg": 0,
        "odi_index_peak": {
            "max_value": 0,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-26"
        },
        "heart_rate": [
            {
                "date": "2022-10-26",
                "value": 64.66
            },
            {
                "date": "2022-10-29",
                "value": 69.16
            },
            {
                "date": "2022-10-30",
                "value": 75.58
            }
        ],
        "heart_rate_avg": 69.66666666666667,
        "heart_rate_peak": {
            "max_value": 75.58,
            "max_date": "2022-10-30",
            "min_value": 64.66,
            "min_date": "2022-10-26"
        },
        "advancement_position": [
            {
                "date": "2022-10-01",
                "value": ""
            },
            {
                "date": "2022-10-02",
                "value": ""
            },
            {
                "date": "2022-10-03",
                "value": ""
            },
            {
                "date": "2022-10-04",
                "value": ""
            },
            {
                "date": "2022-10-05",
                "value": ""
            },
            {
                "date": "2022-10-06",
                "value": ""
            },
            {
                "date": "2022-10-07",
                "value": ""
            },
            {
                "date": "2022-10-08",
                "value": ""
            },
            {
                "date": "2022-10-09",
                "value": ""
            },
            {
                "date": "2022-10-10",
                "value": ""
            },
            {
                "date": "2022-10-11",
                "value": ""
            },
            {
                "date": "2022-10-12",
                "value": ""
            },
            {
                "date": "2022-10-13",
                "value": ""
            },
            {
                "date": "2022-10-14",
                "value": ""
            },
            {
                "date": "2022-10-15",
                "value": ""
            },
            {
                "date": "2022-10-16",
                "value": ""
            },
            {
                "date": "2022-10-17",
                "value": ""
            },
            {
                "date": "2022-10-18",
                "value": ""
            },
            {
                "date": "2022-10-19",
                "value": ""
            },
            {
                "date": "2022-10-20",
                "value": ""
            },
            {
                "date": "2022-10-21",
                "value": ""
            },
            {
                "date": "2022-10-22",
                "value": ""
            },
            {
                "date": "2022-10-23",
                "value": ""
            },
            {
                "date": "2022-10-24",
                "value": ""
            },
            {
                "date": "2022-10-25",
                "value": ""
            },
            {
                "date": "2022-10-26",
                "value": "4"
            },
            {
                "date": "2022-10-27",
                "value": "4"
            },
            {
                "date": "2022-10-28",
                "value": "4"
            },
            {
                "date": "2022-10-29",
                "value": "4"
            },
            {
                "date": "2022-10-30",
                "value": "4"
            },
            {
                "date": "2022-10-31",
                "value": "4"
            }
        ]
    }
}
{
    "code": 0,
    "message": "Success",
    "cause": "",
    "details": {
        "wire_time": [
            {
                "date": "2022-10-26",
                "value": 2
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "wire_time_avg": 0.6666666666666667,
        "wire_time_peak": {
            "max_value": 2,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-29"
        },
        "sleep_score": [
            {
                "date": "2022-10-26",
                "value": 20
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "sleep_score_avg": 6.666666666666667,
        "sleep_score_peak": {
            "max_value": 20,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-29"
        },
        "blood_oxygen": [
            {
                "date": "2022-10-26",
                "value": 93.48
            },
            {
                "date": "2022-10-29",
                "value": 93.59
            },
            {
                "date": "2022-10-30",
                "value": 99
            }
        ],
        "blood_oxygen_avg": 95.33333333333333,
        "blood_oxygen_peak": {
            "max_value": 99,
            "max_date": "2022-10-30",
            "min_value": 93.48,
            "min_date": "2022-10-26"
        },
        "odi_index": [
            {
                "date": "2022-10-26",
                "value": 0
            },
            {
                "date": "2022-10-29",
                "value": 0
            },
            {
                "date": "2022-10-30",
                "value": 0
            }
        ],
        "odi_index_avg": 0,
        "odi_index_peak": {
            "max_value": 0,
            "max_date": "2022-10-26",
            "min_value": 0,
            "min_date": "2022-10-26"
        },
        "heart_rate": [
            {
                "date": "2022-10-26",
                "value": 64.66
            },
            {
                "date": "2022-10-29",
                "value": 69.16
            },
            {
                "date": "2022-10-30",
                "value": 75.58
            }
        ],
        "heart_rate_avg": 69.66666666666667,
        "heart_rate_peak": {
            "max_value": 75.58,
            "max_date": "2022-10-30",
            "min_value": 64.66,
            "min_date": "2022-10-26"
        },
        "advancement_position": [
            {
                "date": "2022-10-01",
                "value": ""
            },
            {
                "date": "2022-10-02",
                "value": ""
            },
            {
                "date": "2022-10-03",
                "value": ""
            },
            {
                "date": "2022-10-04",
                "value": ""
            },
            {
                "date": "2022-10-05",
                "value": ""
            },
            {
                "date": "2022-10-06",
                "value": ""
            },
            {
                "date": "2022-10-07",
                "value": ""
            },
            {
                "date": "2022-10-08",
                "value": ""
            },
            {
                "date": "2022-10-09",
                "value": ""
            },
            {
                "date": "2022-10-10",
                "value": ""
            },
            {
                "date": "2022-10-11",
                "value": ""
            },
            {
                "date": "2022-10-12",
                "value": ""
            },
            {
                "date": "2022-10-13",
                "value": ""
            },
            {
                "date": "2022-10-14",
                "value": ""
            },
            {
                "date": "2022-10-15",
                "value": ""
            },
            {
                "date": "2022-10-16",
                "value": ""
            },
            {
                "date": "2022-10-17",
                "value": ""
            },
            {
                "date": "2022-10-18",
                "value": ""
            },
            {
                "date": "2022-10-19",
                "value": ""
            },
            {
                "date": "2022-10-20",
                "value": ""
            },
            {
                "date": "2022-10-21",
                "value": ""
            },
            {
                "date": "2022-10-22",
                "value": ""
            },
            {
                "date": "2022-10-23",
                "value": ""
            },
            {
                "date": "2022-10-24",
                "value": ""
            },
            {
                "date": "2022-10-25",
                "value": ""
            },
            {
                "date": "2022-10-26",
                "value": "4"
            },
            {
                "date": "2022-10-27",
                "value": "4"
            },
            {
                "date": "2022-10-28",
                "value": "4"
            },
            {
                "date": "2022-10-29",
                "value": "4"
            },
            {
                "date": "2022-10-30",
                "value": "4"
            },
            {
                "date": "2022-10-31",
                "value": "4"
            }
        ]
    }
}