Returns the age band distribution from a region.
GET
/api/statistics/regions/{regionId}/age-bandIf home region is set only the home region of foodsavers from this regionId are considered.
Authorizations
api_key
Type: API Key (header: X-CSRF-Token)
Parameters
Path Parameters
regionId*
Typestring
RequiredQuery Parameters
homeRegion
result limit to home region
Typestring
Responses
Successful
JSON
[
{
"ageBand": "string",
"numberOfAgeBand": 0
}
]
Authorization
api_key
Variables
Key
Value
regionId*
homeRegion
cURL
curl -X GET \
'http://localhost/api/statistics/regions/{regionId}/age-band'
Samples
cURL
curl -X GET http://localhost/api/statistics/regions/{regionId}/age-band
JavaScript
fetch("http://localhost/api/statistics/regions/{regionId}/age-band")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/statistics/regions/{regionId}/age-band");
Python
import requests
response = requests.get("http://localhost/api/statistics/regions/{regionId}/age-band")
print(response.json())