Onboard site and asset
Deprecated — prefer /onboard instead.
The new /onboard endpoint supports multiple assets per site in a single call and includes improvements in idempotency, resilience and response details.
Register a site, asset, and dispatch consent in a single call.
Creates the site and asset, grants consent, and enrols in the relevant flex proposition.
This endpoint will:
- Create the site
- Create the asset associated with the site
- Enrol in the relevant flex proposition
Returns the created site and asset, including their IDs. Fails if the site or asset already exists.
curl --request POST \
--url https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site": {
"mpan": "1234567890123",
"postcode": "SW1A 1AA",
"street_address": "10 Downing Street",
"gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z",
"email": "test@example.com"
},
"asset": {
"external_id": "charger-001",
"type": "charger",
"properties": {
"power_kw": 7.4
}
},
"dispatch_consent": {
"dispatch_methods": [
"limited_pause"
]
}
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset"
payload = {
"site": {
"mpan": "1234567890123",
"postcode": "SW1A 1AA",
"street_address": "10 Downing Street",
"gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z",
"email": "test@example.com"
},
"asset": {
"external_id": "charger-001",
"type": "charger",
"properties": { "power_kw": 7.4 }
},
"dispatch_consent": { "dispatch_methods": ["limited_pause"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site: {
mpan: '1234567890123',
postcode: 'SW1A 1AA',
street_address: '10 Downing Street',
gave_boundary_meter_consent_at: '2025-01-01T12:00:00Z',
email: 'test@example.com'
},
asset: {external_id: 'charger-001', type: 'charger', properties: {power_kw: 7.4}},
dispatch_consent: {dispatch_methods: ['limited_pause']}
})
};
fetch('https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset', 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/onboard-site-and-asset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'site' => [
'mpan' => '1234567890123',
'postcode' => 'SW1A 1AA',
'street_address' => '10 Downing Street',
'gave_boundary_meter_consent_at' => '2025-01-01T12:00:00Z',
'email' => 'test@example.com'
],
'asset' => [
'external_id' => 'charger-001',
'type' => 'charger',
'properties' => [
'power_kw' => 7.4
]
],
'dispatch_consent' => [
'dispatch_methods' => [
'limited_pause'
]
]
]),
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/onboard-site-and-asset"
payload := strings.NewReader("{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"site": {
"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"
},
"asset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {
"power_kw": 1,
"capacity_kwh": 1
}
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Request model for onboarding a site with an asset and dispatch consent in a single call.
Site information
Show child attributes
Show child attributes
{
"mpan": "1234567890123",
"postcode": "SW1A 1AA",
"street_address": "10 Downing Street",
"gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z",
"email": "test@example.com"
}
Asset information
Show child attributes
Show child attributes
{
"external_id": "charger-001",
"type": "charger",
"properties": { "power_kw": 7.4 }
}
Dispatch consent methods
Show child attributes
Show child attributes
{ "dispatch_methods": ["limited_pause"] }
Was this page helpful?
curl --request POST \
--url https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"site": {
"mpan": "1234567890123",
"postcode": "SW1A 1AA",
"street_address": "10 Downing Street",
"gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z",
"email": "test@example.com"
},
"asset": {
"external_id": "charger-001",
"type": "charger",
"properties": {
"power_kw": 7.4
}
},
"dispatch_consent": {
"dispatch_methods": [
"limited_pause"
]
}
}
'import requests
url = "https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset"
payload = {
"site": {
"mpan": "1234567890123",
"postcode": "SW1A 1AA",
"street_address": "10 Downing Street",
"gave_boundary_meter_consent_at": "2025-01-01T12:00:00Z",
"email": "test@example.com"
},
"asset": {
"external_id": "charger-001",
"type": "charger",
"properties": { "power_kw": 7.4 }
},
"dispatch_consent": { "dispatch_methods": ["limited_pause"] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
site: {
mpan: '1234567890123',
postcode: 'SW1A 1AA',
street_address: '10 Downing Street',
gave_boundary_meter_consent_at: '2025-01-01T12:00:00Z',
email: 'test@example.com'
},
asset: {external_id: 'charger-001', type: 'charger', properties: {power_kw: 7.4}},
dispatch_consent: {dispatch_methods: ['limited_pause']}
})
};
fetch('https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset', 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/onboard-site-and-asset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'site' => [
'mpan' => '1234567890123',
'postcode' => 'SW1A 1AA',
'street_address' => '10 Downing Street',
'gave_boundary_meter_consent_at' => '2025-01-01T12:00:00Z',
'email' => 'test@example.com'
],
'asset' => [
'external_id' => 'charger-001',
'type' => 'charger',
'properties' => [
'power_kw' => 7.4
]
],
'dispatch_consent' => [
'dispatch_methods' => [
'limited_pause'
]
]
]),
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/onboard-site-and-asset"
payload := strings.NewReader("{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.axle.energy/entities/site/onboard-site-and-asset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"site\": {\n \"mpan\": \"1234567890123\",\n \"postcode\": \"SW1A 1AA\",\n \"street_address\": \"10 Downing Street\",\n \"gave_boundary_meter_consent_at\": \"2025-01-01T12:00:00Z\",\n \"email\": \"test@example.com\"\n },\n \"asset\": {\n \"external_id\": \"charger-001\",\n \"type\": \"charger\",\n \"properties\": {\n \"power_kw\": 7.4\n }\n },\n \"dispatch_consent\": {\n \"dispatch_methods\": [\n \"limited_pause\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"site": {
"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"
},
"asset": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {
"power_kw": 1,
"capacity_kwh": 1
}
}
}
