Skip to content

Returns the gender distribution from a region.

GET
/api/statistics/regions/{regionId}/gender

If 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
Required

Query Parameters

homeRegion

result limit to home region

Typestring

Responses

Successful
JSON
[
{
"gender": 0,
"numberOfGender": 0
}
]
Authorization
api_key
Variables
Key
Value
regionId*
homeRegion
cURL
curl -X GET \
'http://localhost/api/statistics/regions/{regionId}/gender'

Samples

cURL
curl -X GET http://localhost/api/statistics/regions/{regionId}/gender
JavaScript
fetch("http://localhost/api/statistics/regions/{regionId}/gender")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/statistics/regions/{regionId}/gender");
Python
import requests
response = requests.get("http://localhost/api/statistics/regions/{regionId}/gender")
print(response.json())