Charger — Reporting
Heartbeat
Periodic (e.g., every 30 seconds) report from the charger of online status. The response may include pending commands queued for the device.
Related: for diagnosing connectivity issues such as stale heartbeat or reconnect storms, see the Diagnostic Runbooks.
POST
/
device
/
heartbeat
Heartbeat
curl --request POST \
--url https://api.telluspower.example.com/v1/device/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timestamp": "2025-03-15T10:30:00Z",
"status": "online",
"fault_code": 0
}
'import requests
url = "https://api.telluspower.example.com/v1/device/heartbeat"
payload = {
"timestamp": "2025-03-15T10:30:00Z",
"status": "online",
"fault_code": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({timestamp: '2025-03-15T10:30:00Z', status: 'online', fault_code: 0})
};
fetch('https://api.telluspower.example.com/v1/device/heartbeat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telluspower.example.com/v1/device/heartbeat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timestamp' => '2025-03-15T10:30:00Z',
'status' => 'online',
'fault_code' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telluspower.example.com/v1/device/heartbeat"
payload := strings.NewReader("{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telluspower.example.com/v1/device/heartbeat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/device/heartbeat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"data": {
"commands": [
{
"command_id": "<string>",
"command": "<string>",
"params": {},
"expiry": "2023-11-07T05:31:56Z"
}
]
}
}Authorizations
Charger-side bearer token. Obtained by exchanging device_id and
device_secret (issued at registration) at /v1/device/token.
Valid for 24 hours.
Body
application/json
Response
200 - application/json
Heartbeat acknowledged. Pending commands may be returned.
Standard response envelope. code is 0 on success and a non-zero
application code on error (see Error Codes — §14).
⌘I
Heartbeat
curl --request POST \
--url https://api.telluspower.example.com/v1/device/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timestamp": "2025-03-15T10:30:00Z",
"status": "online",
"fault_code": 0
}
'import requests
url = "https://api.telluspower.example.com/v1/device/heartbeat"
payload = {
"timestamp": "2025-03-15T10:30:00Z",
"status": "online",
"fault_code": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({timestamp: '2025-03-15T10:30:00Z', status: 'online', fault_code: 0})
};
fetch('https://api.telluspower.example.com/v1/device/heartbeat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telluspower.example.com/v1/device/heartbeat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timestamp' => '2025-03-15T10:30:00Z',
'status' => 'online',
'fault_code' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telluspower.example.com/v1/device/heartbeat"
payload := strings.NewReader("{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telluspower.example.com/v1/device/heartbeat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/device/heartbeat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timestamp\": \"2025-03-15T10:30:00Z\",\n \"status\": \"online\",\n \"fault_code\": 0\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"data": {
"commands": [
{
"command_id": "<string>",
"command": "<string>",
"params": {},
"expiry": "2023-11-07T05:31:56Z"
}
]
}
}