HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference
Terms of Use

Notifications

AMPECO can send real-time information (notifications) to clients’ systems with data in JSON format. Filtering and processing the data happens in the clients' systems.

List with events

Here is a list with events for which your system can subscribe and receive notifications with data:

  1. BootNotification
  2. ChargePointChangedNotification
  3. ChargePointSyncConfigurationNotification
  4. CircuitConsumptionNotification
  5. circuit.changed
  6. DiagnosticsStatusNotification
  7. HardwareStatusNotification
  8. LocationChangedNotification
  9. NetworkStatusNotification
  10. SecurityEventNotification
  11. SessionMeterValuesNotification
  12. SessionStartStopNotification
  13. SessionUpdateNotification
  14. UserChangedNotification
  15. user.invoiceDetails.changed
  16. partner.changed
  17. authorization.changed
  18. SubOperatorChangedNotification
  19. TariffChangedNotification
  20. reservation.changed
  21. user.paymentMethod.changed
  22. partnerInvite.changed
  23. user.subscriptionChanged
  24. idTag.changed
  25. roamingPlatform.changed
  26. userBalance.changed
  27. transaction.changed
  28. settlementReport.created
  29. chargePoint.dataTransferReceived
  30. cdr.received

The full up-to-date list with events and the exact data they send can be found in the API documentation in Notifications / Subscribe.

AMPECO provides 2 ways to receive notifications: Kafka and webhooks.

Notifications via Kafka

In order to use Apache Kafka the following parameters needs to be configured either in the Notification section in the back office or with API Notifications / Subscribe.

  • List of Kafka brokers
  • Kafka topic
  • Kafka security protocol
  • Kafka SASL mechanism
  • Kafka SASL username
  • Kafka SASL password

Notifications via webhooks

A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for updates very frequently to get it real-time, webhooks are designed to be triggered by specific events, sending an HTTP POST payload to the webhook's configured URL. This is very efficient for the client, as data is transmitted only when there's new information, reducing unnecessary network traffic and resource consumption.

How a webhook works:

  1. A client subscribes to one or more events to receive notifications.
    There are 2 ways to do it via:

    In both cases the following is specified:

    • an URL that is a publicly accessible endpoint of the client’s system where to receive the webhook requests from the back office,
    • one or more events/topics are selected which will trigger notifications and provide data.
  2. An event is triggered.
    An event occurs in the back office that triggers the webhook. The list with events is provided below.

  3. AMPECO sends an HTTP POST request with data payload.
    When the event is triggered, AMPECO sends an HTTP POST request to the URL specified in the webhook configuration. The POST request includes a payload of data in JSON format relevant to the event that occurred.

  4. Client’s system handles the request.
    The client’s system processes the incoming request, extracting and filtering the data payload and performing actions based on the received information. This could involve updating a database, triggering additional processes, sending notifications, or any other desired action.

Example: Receive meter values during charging session:

  1. Subscribe to SessionMeterValuesNotification either in the Notification section in the back office or with the API Notifications / Subscribe by providing an URL where to receive the notifications.
  2. Whenever there is a session AMPECO will send to the URL data in JSON format containing the following:
    • notification
    • chargePointId
    • evseId
    • sessionId
    • externalSessionId
    • meterValues[]

Validation if the notification is coming from AMPECO

The receiver of a webhook notification can validate if it comes from AMPECO. This can be done by computing a signature from the webhook payload and the API token used for that webhook in the back office as a cryptographic key using HMAC with SHA-256 algorithm.
Then the resulted signature is compared with the one sent by AMPECO in the notification as an HTTP header called X-Signature.
They must be equal!