Skip to content

OCPP API

The OCPP API provides device command orchestration, smart charging profiles, and security event management for OCPP-enabled charging stations.

Features

  • Command Orchestration - Send OCPP commands to charging stations
  • Charging Profiles - Create and manage smart charging profiles
  • Smart Charging - Optimize charging schedules based on constraints
  • Security Events - Track and acknowledge security-related events
  • Batch Operations - Send commands to multiple devices
  • Real-time Streaming - Monitor command status updates via SSE

Base URL

https://api.ampnexus.app/ocpp/v1

API Reference

Explore the full API specification using the interactive Swagger UI below:

Quick Examples

Send OCPP Command

curl -X POST \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "RemoteStartTransaction",
    "parameters": {"connectorId": 1, "idTag": "USER123"}
  }' \
  https://api.ampnexus.app/ocpp/v1/tenants/{tenant_slug}/devices/{device_serial}/commands/send

Create Charging Profile

curl -X POST \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "chargingProfileId": 1,
    "stackLevel": 0,
    "chargingProfilePurpose": "TxDefaultProfile",
    "chargingProfileKind": "Absolute",
    "chargingSchedule": {
      "chargingRateUnit": "W",
      "chargingSchedulePeriod": [
        {"startPeriod": 0, "limit": 7400}
      ]
    }
  }' \
  https://api.ampnexus.app/ocpp/v1/tenants/{tenant_slug}/devices/{device_serial}/charging-profiles

Get Security Events

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.ampnexus.app/ocpp/v1/tenants/{tenant_slug}/security-events?limit=50"

Stream Command Updates

curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://api.ampnexus.app/ocpp/v1/tenants/{tenant_slug}/streams/commands/{command_id}