Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Read Latest Battery Level via HTTP

This method allows reading the latest battery level of the user's measuring device, that is the heart rate monitor or watch. It is not the battery of the phone or computer running the Pulsoid app. To receive battery level updates in real time, use Read Data via WebSocket v2.

Request:

name
value

url

https://dev.pulsoid.net/api/v1/data/battery_level/latest

method

GET

scope

data:battery_level:read

Query Parameters explained:

name
type
possible values
default
description

response_mode

string

json, text_plain_only_heart_rate

json

Allow control format of response. text_plain_only_heart_rate returns only the battery percent as plain text

Headers Parameters explained:

name
value
description

Authorization

Bearer {access token}

Response:

name
type
description

measured_at

number

Unix timestamp in milliseconds

data

object

Holds metrics data

data.battery_level.percent

number

Battery level of the measuring device, from 0 to 100

Specific Errors:

http status code
reason

400

Token does not have data:battery_level:read scope (error code 6003)

412

User doesn't have any battery level data

422

Unsupported response_mode, for example legacy_json (error code 6004)

500

Unexpected error while retrieving the battery level (error code 6010)

cURL Request Example:

Response Example

cURL Request Example with response_mode=text_plain_only_heart_rate

Response Example with response_mode=text_plain_only_heart_rate

includes header content-type: text/plain; charset=UTF-8

Last updated