Product-Eco-Score Schema

Schema definition for the Product-Eco-Score object in product data

Product-Eco-Score Schema

This is a data schema, not an API endpoint. The Product-Eco-Score object describes the shape of data returned inside product records by the Product Opener API.

{
  "type": "object",
  "description": "Fields related to Eco-Score for a product.\n\nSee also: `ecoscore_score`, `ecoscore_grade` and `ecoscore_tags`.\n",
  "properties": {
    "ecoscore_data": {
      "type": "object",
      "title": "product_ecoscore_data",
      "description": "An object about a lot of details about data needed for Eco-Score computation\nand complementary data of interest.\n",
      "properties": {
        "adjustments": {
          "title": "product_ecoscore_adjustments",
          "type": "object",
          "properties": {
            "origins_of_ingredients": {
              "type": "object",
              "properties": {
                "aggregated_origins": {
                  "type": "array",
                  "description": "List of aggregated origins of ingredients and their impact.",
                  "items": {
                    "title": "adjustments_origin_of_ingredient_aggregated",
                    "type": "object",
                    "properties": {
                      "epi_score": {
                        "type": "string"
                      },
                      "origin": {
                        "type": "string",
                        "description": "Country or region of origin for the ingredient."
                      },
                      "percent": {
                        "type": "integer",
                        "description": "Percentage of this ingredient from the specified origin."
                      },
                      "transportation_score": {
                        "type": [
                          "null",
                          "integer"
                        ],
                        "description": "Transportation score associated with this ingredient's origin."
                      }
                    }
                  }
                },
                "epi_score": {
                  "type": "integer",
                  "description": "Environmental Performance Index (EPI) score for the ingredient's origin."
                },
                "epi_value": {
                  "type": "integer"
                },
                "origins_from_categories": {
                  "type": "array",
                  "description": "List of origins derived from product categories, eg for PDO.",
                  "items": {
                    "type": "string"
                  }
                },
                "origins_from_origins_field": {
                  "type": "array",
                  "description": "List of origins explicitly stated in the product's origins field.",
                  "items": {
                    "type": "string"
                  }
                },
                "transportation_score": {
                  "type": "integer"
                },
                "transportation_scores": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "al",
                      "at",
                      "ax",
                      "ba",
                      "be",
                      "bg",
                      "ch",
                      "cy",
                      "cz",
                      "de",
                      "dk",
                      "dz",
                      "ee",
                      "eg",
                      "es",
                      "fi",
                      "fo",
                      "fr",
                      "gg",
                      "gi",
                      "gr",
                      "hr",
                      "hu",
                      "ie",
                      "il",
                      "im",
                      "is",
                      "it",
                      "je",
                      "lb",
                      "li",
                      "lt",
                      "lu",
                      "lv",
                      "ly",
                      "ma",
                      "mc",
                      "md",
                      "me",
                      "mk",
                      "mt",
                      "nl",
                      "no",
                      "pl",
                      "ps",
                      "pt",
                      "ro",
                      "rs",
                      "se",
                      "si",
                      "sj",
                      "sk",
                      "sm",
                      "sy",
                      "tn",
                      "tr",
                      "ua",
                      "uk",
                      "us",
                      "va",
                      "world",
                      "xk"
                    ]
                  },
                  "additionalProperties": {
                    "type": "number",
                    "default": 0
                  }
                },
                "transportation_value": {
                  "type": "integer"
                },
                "transportation_values": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "al",
                      "at",
                      "ax",
                      "ba",
                      "be",
                      "bg",
                      "ch",
                      "cy",
                      "cz",
                      "de",
                      "dk",
                      "dz",
                      "ee",
                      "eg",
                      "es",
                      "fi",
                      "fo",
                      "fr",
                      "gg",
                      "gi",
                      "gr",
                      "hr",
                      "hu",
                      "ie",
                      "il",
                      "im",
                      "is",
                      "it",
                      "je",
                      "lb",
                      "li",
                      "lt",
                      "lu",
                      "lv",
                      "ly",
                      "ma",
                      "mc",
                      "md",
                      "me",
                      "mk",
                      "mt",
                      "nl",
                      "no",
                      "pl",
                      "ps",
                      "pt",
                      "ro",
                      "rs",
                      "se",
                      "si",
                      "sj",
                      "sk",
                      "sm",
                      "sy",
                      "tn",
                      "tr",
                      "ua",
                      "uk",
                      "us",
                      "va",
                      "world",
                      "xk"
                    ]
                  },
                  "additionalProperties": {
                    "type": "number",
                    "default": 0
                  }
                },
                "value": {
                  "type": "integer"
                },
                "values": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "al",
                      "at",
                      "ax",
                      "ba",
                      "be",
                      "bg",
                      "ch",
                      "cy",
                      "cz",
                      "de",
                      "dk",
                      "dz",
                      "ee",
                      "eg",
                      "es",
                      "fi",
                      "fo",
                      "fr",
                      "gg",
                      "gi",
                      "gr",
                      "hr",
                      "hu",
                      "ie",
                      "il",
                      "im",
                      "is",
                      "it",
                      "je",
                      "lb",
                      "li",
                      "lt",
                      "lu",
                      "lv",
                      "ly",
                      "ma",
                      "mc",
                      "md",
                      "me",
                      "mk",
                      "mt",
                      "nl",
                      "no",
                      "pl",
                      "ps",
                      "pt",
                      "ro",
                      "rs",
                      "se",
                      "si",
                      "sj",
                      "sk",
                      "sm",
                      "sy",
                      "tn",
                      "tr",
                      "ua",
                      "uk",
                      "us",
                      "va",
                      "world",
                      "xk"
                    ]
                  },
                  "additionalProperties": {
                    "type": "number",
                    "default": 0
                  }
                },
                "warning": {
                  "type": "string"
                }
              }
            },
            "packaging": {
              "type": "object",
              "properties": {
                "non_recyclable_and_non_biodegradable_materials": {
                  "type": "integer"
                },
                "packagings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "adjustments_packaging_item",
                    "properties": {
                      "ecoscore_material_score": {
                        "type": "integer"
                      },
                      "ecoscore_shape_ratio": {
                        "type": "integer"
                      },
                      "material": {
                        "type": "string"
                      },
                      "shape": {
                        "type": "string"
                      },
                      "number_of_units": {
                        "type": "integer",
                        "examples": [
                          1
                        ]
                      },
                      "quantity_per_unit": {
                        "type": "string",
                        "description": "The quantity per packaging unit, as a string.",
                        "examples": [
                          "33 cL"
                        ]
                      },
                      "quantity_per_unit_unit": {
                        "type": "string",
                        "examples": [
                          "cl"
                        ]
                      },
                      "quantity_per_unit_value": {
                        "type": "number",
                        "examples": [
                          33
                        ]
                      },
                      "recycling": {
                        "type": "string",
                        "examples": [
                          "en:recycle-in-sorting-bin"
                        ]
                      },
                      "weight_measured": {
                        "type": "number",
                        "examples": [
                          12.08
                        ]
                      }
                    }
                  }
                },
                "score": {
                  "type": "integer"
                },
                "value": {
                  "type": "integer"
                },
                "warning": {
                  "type": "string"
                }
              }
            },
            "production_system": {
              "type": "object",
              "properties": {
                "labels": {
                  "type": "array",
                  "examples": [
                    "vegan",
                    "fat free",
                    "Kosher"
                  ],
                  "items": {
                    "type": "string"
                  }
                },
                "value": {
                  "type": "integer"
                },
                "warning": {
                  "type": "string"
                }
              }
            },
            "threatened_species": {
              "type": "object",
              "properties": {
                "ingredient": {
                  "type": "string"
                },
                "value": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "agribalyse": {
          "type": "object",
          "properties": {
            "agribalyse_proxy_food_code": {
              "type": "string"
            },
            "agribalyse_food_code": {
              "type": "string"
            },
            "co2_agriculture": {
              "type": "number"
            },
            "co2_consumption": {
              "type": "integer"
            },
            "co2_distribution": {
              "type": "number"
            },
            "co2_packaging": {
              "type": "number"
            },
            "co2_processing": {
              "type": "number"
            },
            "co2_total": {
              "type": "number"
            },
            "co2_transportation": {
              "type": "number"
            },
            "code": {
              "type": "string"
            },
            "dqr": {
              "type": "string"
            },
            "ef_agriculture": {
              "type": "number"
            },
            "ef_consumption": {
              "type": "integer"
            },
            "ef_distribution": {
              "type": "number"
            },
            "ef_packaging": {
              "type": "number"
            },
            "ef_processing": {
              "type": "number"
            },
            "ef_total": {
              "type": "number"
            },
            "ef_transportation": {
              "type": "number"
            },
            "is_beverage": {
              "type": "integer"
            },
            "name_en": {
              "type": "string",
              "description": "This can be returned in many other languages\nlike name_fr (for french).\n"
            },
            "score": {
              "type": "integer"
            },
            "version": {
              "type": "string"
            }
          }
        },
        "grade": {
          "type": "string"
        },
        "grades": {
          "type": "object",
          "patternProperties": {
            "(?<country_code>\\w\\w)": {
              "type": "string"
            }
          }
        },
        "missing": {
          "type": "object",
          "properties": {
            "labels": {
              "type": "integer"
            },
            "origins": {
              "type": "integer"
            },
            "packagings": {
              "type": "integer"
            }
          }
        },
        "missing_data_warning": {
          "type": "integer"
        },
        "previous_data": {
          "type": "object",
          "properties": {
            "grade": {
              "type": [
                "string",
                "null"
              ]
            },
            "score": {
              "type": [
                "integer",
                "null"
              ]
            },
            "agribalyse": {
              "type": "object",
              "properties": {
                "agribalyse_proxy_food_code": {
                  "type": "string"
                },
                "agribalyse_food_code": {
                  "type": "string"
                },
                "co2_agriculture": {
                  "type": "number"
                },
                "co2_consumption": {
                  "type": "integer"
                },
                "co2_distribution": {
                  "type": "number"
                },
                "co2_packaging": {
                  "type": "number"
                },
                "co2_processing": {
                  "type": "number"
                },
                "co2_total": {
                  "type": "number"
                },
                "co2_transportation": {
                  "type": "number"
                },
                "code": {
                  "type": "string"
                },
                "dqr": {
                  "type": "string"
                },
                "ef_agriculture": {
                  "type": "number"
                },
                "ef_consumption": {
                  "type": "integer"
                },
                "ef_distribution": {
                  "type": "number"
                },
                "ef_packaging": {
                  "type": "number"
                },
                "ef_processing": {
                  "type": "number"
                },
                "ef_total": {
                  "type": "number"
                },
                "ef_transportation": {
                  "type": "number"
                },
                "is_beverage": {
                  "type": "integer"
                },
                "name_en": {
                  "type": "string",
                  "description": "This can be returned in many other languages\nlike name_fr (for french).\n"
                },
                "score": {
                  "type": "integer"
                },
                "version": {
                  "type": "string"
                }
              }
            }
          }
        },
        "score": {
          "type": "integer"
        },
        "scores": {
          "type": "object",
          "patternProperties": {
            "(?<country_code>\\w\\w)": {
              "type": "integer"
            }
          }
        },
        "status": {
          "type": "string"
        }
      }
    },
    "ecoscore_extended_data_version": {
      "type": "string"
    },
    "environment_impact_level": {
      "type": "string"
    },
    "environment_impact_level_tags": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  }
}