Usable Fraction Endpoint
curl --request POST \
--url https://solarmoney.up.railway.app/api/usable-fraction \
--header 'Content-Type: application/json' \
--data '
{
"target_footprint": [
[
123
]
],
"lat": 123,
"lng": 123
}
'import requests
url = "https://solarmoney.up.railway.app/api/usable-fraction"
payload = {
"target_footprint": [[123]],
"lat": 123,
"lng": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({target_footprint: [[123]], lat: 123, lng: 123})
};
fetch('https://solarmoney.up.railway.app/api/usable-fraction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Buildings & Shadows
Usable Fraction Endpoint
Calculate usable roof fraction for the target building. Fetches neighbouring buildings from GBA DB (radius ~200 m) rather than relying on whatever the frontend happens to have rendered. Returns usable_fraction (0–1) and setback_area_m2.
POST
/
api
/
usable-fraction
Usable Fraction Endpoint
curl --request POST \
--url https://solarmoney.up.railway.app/api/usable-fraction \
--header 'Content-Type: application/json' \
--data '
{
"target_footprint": [
[
123
]
],
"lat": 123,
"lng": 123
}
'import requests
url = "https://solarmoney.up.railway.app/api/usable-fraction"
payload = {
"target_footprint": [[123]],
"lat": 123,
"lng": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({target_footprint: [[123]], lat: 123, lng: 123})
};
fetch('https://solarmoney.up.railway.app/api/usable-fraction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}