Charger — Reporting
Event reporting
Reports device events such as plug-in, plug-out, charging start / stop, faults, and alarms.
Related: for interpreting event_type=fault payloads, see the Fault Dictionary.
POST
/
device
/
events
Event reporting
curl --request POST \
--url https://api.telluspower.example.com/v1/device/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timestamp": "2025-03-15T10:36:00Z",
"event_type": "fault",
"connector_id": 1,
"data": {
"fault_code": 1001,
"fault_message": "Overcurrent protection",
"details": {
"current": 40.5,
"threshold": 32
}
}
}
'import requests
url = "https://api.telluspower.example.com/v1/device/events"
payload = {
"timestamp": "2025-03-15T10:36:00Z",
"event_type": "fault",
"connector_id": 1,
"data": {
"fault_code": 1001,
"fault_message": "Overcurrent protection",
"details": {
"current": 40.5,
"threshold": 32
}
}
}
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:36:00Z',
event_type: 'fault',
connector_id: 1,
data: {
fault_code: 1001,
fault_message: 'Overcurrent protection',
details: {current: 40.5, threshold: 32}
}
})
};
fetch('https://api.telluspower.example.com/v1/device/events', 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/events",
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:36:00Z',
'event_type' => 'fault',
'connector_id' => 1,
'data' => [
'fault_code' => 1001,
'fault_message' => 'Overcurrent protection',
'details' => [
'current' => 40.5,
'threshold' => 32
]
]
]),
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/events"
payload := strings.NewReader("{\n \"timestamp\": \"2025-03-15T10:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timestamp\": \"2025-03-15T10:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/device/events")
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:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
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
Available options:
plug_in, plug_out, start, stop, fault, alarm Required range:
x >= 1Event-specific payload. For example:
plug_in:{ vehicle_connected: boolean }fault:{ fault_code: int, fault_message: string, details: object }start/stop:{ reason: string }
Response
200
Event accepted.
⌘I
Event reporting
curl --request POST \
--url https://api.telluspower.example.com/v1/device/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timestamp": "2025-03-15T10:36:00Z",
"event_type": "fault",
"connector_id": 1,
"data": {
"fault_code": 1001,
"fault_message": "Overcurrent protection",
"details": {
"current": 40.5,
"threshold": 32
}
}
}
'import requests
url = "https://api.telluspower.example.com/v1/device/events"
payload = {
"timestamp": "2025-03-15T10:36:00Z",
"event_type": "fault",
"connector_id": 1,
"data": {
"fault_code": 1001,
"fault_message": "Overcurrent protection",
"details": {
"current": 40.5,
"threshold": 32
}
}
}
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:36:00Z',
event_type: 'fault',
connector_id: 1,
data: {
fault_code: 1001,
fault_message: 'Overcurrent protection',
details: {current: 40.5, threshold: 32}
}
})
};
fetch('https://api.telluspower.example.com/v1/device/events', 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/events",
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:36:00Z',
'event_type' => 'fault',
'connector_id' => 1,
'data' => [
'fault_code' => 1001,
'fault_message' => 'Overcurrent protection',
'details' => [
'current' => 40.5,
'threshold' => 32
]
]
]),
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/events"
payload := strings.NewReader("{\n \"timestamp\": \"2025-03-15T10:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\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/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timestamp\": \"2025-03-15T10:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telluspower.example.com/v1/device/events")
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:36:00Z\",\n \"event_type\": \"fault\",\n \"connector_id\": 1,\n \"data\": {\n \"fault_code\": 1001,\n \"fault_message\": \"Overcurrent protection\",\n \"details\": {\n \"current\": 40.5,\n \"threshold\": 32\n }\n }\n}"
response = http.request(request)
puts response.read_body