Update a Temporary EVSE Status
curl --request PATCH \
--url https://api.spirii.com/v2/temporary-evse-statuses/{id} \
--header 'Content-Type: application/json' \
--data '
{
"temporaryStatus": "MAINTENANCE",
"validFrom": "2025-04-23T10:00:00Z",
"validTo": "2025-04-23T18:00:00Z"
}
'import requests
url = "https://api.spirii.com/v2/temporary-evse-statuses/{id}"
payload = {
"temporaryStatus": "MAINTENANCE",
"validFrom": "2025-04-23T10:00:00Z",
"validTo": "2025-04-23T18:00:00Z"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
temporaryStatus: 'MAINTENANCE',
validFrom: '2025-04-23T10:00:00Z',
validTo: '2025-04-23T18:00:00Z'
})
};
fetch('https://api.spirii.com/v2/temporary-evse-statuses/{id}', 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://api.spirii.com/v2/temporary-evse-statuses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'temporaryStatus' => 'MAINTENANCE',
'validFrom' => '2025-04-23T10:00:00Z',
'validTo' => '2025-04-23T18:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/v2/temporary-evse-statuses/{id}"
payload := strings.NewReader("{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.spirii.com/v2/temporary-evse-statuses/{id}")
.header("Content-Type", "application/json")
.body("{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/v2/temporary-evse-statuses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"temporaryStatus": "MAINTENANCE",
"evseId": "DK*SPI*E123*1",
"validFrom": "2023-01-01T12:00:00Z",
"validTo": "2023-01-01T14:00:00Z"
}{
"statusCode": 400,
"message": [
"validFrom cannot be greater than validTo"
],
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Forbidden",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found"
}{
"statusCode": 500,
"message": "Internal Server Error",
"error": "Internal Server Error"
}Update a Temporary EVSE Status
PATCH
/
v2
/
temporary-evse-statuses
/
{id}
Update a Temporary EVSE Status
curl --request PATCH \
--url https://api.spirii.com/v2/temporary-evse-statuses/{id} \
--header 'Content-Type: application/json' \
--data '
{
"temporaryStatus": "MAINTENANCE",
"validFrom": "2025-04-23T10:00:00Z",
"validTo": "2025-04-23T18:00:00Z"
}
'import requests
url = "https://api.spirii.com/v2/temporary-evse-statuses/{id}"
payload = {
"temporaryStatus": "MAINTENANCE",
"validFrom": "2025-04-23T10:00:00Z",
"validTo": "2025-04-23T18:00:00Z"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
temporaryStatus: 'MAINTENANCE',
validFrom: '2025-04-23T10:00:00Z',
validTo: '2025-04-23T18:00:00Z'
})
};
fetch('https://api.spirii.com/v2/temporary-evse-statuses/{id}', 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://api.spirii.com/v2/temporary-evse-statuses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'temporaryStatus' => 'MAINTENANCE',
'validFrom' => '2025-04-23T10:00:00Z',
'validTo' => '2025-04-23T18:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spirii.com/v2/temporary-evse-statuses/{id}"
payload := strings.NewReader("{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.spirii.com/v2/temporary-evse-statuses/{id}")
.header("Content-Type", "application/json")
.body("{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/v2/temporary-evse-statuses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"temporaryStatus\": \"MAINTENANCE\",\n \"validFrom\": \"2025-04-23T10:00:00Z\",\n \"validTo\": \"2025-04-23T18:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": 42,
"temporaryStatus": "MAINTENANCE",
"evseId": "DK*SPI*E123*1",
"validFrom": "2023-01-01T12:00:00Z",
"validTo": "2023-01-01T14:00:00Z"
}{
"statusCode": 400,
"message": [
"validFrom cannot be greater than validTo"
],
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Forbidden",
"error": "Forbidden"
}{
"statusCode": 404,
"message": "Not Found",
"error": "Not Found"
}{
"statusCode": 500,
"message": "Internal Server Error",
"error": "Internal Server Error"
}Path Parameters
The ID of the Temporary EVSE Status to update
Body
application/json
Temporary EVSE status property.
Use Cases
- MAINTENANCE: Use this status when an EVSE is undergoing maintenance and should not be used by customers.
- COMMISSIONING: Use this status for EVSEs that are being set up or tested and are not yet ready for public use.
- BLOCKED: Use this status to temporarily prevent an EVSE from being used, for example, due to a fault or safety concern.
- RESERVED: Use this status to indicate that an EVSE is reserved for a specific user or time period.
Available options:
MAINTENANCE, COMMISSIONING, BLOCKED, RESERVED Example:
"MAINTENANCE"
Start date and time of the Temporary EVSE Status. If unset, the current date and time will be used.
Example:
"2025-04-23T10:00:00Z"
End date and time of the Temporary EVSE Status. If unset, the temporary status will ramain until removed.
Example:
"2025-04-23T18:00:00Z"
Response
The Temporary EVSE Status has been successfully updated
The unique identifier for the Temporary EVSE Status
Example:
42
Status of the Temporary EVSE Status
Available options:
MAINTENANCE, COMMISSIONING, BLOCKED, RESERVED Example:
"MAINTENANCE"
The EVSE ID
Example:
"DK*SPI*E123*1"
The start date and time of the Temporary EVSE Status
Example:
"2023-01-01T12:00:00Z"
The end date and time of the Temporary EVSE Status
Example:
"2023-01-01T14:00:00Z"
Was this page helpful?