Product-wise impact

GET /product

Query parameters

  • product string Required

    Product name in English (any format)

Responses

  • 200
    1. Carbon footprint per liter of the milk
    2. Difference in impact (% higher or lower) between the queried product and average milk sold in the world
    Hide response attributes Show response attributes object
    • product_name string

      Name of the product.

    • kg_co2_per_kg float

      Carbon footprint: kg CO2 per kg of the product

    • percentage_impact_difference string

      Percentage difference in impact between the queried product and average product in the same category

    • status string
GET /product
curl \
 -X GET https://trial.greenswapp.com/product?product=Oatly+Oat+Milk+Barista+Edition \
 -H "x-api-key: $API_KEY"
Response examples (200)
{
  "product_name": "Oatly Oat Milk Barista Edition",
  "kg_co2_per_kg": 0.36,
  "percentage_impact_difference": "This product has a 87% lower impact than the average regular milk",
  "status": "OK"
}
Response examples (200)
{
  "product_name": "Oatly Oat Milk Barista Edition",
  "kg_co2_per_kg": 0.36,
  "percentage_impact_difference": "This product has a 87% lower impact than the average regular milk",
  "status": "OK"
}