Sites
Offboard site and assets
Offboard a site and all its associated assets in a single operation.
Unenrols from every proposition, and deletes the site and assets in accordance with data retention policies.
Use when the user is leaving entirely — for example, they’ve moved house, or your support team is removing them. Payments can no longer be accessed afterwards.
If the user is only opting out of one proposition (e.g. toggling Flex Lite off in your app), use unenrol instead — it preserves the site and any other propositions they’re enrolled in.
POST
/
entities
/
site
/
{site_id}
/
offboard-site-and-assets
Offboard Site And Assets
curl --request POST \
--url https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets', 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}/offboard-site-and-assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"site": {
"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"
},
"asset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "boundary meter",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {
"power_kw": 1,
"capacity_kwh": 1
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Was this page helpful?
⌘I
Offboard Site And Assets
curl --request POST \
--url https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets', 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}/offboard-site-and-assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/{site_id}/offboard-site-and-assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"site": {
"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"
},
"asset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "boundary meter",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {
"power_kw": 1,
"capacity_kwh": 1
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
