Skip to main content
Daily Statistics
curl --request GET \
  --url https://app-api.spikeapi.com/v3/queries/statistics/daily \
  --header 'Authorization: Bearer <token>'
{
  "from_date": "2023-12-25",
  "statistics": [
    {
      "date": "2023-12-25",
      "values": {
        "activity_score": 123,
        "calories_burned_active": 123,
        "calories_burned_basal": 123,
        "calories_burned_total": 123,
        "distance_cycling": 123,
        "distance_running": 123,
        "distance_total": 123,
        "distance_walking": 123,
        "heartrate": 123,
        "heartrate_max": 123,
        "heartrate_min": 123,
        "heartrate_resting": 123,
        "hrv_rmssd": 123,
        "hrv_sdnn": 123,
        "recovery_score": 123,
        "sleep_duration_total": 123,
        "sleep_score": 123,
        "sleep_skin_temperature_deviation": 123,
        "steps": 123,
        "stress_score": 123
      },
      "record_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ]
    }
  ],
  "to_date": "2023-12-25"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

from_date
string<date>
required

Start time of the query range in user's local timezone according to the provider, inclusive

Example:

"2006-01-02"

to_date
string<date>
required

End time of the query range in user's local timezone according to the provider, inclusive

Example:

"2006-01-02"

exclude_manual
boolean
default:false

Exclude manual metrics from the statistics

types
enum<string>[]
required
Minimum array length: 1
Available options:
sleep_score,
stress_score,
recovery_score,
activity_score,
steps,
distance_total,
distance_walking,
distance_cycling,
distance_running,
calories_burned_basal,
calories_burned_active,
calories_burned_total,
sleep_duration_total,
heartrate,
heartrate_max,
heartrate_min,
heartrate_resting,
sleep_skin_temperature_deviation,
hrv_rmssd,
hrv_sdnn
providers
string[]

Provider slugs

include_record_ids
boolean
default:false

Whether to include the record IDs in the response

device_types
enum<string>[]

Device types to include in the statistics

Available options:
unknown,
phone,
watch,
scale,
ring,
head_mounted,
fitness_band,
chest_strap,
smart_display,
accessory

Response

OK

from_date
string<date>
required

Calendar date in user's local timezone according to the provider

Example:

"2006-01-02"

statistics
object[] | null
required
to_date
string<date>
required

Calendar date in user's local timezone according to the provider

Example:

"2006-01-02"