The ESGentle API allows users to retrieve detailed environmental scores by simply inputting a product's barcode. This service provides a comprehensive analysis of the product's environmental impact, including metrics such as carbon footprint, water usage, and overall sustainability rating.
The API is designed for integration with retail systems, consumer apps, and sustainability platforms. You can start using the API by accessing the following base URL:
https://us-central1-esg-score-536c4.cloudfunctions.net
All requests to the ESGentle API must include an x-api-key
header with your API key. If you have lost your API key or need a new one, please contact support.
curl --header "x-api-key: YOUR-API-KEY" --header "Content-Type: application/json" --request POST --data '{"barcode": "123456789013"}' "<https://us-central1-esg-score-536c4.cloudfunctions.net/apiV1GetEnvironmentalScoresExternal>"
const axios = require('axios');
const fetchEnvironmentalScores = async () => {
try {
const response = await axios.post(
'<https://us-central1-esg-score-536c4.cloudfunctions.net/apiV1GetEnvironmentalScoresExternal>',
{ barcode: '123456789013' },
{ headers: { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' } }
);
console.log(response.data);
} catch (error) {
console.error(error);
}
};
fetchEnvironmentalScores();
POST /apiV1GetEnvironmentalScoresExternal
Fetch environmental scores for a product based on its barcode.
Headers
x-api-key: <your_api_key>
Content-Type: application/json