# Webhook

Mit Webhooks können Änderungen zu Ladevorgängen an externe Systeme geschickt werden. Das Einreichten der Empfänger URL geht <https://connect.pumpapp.co/developer>. Um die Nachrichten zu validieren befindet sich im Header X-Hub-Signature-256 jeder Nachricht eine HMAC-SHA256 Signatur der Nachricht. Der Wert des Headers ist immer sha256=THE\_SIGNATURE.

Beispiel einer Webhook Nachricht.

```bison
{
  "object": "event",
  "type": "fleet.charging_session.closed", // .created, .started, .updated, .stopped, .failed, .invalidated, .closed
  "timestamp": 1700491148,
  "data": {
    "object": "fleet.charging_session",
    "data": {
	"id": "SESSION_ID",
	"auth_type": "REMOTE",
	"status": "CLOSED",
	"created_at": 1695383249,
	"started_at": 1695383249,
	"completed_at": 1695383357,
	"last_updated_at": 1695383358,
	"evse": "DE*2GO*EMCD1311*1A*2",
	"charging_station": {}, // LADESTATIONS_DETAILS
	"user_reference": "YOUR_USER_REFERENCE",
	"energy_in_kwh": 1.028,
	"duration_in_minutes": 1.8,
	"final_amount": { // Can be NULL
	    "session": 0,
	    "time": 0,
	    "energy": 0.9046
	},
	"tariff": { // Can be NULL
	    "kwh_price": 0.88,
	    "session_price": 0,
	    "time_tariffs": [
                {
		    "starting_at_minute": 45,
		    "minute_price": 0.12
		}
	    ],
	    "vat": 0.19,
	    "currency": "EUR",
            "max_charging_time": 4320
	}
    }
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pumpapp.co/pump-connect/entwickler/pump-fleet/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
