Update site
Update an existing site’s information.
Only fields included in the request will be updated. Returns the updated site details.
curl --request PATCH \
--url https://api-sandbox.axle.energy/entities/site/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tariff": {
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"name": "<string>",
"is_import": true,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>"
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}"
payload = {
"tariff": {
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"name": "<string>",
"is_import": True,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tariff: {
periods: [{start_time: '<string>', end_time: '<string>', rate_name: '<string>'}],
rate_prices: {},
name: '<string>',
is_import: true,
available_from: '2023-12-25',
available_until: '2023-12-25',
standing_charge_pence_per_day: 123
},
address: '<string>',
postcode: '<string>',
mpan: '<string>',
email: '<string>'
})
};
fetch('https://api-sandbox.axle.energy/entities/site/{site_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-sandbox.axle.energy/entities/site/{site_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([
'tariff' => [
'periods' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'rate_name' => '<string>'
]
],
'rate_prices' => [
],
'name' => '<string>',
'is_import' => true,
'available_from' => '2023-12-25',
'available_until' => '2023-12-25',
'standing_charge_pence_per_day' => 123
],
'address' => '<string>',
'postcode' => '<string>',
'mpan' => '<string>',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.axle.energy/entities/site/{site_id}"
payload := strings.NewReader("{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.axle.energy/entities/site/{site_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mpan": "<string>",
"postcode": "<string>",
"address": "<string>",
"asset_ids": [],
"markets": [],
"dispatch_methods": [],
"tariff": {
"tariff_cheap_start_time": "<string>",
"tariff_cheap_end_time": "<string>"
},
"gave_boundary_meter_consent_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Body
Request model for updating site information.
Tariff to set for the site: a full tariff (rates + periods) or window-only (off-peak times + type). Full tariffs are persisted and pushed to the scheduler.
- TariffWithRates
- TariffRequest
Show child attributes
Show child attributes
Full address for the site
UK postcode for the site
Meter Point Administration Number
Email address for the site
Commercial proposition to enrol this site in. Set once per site; enrolling in a different proposition requires unenrolling from the current one first (POST /entities/site/{site_id}/unenrol).
mileage_subscription, supplier_ev_tariff Response
Successful Response
Response model for site information.
Axle's internal UUID for the site
Meter Point Administration Number for the site
UK postcode for the site
Full address for the site
List of asset IDs associated with this site
Markets the site is participating in
Market types available for participation.
- CM: Capacity Market
- DFS: Dynamic Frequency Service
- DNO: Distribution Network Operator flexibility services
- LCM: Local Capacity Market
- SFFR: Static Firm Frequency Response
- WHOLESALE: Wholesale energy market
cm, dfs, dno, lcm, sffr, wholesale Dispatch methods allowed for the site
Axle propositions that a site can enrol into.
cm_infrequent_dispatch, full_asset_schedule_control, limited_pause, vpp_limited_control Tariff information for the site
Show child attributes
Show child attributes
Timestamp when boundary meter consent was given
Was this page helpful?
curl --request PATCH \
--url https://api-sandbox.axle.energy/entities/site/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tariff": {
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"name": "<string>",
"is_import": true,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>"
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}"
payload = {
"tariff": {
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"name": "<string>",
"is_import": True,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tariff: {
periods: [{start_time: '<string>', end_time: '<string>', rate_name: '<string>'}],
rate_prices: {},
name: '<string>',
is_import: true,
available_from: '2023-12-25',
available_until: '2023-12-25',
standing_charge_pence_per_day: 123
},
address: '<string>',
postcode: '<string>',
mpan: '<string>',
email: '<string>'
})
};
fetch('https://api-sandbox.axle.energy/entities/site/{site_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-sandbox.axle.energy/entities/site/{site_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([
'tariff' => [
'periods' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'rate_name' => '<string>'
]
],
'rate_prices' => [
],
'name' => '<string>',
'is_import' => true,
'available_from' => '2023-12-25',
'available_until' => '2023-12-25',
'standing_charge_pence_per_day' => 123
],
'address' => '<string>',
'postcode' => '<string>',
'mpan' => '<string>',
'email' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.axle.energy/entities/site/{site_id}"
payload := strings.NewReader("{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.axle.energy/entities/site/{site_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tariff\": {\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"name\": \"<string>\",\n \"is_import\": true,\n \"available_from\": \"2023-12-25\",\n \"available_until\": \"2023-12-25\",\n \"standing_charge_pence_per_day\": 123\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mpan": "<string>",
"postcode": "<string>",
"address": "<string>",
"asset_ids": [],
"markets": [],
"dispatch_methods": [],
"tariff": {
"tariff_cheap_start_time": "<string>",
"tariff_cheap_end_time": "<string>"
},
"gave_boundary_meter_consent_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
