Daily Statistics
curl --request GET \
  --url https://app-api.spikeapi.com/v3/queries/statistics/daily \
  --header 'Authorization: Bearer <token>'
{
  "from_date": "2006-01-02",
  "statistics": [
    {
      "date": "2006-01-02",
      "record_ids": [
        "f59617a7-bcc4-4fe0-90ba-2f1c4241d3e3"
      ],
      "values": {
        "activity_score": 83,
        "calories_burned_active": 1020.0991,
        "calories_burned_basal": 2000.1242,
        "calories_burned_total": 3020.2233,
        "distance_cycling": 20091.0022,
        "distance_running": 12000.1014,
        "distance_total": 5880.7021,
        "distance_walking": 1200.7022,
        "heartrate": 100,
        "heartrate_max": 120,
        "heartrate_min": 60,
        "heartrate_resting": 60,
        "recovery_score": 83,
        "sleep_duration_total": 3600000,
        "sleep_score": 70,
        "steps": 10000,
        "stress_score": 70
      }
    }
  ],
  "to_date": "2006-01-02"
}

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

Examples:

"2006-01-02"

to_date
string<date>
required

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

Examples:

"2006-01-02"

exclude_manual
boolean
default:false

Exclude manual metrics from the statistics

types
enum<string>[]
required
Minimum length: 1
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

Response

200
application/json

OK

The response is of type object.