Overview
Welcome to the Life Cycle Analysis (LCA) Data Retrieval API. This API enables you to access detailed LCA impact data for your products by providing a product_uuid
. To begin using the API, you'll need to obtain an API key.
Generating an API Key
To interact with the LCA Data Retrieval API, you need an API key. Please follow the instructions below to set up a meeting with Fairglow and get your API key:
Ready to get started? Schedule a meeting with Fairglow to obtain your API key and discuss how our LCA data can benefit your business.
Authenticating API Requests
Once you have your API key, you'll need to include it in the Authorization
header of your HTTP requests to authenticate with the LCA Data Retrieval API. Here's an example using curl
:
curl https://api.fairglow.tech/lca/v1/get-impact-data \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"product_uuid": "example_product_uuid"
}'
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"product_uuid": "example_product_uuid"
}'
Replace YOUR_API_KEY
with the actual key you received from Fairglow, and replace example_product_uuid
with the UUID of the product for which you want to retrieve LCA impact data.
If the key is invalid or missing, the server will respond with a 401 Unauthorized status code.
Retrieving LCA Impact Data
To retrieve LCA impact data for a specific product, send a POST request to the /lca/v1/get-impact-data
endpoint with the product_uuid
in the request body. Below is an example response:
{
"product_uuid": "example_product_uuid",
"impact_data": {
"Land use": {
"unit": "Pt",
"value": 1314.9892852961034
},
"Water use": {
"unit": "m³ depriv.",
"value": 0.14464259412938696
},
"Acidification": {
"unit": "mol H+ eq",
"value": 0.059892787582518175
},
"Climate change": {
"unit": "kg CO₂ eq",
"value": 1.6706643291581864
},
... }
}
"product_uuid": "example_product_uuid",
"impact_data": {
"Land use": {
"unit": "Pt",
"value": 1314.9892852961034
},
"Water use": {
"unit": "m³ depriv.",
"value": 0.14464259412938696
},
"Acidification": {
"unit": "mol H+ eq",
"value": 0.059892787582518175
},
"Climate change": {
"unit": "kg CO₂ eq",
"value": 1.6706643291581864
},
... }
}