Skip to content

Developers

Connect Sokety to your own systems: read and manage data with the REST API, receive events instantly through signed webhooks and connect your chargers over OCPP.

REST API

All requests use HTTPS and JSON. Authenticate with an API key created in the panel; keys can be limited to read-only or read-write.

cURL
curl https://api.sokety.com.tr/v1/stations \
  -H "Authorization: Bearer sk_live_••••••••"

Main resources

  • GET/v1/stationsStations, sockets and live status
  • GET/v1/sessionsCharging sessions; filter by date, station and user
  • GET/v1/invoicese-Invoices with PDF/XML links
  • POST/v1/stations/{id}/commandsRemote start, stop and reset
  • PUT/v1/tariffs/{id}Price per kWh and time-based tariffs
  • GET/v1/compliance/reportsStatus of regulatory and tax reports

Signed webhooks

Events such as session started, session ended, fault raised or invoice signed are sent instantly to the URL you choose. Each request body is signed with HMAC-SHA256; verify the signature to make sure it came from Sokety.

Event types

  • session.started
  • session.ended
  • connector.status_changed
  • fault.raised
  • invoice.signed
  • price.notified
  • compliance.report_failed
Node.js
import crypto from 'node:crypto';

// İstek başlığı: Sokety-Signature: t=1732400000,v1=<hex>
export function verify(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}
PHP
<?php
// İstek başlığı: Sokety-Signature: t=1732400000,v1=<hex>
function sokety_verify(string $rawBody, string $header, string $secret): bool {
    parse_str(str_replace(',', '&', $header), $p);
    $expected = hash_hmac('sha256', $p['t'] . '.' . $rawBody, $secret);
    return hash_equals($expected, $p['v1'] ?? '');
}

OCPP connection guide

Enter the OCPP server address in your charger settings in the format below. The charger ID must match the ID you gave when adding the charger in the panel.

  • Supported versions: 1.6J, 2.0.1, 2.1
  • Security profiles: 1 (basic auth), 2 (TLS + basic auth), 3 (TLS + client certificate)
  • If you use the OCPP Bridge, your current system's address is set in the panel; the charger still connects to the Sokety address
OCPP
wss://ocpp.sokety.com.tr/ws/{chargeBoxId}

API access

Talk to us for an API key and the test environment; full documentation and sandbox access are open to our customers.

Talk to us

Let us walk you through your network in 30 minutes

A demo built around your station count and your charger brands.