curl --request PUT \
--url https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable \
--header 'X-API-Key: <api-key>'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable"
headers = {"X-API-Key": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable', 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://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "SE6F1K2C3",
"keyIdentifier": "3633e0e0",
"validTo": "2022-01-24T11:25:54.210Z",
"fleetId": "y1nNLJqb7m",
"contractId": "DE-9FS-C045DS363-E",
"visualNumber": "6285629402937",
"enabled": true,
"whitelist": "NEVER"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}Disable charging key
Disables a charging key given its keyIdentifier. It will immediately make Plugsurfing reject all charging session requests made with this key. The charging key needs to exist, otherwise a 404 HTTP error is returned. Note: Some CPOs store whitelisted keys, so in some rare cases it might take a bit longer time until charging is rejected.
curl --request PUT \
--url https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable \
--header 'X-API-Key: <api-key>'import requests
url = "https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable"
headers = {"X-API-Key": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable', 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://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.plugsurfing.com/emp/v1/charging-keys/{keyIdentifier}/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "SE6F1K2C3",
"keyIdentifier": "3633e0e0",
"validTo": "2022-01-24T11:25:54.210Z",
"fleetId": "y1nNLJqb7m",
"contractId": "DE-9FS-C045DS363-E",
"visualNumber": "6285629402937",
"enabled": true,
"whitelist": "NEVER"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}{
"message": "Resource not found"
}Authorizations
API key for authentication
Path Parameters
keyIdentifier provided when creating charging key
Response
Updated
EMP charging key details returned by key management endpoints.
Name of the Charging key
"SE6F1K2C3"
Charging key identifier in hexadecimal, little-endian format with usually 8 or 14 characters.
"3633e0e0"
UTC timestamp when the charging key expires.
"2022-01-24T11:25:54.210Z"
Fleet id
"y1nNLJqb7m"
Charging key contract id
"DE-9FS-C045DS363-E"
Identifier printed on the physical key
"6285629402937"
Charging key is enabled or disabled
true
Defines whether the CPO may allow a session for this charging key when it cannot get a response from the EMP, or must always rely on realtime authorization from the EMP. Possible values: ALLOWED_OFFLINE, NEVER.
ALLOWED_OFFLINE, NEVER "NEVER"