Impact Summary Project
Description
Displays total impact made for given company or application. Result can be limited further to the single user.
GET
https://impact.dots.eco/api/v1/impact/summary?company={company_id}&app_token={app_token}&user={remote_user_id}
Please check Headers and authorization.
Parameters
company
- required*,integer
- The ID of a company.app_token
- required*,string
- The app identifier, it can be found in the app dashboard. Accepts multiple values (separated by a comma).user
- optional,string
- The remote ID of a user.
* = One of the parameters company
or app_token
is mandatory.
Both parameters can be provided, but this will effectively return results filtered by application token, so it will be equal
to the results of only providing the app_token
.
Example request
The minimal request that will work
curl --location --request GET 'https://impact.dots.eco/api/v1/impact/summary?company_id=1&app_token=65-b156f001&user=testuser' \
--header 'Content-Type: application/json' \
--header 'auth-token: YOUR_AUTH_TOKEN' \
--data-raw '{
}'
curl --location --request GET 'https://impact.dots.eco/api/v1/impact/summary?company_id=1&app_token=65-b156f001,63-f1758578&user=testuser' \
--header 'Content-Type: application/json' \
--header 'auth-token: YOUR_AUTH_TOKEN' \
--data-raw '{
}'
Key/Value pairs response body
"project_id": [interger]
- The project ID."project_name": [string]
- Name of the Project."project_description": [string]
- Description of the Project."project_image_url": [string]
- The Project image."affected_species": [list]
- The Project affected species."affected_species.popular_name": [string]
- The affected species popular name."affected_species.scientific_name": [string]"
- The affected species scientific name."affected_species.IUCN_endangered_status": [string]"
- The affected species IUCN endangered status."category": [list]
- The impact type category."category.id": [integer]
- The category id."category.name": [string]
- The category name."category.icon": [string]
- The category icon URL."category.action_in_past_tense": [string]
- The category action in past tense."impact_type_id": [integer]
- The Impact Type ID."impact_type_name": [string]
- Name of the Impact Type."impact_description": [string]
- Description of the Impact."impact_unit": [string]
- The impact unit."impact_country": [integer]"
- The impact country."total": [integer]
- The total."logo": [string]
- The Organization logo."image": [string]
- The impact image."unit_text": [string]
- The impact unit text."unit_html": [string]
- The impact unit HTML."geolocation": [object]
- Certificate geolocation, can be a polygon represented by multiple points.
Example response
success
{
"1": {
"project_id": 1,
"project_name": "Transforming Tanzania's Simiyu Region with Sustainable Forest Gardens and Resilient Agriculture",
"project_description": "Empower Sukuma farmers in Tanzania's Simiyu region with forest gardens, sustainable agriculture, and vital resources for resilience and abundance.",
"project_image_url": "https://impact.dots.eco/sites/default/files/2023-11/trees%20for%20thefuture%20tanzania.png",
"affected_species": [
{
"popular_name": "Whitebark Pine",
"scientific_name": "Pinus albicaulis",
"IUCN_endangered_status": "Critically Endangered (CR)"
}
],
"category": [
{
"id": 22,
"name": "Plant Trees",
"icon": "https://impact.dots.eco/sites/default/files/impact_image/iStock-817552046%2520%25281%2529.jpg iStock-817552046%20%281%29.jpg",
"action_in_past_tense": "planted"
}
],
"impact_type_id": 3,
"impact_type_name": "Trees",
"impact_description": "Planting trees where needed most",
"impact_unit": "tree",
"impact_country": "Tanzania",
"total": "459",
"logo": "https://impact.dots.eco/sites/default/files/logo/Trees_01-Featured-Image-800x740-1.png",
"image": "https://impact.dots.eco/sites/default/files/impact_image/iStock-817552046%2520%25281%2529.jpg",
"unit_text": "trees",
"unit_html": "<p>trees</p>",
"geolocation": [
{
"lat": -16.271471999999999,
"lng": 44.446511000000001
}
]
}
}
Possible error responses
No app_token and no company query parameter provided
{
"message": "You must provide a valid 'app_token' and/or 'company' value(s) for query parameter."
}
Status:422 Unprocessable Entity
No results
{
"message": "No results found for specified criteria."
}
Status:404 Not Found