Returns the age band distribution from a region.
GET
/api/statisticsAuthorizations
api_key
Type: API Key (header: X-CSRF-Token)
Responses
Successful
JSON
{
"generalStatistic": {
"fetchWeight": 0,
"fetchCount": 0,
"cooperationsCount": 0,
"botCount": 0,
"foodsaverCount": 0,
"fairteilerCount": 0,
"totalBaskets": 0,
"avgWeeklyBaskets": 0,
"countAllFoodsaver": 0,
"countActiveFoodSharePoints": 0,
"avgDailyFetchCount": 0
},
"regionsActivity": {
"pickupOverAllTime": [
{
"name": "string",
"fetchWeight": 0,
"fetchCount": 0
}
],
"pickupInDefinedPeriod": [
{
"name": "string",
"fetchCount": 0
}
],
"pickupCurrentMonth": [
{
"name": "string",
"fetchCount": 0
}
]
},
"foodsaverActivity": {
"pickupOverAllTime": [
{
"name": "string",
"fetchWeight": 0,
"fetchCount": 0
}
],
"pickupInDefinedPeriod": [
{
"name": "string",
"fetchCount": 0
}
],
"pickupCurrentMonth": [
{
"name": "string",
"fetchCount": 0
}
]
}
}
Authorization
api_key
cURL
curl -X GET \
'http://localhost/api/statistics'
Samples
cURL
curl -X GET http://localhost/api/statistics
JavaScript
fetch("http://localhost/api/statistics")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/statistics");
Python
import requests
response = requests.get("http://localhost/api/statistics")
print(response.json())