Skip to main content

Get Overall User Impact | Climes API


This endpoint fetches the users impact for multiple orders and sends all the individual impacts along with the overall results.

Request Parameters

Request Query Schema

NameDescriptionType
emailThis is the Base64 encoded email of user used while creating an order.Base64 encoded string
phoneThis is the Base64 encoded phone of user used while creating an order.Base64 encoded string
impactstrue | false depending on whether you need detailed informationBoolean
tip

Either email or phone are required. But when email and phone both are sent in the request the first preference for searching will be given to the email and second will be given to the phone. If you send impact : true we will also send back the detailed vote based impact by this user, this will make the endpoint slower through, so do set it to false if it is not required and only overall impact is needed

Endpoint

/v3/integrations/vote/customer?email=BASE64_EMAIL&impacts=true
/v3/integrations/vote/customer?phone=BASE64_PHONE&impacts=true

Method

GET

Headers

{
'x-api-key' : 'API_KEY'
}

Response Parameters

Response Schema

Each response has an overall object and impacts array which has individual impact object

NameDescriptionType
customer_existsThis denotes whether if the user with such email and phone exists or not.boolean
overallThis has the overall data cumulative of all the impacts.This has individual overall object in it.object
impactsThis is an array of multiple impacts of user. This has individual impact object.
This field will only be sent optionally if the impacts are sent as true in query params during the request.
array

Overall Schema

NameDescriptionType
total_climesThis is the total climes across all impacts that were sent while creating an order which are now allocated to any project.number
total_kg_co2_removedThis is the Kgs CO2e equivalent of total_climes bought.number
equivalentsThis object contains the equivalent values for the total_kg_co2_removed. This has individual equivalents object.object

Impact Schema

NameDescriptionType
partner_order_idThis is the partner_order_id send while creating the order.string
climesThis is the total climes that were sent while creating an order which are now allocated to the project_idnumber
kg_co2_removedThis is the Kgs CO2e equivalent of climes bought.number
certificate_linkThis is the certificate link denoting that the climes have been allocated to the said project by the user.string
project_nameThis is the name of the project supported by this user with their climes.string
project_idThis is the project_id for the project which is supported by the user. Additional details for the project are available at Get Projects APIstring
allocation_dateThis is the UTC time at which the user chose the project.UTC string
order_dateThis is the UTC time at which the order was placed.UTC string
equivalentsThis object contains the equivalent values for the kg_co2_removed. This has individual equivalents object.object

Equivalents Schema

NameDescriptionType
trashbags_recycledIts the total number of trash bags collected for recycle for the kg_co2_removednumber
seedlings_grownIts the total number of seedlings planted and grown for 10 years for the amount of kg_co2_removednumber
electricity_savedIts the total hours of electricity saved for the kg_co2_removednumber

Status Code

200

Response Data

{
"customer_exists" : true,
"overall" : {
"total_climes" : 1114,
"total_kg_co2_removed" : 1114,
"equivalents" : {
"trashbags_recycled" : 48,
"seedlings_grown" : 18,
"electricity_saved" : 512
}
},
"impacts" : [
{
"partner_order_id" : "876287372837786837",
"climes" : 557,
"kg_co2_removed" : 557,
"certificate_link": "climes-certificate-link",
"project_name" : "Making biodiverse forests financially viable for farmers",
"project_id" : "farmers-for-forests",
"allocation_date" : "2023-06-22T06:35:22.314Z",
"order_date" : "2023-06-21T02:29:50.251Z",
"equivalents" : {
"trashbags_recycled" : 24,
"seedlings_grown" : 9,
"electricity_saved" : 256
}
},
{
"partner_order_id" : "876273783778683728",
"climes" : 557,
"kg_co2_removed" : 557,
"certificate_link": "climes-certificate-link",
"project_name" : "Agroforestry to combat land degradation in Karnataka",
"project_id": "say-trees",
"allocation_date" : "2023-05-13T05:24:42.454Z",
"order_date" : "2023-05-01T06:33:47.324Z",
"equivalents" : {
"trashbags_recycled" : 24,
"seedlings_grown" : 9,
"electricity_saved" : 256
}
}
]
}

Sample Request

curl --location --request GET 'BASE_URL/v3/integrations/vote/customer?email=am9obmRvZTU2NzU1MzNAZ21haWwuY29t'  
--header 'x-api-key: API_KEY'

Sample Response

Below are sample responses for the above sample request.

Responses

{
"customer_exists": true,
"overall": {
"total_climes": 1114,
"total_kg_co2_removed": 1114,
"equivalents": {
"trashbags_recycled": 48,
"seedlings_grown": 18,
"electricity_saved": 512
}
},
"impacts": [
{
"partner_order_id": "876287372837786837",
"climes": 557,
"kg_co2_removed": 557,
"certificate_link": "climes-certificate-link",
"project_name": "Making biodiverse forests financially viable for farmers",
"project_id": "farmers-for-forests",
"allocation_date": "2023-06-22T06:35:22.314Z",
"order_date": "2023-06-21T02:29:50.251Z",
"equivalents": {
"trashbags_recycled": 24,
"seedlings_grown": 9,
"electricity_saved": 256
}
},
{
"partner_order_id": "876273783778683728",
"climes": 557,
"kg_co2_removed": 557,
"certificate_link": "climes-certificate-link",
"project_name": "Agroforestry to combat land degradation in Karnataka",
"project_id": "say-trees",
"allocation_date": "2023-05-13T05:24:42.454Z",
"order_date": "2023-05-01T06:33:47.324Z",
"equivalents": {
"trashbags_recycled": 24,
"seedlings_grown": 9,
"electricity_saved": 256
}
}
]
}