Sites
Update site
Update an existing site’s information.
Only fields included in the request will be updated. Returns the updated site details.
PATCH
/
entities
/
site
/
{site_id}
Update Site
curl --request PATCH \
--url https://api-sandbox.axle.energy/entities/site/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tariff": {
"kind": "published",
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"timezone": "Europe/London",
"supplier": "Octopus Energy",
"name": "<string>",
"is_import": true,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123,
"tariff_type": "dual_rate"
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>",
"proposition": "supplier_ev_tariff"
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}"
payload = {
"tariff": {
"kind": "published",
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"timezone": "Europe/London",
"supplier": "Octopus Energy",
"name": "<string>",
"is_import": True,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123,
"tariff_type": "dual_rate"
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>",
"proposition": "supplier_ev_tariff"
}
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: {
kind: 'published',
periods: [{start_time: '<string>', end_time: '<string>', rate_name: '<string>'}],
rate_prices: {},
timezone: 'Europe/London',
supplier: 'Octopus Energy',
name: '<string>',
is_import: true,
available_from: '2023-12-25',
available_until: '2023-12-25',
standing_charge_pence_per_day: 123,
tariff_type: 'dual_rate'
},
address: '<string>',
postcode: '<string>',
mpan: '<string>',
email: '<string>',
proposition: 'supplier_ev_tariff'
})
};
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' => [
'kind' => 'published',
'periods' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'rate_name' => '<string>'
]
],
'rate_prices' => [
],
'timezone' => 'Europe/London',
'supplier' => 'Octopus Energy',
'name' => '<string>',
'is_import' => true,
'available_from' => '2023-12-25',
'available_until' => '2023-12-25',
'standing_charge_pence_per_day' => 123,
'tariff_type' => 'dual_rate'
],
'address' => '<string>',
'postcode' => '<string>',
'mpan' => '<string>',
'email' => '<string>',
'proposition' => 'supplier_ev_tariff'
]),
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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mpan": "<string>",
"postcode": "<string>",
"address": "<string>",
"asset_ids": [],
"markets": [
"cm"
],
"dispatch_methods": [
"cm_infrequent_dispatch"
],
"tariff": {
"tariff_type": "single_rate",
"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
Body
application/json
Request model for updating site information.
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).
Available options:
mileage_subscription, supplier_ev_tariff Example:
"supplier_ev_tariff"
Response
Successful Response
Response model for site information.
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
Available options:
cm, dfs, dno, lcm, sffr, wholesale Was this page helpful?
⌘I
Update Site
curl --request PATCH \
--url https://api-sandbox.axle.energy/entities/site/{site_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tariff": {
"kind": "published",
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"timezone": "Europe/London",
"supplier": "Octopus Energy",
"name": "<string>",
"is_import": true,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123,
"tariff_type": "dual_rate"
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>",
"proposition": "supplier_ev_tariff"
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}"
payload = {
"tariff": {
"kind": "published",
"periods": [
{
"start_time": "<string>",
"end_time": "<string>",
"rate_name": "<string>"
}
],
"rate_prices": {},
"timezone": "Europe/London",
"supplier": "Octopus Energy",
"name": "<string>",
"is_import": True,
"available_from": "2023-12-25",
"available_until": "2023-12-25",
"standing_charge_pence_per_day": 123,
"tariff_type": "dual_rate"
},
"address": "<string>",
"postcode": "<string>",
"mpan": "<string>",
"email": "<string>",
"proposition": "supplier_ev_tariff"
}
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: {
kind: 'published',
periods: [{start_time: '<string>', end_time: '<string>', rate_name: '<string>'}],
rate_prices: {},
timezone: 'Europe/London',
supplier: 'Octopus Energy',
name: '<string>',
is_import: true,
available_from: '2023-12-25',
available_until: '2023-12-25',
standing_charge_pence_per_day: 123,
tariff_type: 'dual_rate'
},
address: '<string>',
postcode: '<string>',
mpan: '<string>',
email: '<string>',
proposition: 'supplier_ev_tariff'
})
};
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' => [
'kind' => 'published',
'periods' => [
[
'start_time' => '<string>',
'end_time' => '<string>',
'rate_name' => '<string>'
]
],
'rate_prices' => [
],
'timezone' => 'Europe/London',
'supplier' => 'Octopus Energy',
'name' => '<string>',
'is_import' => true,
'available_from' => '2023-12-25',
'available_until' => '2023-12-25',
'standing_charge_pence_per_day' => 123,
'tariff_type' => 'dual_rate'
],
'address' => '<string>',
'postcode' => '<string>',
'mpan' => '<string>',
'email' => '<string>',
'proposition' => 'supplier_ev_tariff'
]),
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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\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 \"kind\": \"published\",\n \"periods\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"rate_name\": \"<string>\"\n }\n ],\n \"rate_prices\": {},\n \"timezone\": \"Europe/London\",\n \"supplier\": \"Octopus Energy\",\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 \"tariff_type\": \"dual_rate\"\n },\n \"address\": \"<string>\",\n \"postcode\": \"<string>\",\n \"mpan\": \"<string>\",\n \"email\": \"<string>\",\n \"proposition\": \"supplier_ev_tariff\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mpan": "<string>",
"postcode": "<string>",
"address": "<string>",
"asset_ids": [],
"markets": [
"cm"
],
"dispatch_methods": [
"cm_infrequent_dispatch"
],
"tariff": {
"tariff_type": "single_rate",
"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>"
}
]
}
