From 39560c8aead4ceeced1304a4a764fa2a134bf864 Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Tue, 25 Jul 2023 02:39:45 +0200 Subject: [PATCH] docs: cleaning and dispatching product schema (#8672) * improves a lot the product schema * fix rendering with rapidoc (by having a correct schema) * split the product schema into coherent and readable parts, and expose them * restores the OpenAPI check with swagger * put big example in its own file --- .github/workflows/generate-doc.yml | 12 +- Makefile | 13 + docs/api/ref/api-v3.yml | 3 - docs/api/ref/api.yml | 77 +- .../get_product_by_barcode_spread.yaml | 1055 +++++++++ docs/api/ref/requestBodies/crop_a_photo.yaml | 9 +- .../ref/responses/get_product_by_barcode.yaml | 1113 +-------- .../ref/responses/search_for_products.yaml | 10 + docs/api/ref/schemas/image.yaml | 48 +- .../selected_image.yaml => image_role.yaml} | 12 +- .../{images/properties => }/image_size.yaml | 0 docs/api/ref/schemas/image_urls.yaml | 5 + docs/api/ref/schemas/images/image.yaml | 26 - docs/api/ref/schemas/ingredient.yaml | 10 +- docs/api/ref/schemas/product.yaml | 2066 +---------------- docs/api/ref/schemas/product_base.yaml | 87 + docs/api/ref/schemas/product_ecoscore.yaml | 142 ++ docs/api/ref/schemas/product_extended.yaml | 162 ++ docs/api/ref/schemas/product_hidden.yaml | 110 + docs/api/ref/schemas/product_images.yaml | 88 + docs/api/ref/schemas/product_ingredients.yaml | 152 ++ .../ref/schemas/product_knowledge_panels.yaml | 6 + docs/api/ref/schemas/product_meta.yaml | 145 ++ docs/api/ref/schemas/product_misc.yaml | 106 + docs/api/ref/schemas/product_nutrition.yaml | 259 +++ docs/api/ref/schemas/product_quality.yaml | 66 + docs/api/ref/schemas/product_tags.yaml | 114 + docs/assets/api-rapidoc.html | 2 +- lib/ProductOpener/Food.pm | 27 +- 29 files changed, 2655 insertions(+), 3270 deletions(-) create mode 100644 docs/api/ref/examples/get_product_by_barcode_spread.yaml rename docs/api/ref/schemas/{images/selected_image.yaml => image_role.yaml} (81%) rename docs/api/ref/schemas/{images/properties => }/image_size.yaml (100%) create mode 100644 docs/api/ref/schemas/image_urls.yaml delete mode 100644 docs/api/ref/schemas/images/image.yaml create mode 100644 docs/api/ref/schemas/product_base.yaml create mode 100644 docs/api/ref/schemas/product_ecoscore.yaml create mode 100644 docs/api/ref/schemas/product_extended.yaml create mode 100644 docs/api/ref/schemas/product_hidden.yaml create mode 100644 docs/api/ref/schemas/product_images.yaml create mode 100644 docs/api/ref/schemas/product_ingredients.yaml create mode 100644 docs/api/ref/schemas/product_knowledge_panels.yaml create mode 100644 docs/api/ref/schemas/product_meta.yaml create mode 100644 docs/api/ref/schemas/product_misc.yaml create mode 100644 docs/api/ref/schemas/product_nutrition.yaml create mode 100644 docs/api/ref/schemas/product_quality.yaml create mode 100644 docs/api/ref/schemas/product_tags.yaml diff --git a/.github/workflows/generate-doc.yml b/.github/workflows/generate-doc.yml index 549d4009434ee..144ebfbe25ce5 100644 --- a/.github/workflows/generate-doc.yml +++ b/.github/workflows/generate-doc.yml @@ -62,15 +62,9 @@ jobs: # build -o /output/api/ref-v3/index.html api-v3.yml && \ # sudo chown $UID -R gh_pages - # Disabled by alex on 2023-03-09 because of a false positive Error: - # "attribute .Product. is not of type `object` (../schemas/product.yaml#/Product)" - # because of legit `$ref: ../schemas/product.yaml#/Product` in `get_product_by_barcode.yaml` - # - # - name: Validate OpenAPI - # run: | - # docker run --rm \ - # -v ${PWD}:/local openapitools/openapi-generator-cli validate \ - # -i /local/docs/reference/api.yml \ + - name: Validate OpenAPI + run: | + make check_openapi # generate OpenAPI documentation with rapidoc # we do this after mkdocs to overwrite api.html file diff --git a/Makefile b/Makefile index d601caf492162..c34fd29d97163 100644 --- a/Makefile +++ b/Makefile @@ -340,6 +340,19 @@ check_critic: @echo "đŸ„« Checking with perlcritic" test -z "${TO_CHECK}" || ${DOCKER_COMPOSE} run --rm --no-deps backend perlcritic ${TO_CHECK} + +check_openapi_v2: + docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli validate --recommend \ + -i /local/docs/api/ref/api.yml + +check_openapi_v3: + docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli validate --recommend \ + -i /local/docs/api/ref/api-v3.yml + +check_openapi: check_openapi_v2 check_openapi_v3 + #-------------# # Compilation # #-------------# diff --git a/docs/api/ref/api-v3.yml b/docs/api/ref/api-v3.yml index ea4bdb115eb70..90514cbae64d5 100644 --- a/docs/api/ref/api-v3.yml +++ b/docs/api/ref/api-v3.yml @@ -304,9 +304,6 @@ paths: in: query name: term description: Alias for the "string" parameter provided for backward compatibility. "string" takes precedence. -components: - schemas: null - parameters: null tags: - name: Read Requests - name: Write Requests diff --git a/docs/api/ref/api.yml b/docs/api/ref/api.yml index c6ff56868ad1f..e59a6776f4d7f 100644 --- a/docs/api/ref/api.yml +++ b/docs/api/ref/api.yml @@ -13,8 +13,13 @@ info: license: name: 'data: ODbL' url: 'https://opendatacommons.org/licenses/odbl/summary/index.html' - identifier: "ODbL-1.0" + # can't use url and identifier - use x-identifier + x-identifier: "ODbL-1.0" version: '2' +externalDocs: + description: | + Please read the API introduction before using this API. + url: https://openfoodfacts.github.io/openfoodfacts-server/api/ servers: - description: dev url: 'https://world.openfoodfacts.net' @@ -44,6 +49,10 @@ paths: application/json: schema: $ref: ./responses/get_product_by_barcode.yaml + examples: + spread-example: + $ref: ./examples/get_product_by_barcode_spread.yaml + description: | A product can be fetched via its unique barcode. It returns all the details of that product response. @@ -77,10 +86,7 @@ paths: - type: object properties: product: - type: object - properties: - knowledge_panels: - $ref: ./schemas/knowledge_panels/panels.yaml + $ref: ./schemas/product_knowledge_panels.yaml description: | Knowledge panels gives high leve informations about a product, ready to display. @@ -152,6 +158,7 @@ paths: multipart/form-data: schema: $ref: ./requestBodies/crop_a_photo.yaml + required: true tags: - Write Requests get: @@ -288,48 +295,28 @@ paths: all packaging_shapes containing "fe" will be returned. This is useful if you have a search in your application, for a specific product field. - '/api/v2/product/{barcode}?fields=images': - parameters: - - schema: - type: string - name: barcode - in: path - required: true - get: - summary: Get Images for a specific product by barcode (special case of get product) - tags: - - Read Requests - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - code: - type: string - example: '3017620422003' - product: - type: object - properties: - images: - type: object - patternProperties: - /^\d+$/: - $ref: ./schemas/images/image.yaml - (front|ingredients|nutrition|packaging|other)_\w\w(-\w\w)?: - $ref: ./schemas/images/selected_image.yaml - status: - type: integer - example: 1 - status_verbose: - type: string - example: product found - operationId: get-api-v2-product-barcode-?fields=images - description: Images ensure the reliability of Open Food Facts data. It provides a primary source and proof of all the structured data. You may therefore want to display it along the structured information. components: schemas: + "Product-Base": + $ref: ./schemas/product_base.yaml + "Product-Misc": + $ref: ./schemas/product_misc.yaml + "Product-Tags": + $ref: ./schemas/product_tags.yaml + "Product-Nutrition": + $ref: ./schemas/product_nutrition.yaml + "Product-Ingredients": + $ref: ./schemas/product_ingredients.yaml + "Product-Images": + $ref: ./schemas/product_images.yaml + "Product-Eco-Score": + $ref: ./schemas/product_ecoscore.yaml + "Product-Metadata": + $ref: ./schemas/product_meta.yaml + "Product-Data-Quality": + $ref: ./schemas/product_quality.yaml + "Product-Knowledge-Panels": + $ref: ./schemas/product_knowledge_panels.yaml Product: $ref: ./schemas/product.yaml parameters: diff --git a/docs/api/ref/examples/get_product_by_barcode_spread.yaml b/docs/api/ref/examples/get_product_by_barcode_spread.yaml new file mode 100644 index 0000000000000..8dd5c53d6e4aa --- /dev/null +++ b/docs/api/ref/examples/get_product_by_barcode_spread.yaml @@ -0,0 +1,1055 @@ +summary: retrieved values for a well known chocolate and nut spread +value: + code: '3017620422003' + product: + _id: '3017620422003' + _keywords: + - et + - pate + - cacao + - produit + - ferrero + - gluten + - petit-dejeuner + - san + - au + - aux + - sucre + - nutella + abbreviated_product_name: Nutella t.400 + abbreviated_product_name_fr: Nutella t.400 + added_countries_tags: [] + additives_n: 1 + additives_original_tags: + - 'en:e322' + additives_prev_original_tags: + - 'en:e322' + additives_tags: + - 'en:e322' + allergens: 'en:milk,en:nuts,en:soybeans' + allergens_from_ingredients: 'en:nuts, hazelnuts' + allergens_from_user: '(fr) en:milk,en:nuts,en:soybeans' + allergens_hierarchy: + - 'en:milk' + - 'en:nuts' + - 'en:soybeans' + allergens_lc: fr + allergens_tags: + - 'en:milk' + - 'en:nuts' + - 'en:soybeans' + amino_acids_prev_tags: [] + amino_acids_tags: [] + brands: Ferrero + brands_tags: + - ferrero + carbon_footprint_percent_of_known_ingredients: 13 + categories: 'Produits Ă  tartiner,Petit-dĂ©jeuners,Produits Ă  tartiner sucrĂ©s,PĂątes Ă  tartiner,PĂątes Ă  tartiner aux noisettes,PĂątes Ă  tartiner aux noisettes et au cacao' + categories_hierarchy: + - 'en:breakfasts' + - 'en:spreads' + - 'en:sweet-spreads' + - 'en:hazelnut-spreads' + - 'en:chocolate-spreads' + - 'en:cocoa-and-hazelnuts-spreads' + categories_lc: fr + categories_properties: + 'agribalyse_food_code:en': '31032' + 'agribalyse_proxy_food_code:en': '31032' + 'ciqual_food_code:en': '31032' + categories_properties_tags: + - all-products + - categories-known + - agribalyse-food-code-31032 + - agribalyse-food-code-known + - agribalyse-proxy-food-code-31032 + - agribalyse-proxy-food-code-known + - ciqual-food-code-31032 + - ciqual-food-code-known + - agribalyse-known + - agribalyse-31032 + categories_tags: + - 'en:breakfasts' + - 'en:spreads' + - 'en:sweet-spreads' + - 'fr:pates-a-tartiner' + - 'en:hazelnut-spreads' + - 'en:chocolate-spreads' + - 'en:cocoa-and-hazelnuts-spreads' + category_properties: + 'ciqual_food_name:en': Chocolate spread with hazelnuts + checked: 'on' + checkers_tags: + - moon-rabbit + ciqual_food_name_tags: + - chocolate-spread-with-hazelnuts + cities_tags: [] + code: '3017620422003' + codes_tags: + - code-13 + - 3017620422xxx + - 301762042xxxx + - 30176204xxxxx + - 3017620xxxxxx + - 301762xxxxxxx + - 30176xxxxxxxx + - 3017xxxxxxxxx + - 301xxxxxxxxxx + - 30xxxxxxxxxxx + - 3xxxxxxxxxxxx + compared_to_category: 'en:cocoa-and-hazelnuts-spreads' + complete: 0 + completeness: 0.875 + conservation_conditions: A conserver au sec et Ă  l'abri de la chaleur. Ne pas mettre au rĂ©frigĂ©rateur. + conservation_conditions_fr: A conserver au sec et Ă  l'abri de la chaleur. Ne pas mettre au rĂ©frigĂ©rateur. + correctors_tags: + - user1 + - user2 + - user3 + - user4 + countries: 'en:Algeria Austria Belgium Canada France Germany Italy Luxembourg Mexico Morocco Netherlands Portugal Senegal Spain Switzerland Tunisia United Kingdom United States' + countries_beforescanbot: 'Belgium,France' + countries_hierarchy: + - 'en:Algeria Austria Belgium Canada France Germany Italy Luxembourg Mexico Morocco Netherlands Portugal Senegal Spain Switzerland Tunisia United Kingdom United States' + countries_lc: fr + countries_tags: + - 'en:algeria-austria-belgium-canada-france-germany-italy-luxembourg-mexico-morocco-netherlands-portugal-senegal-spain-switzerland-tunisia-united-kingdom-united-states' + created_t: 1457680652 + creator: openfoodfacts-contributors + customer_service: 'FERRERO FRANCE COMMERCIALE - Service Consommateurs, CS 90058 - 76136 MONT SAINT AIGNAN Cedex' + customer_service_fr: 'FERRERO FRANCE COMMERCIALE - Service Consommateurs, CS 90058 - 76136 MONT SAINT AIGNAN Cedex' + data_quality_bugs_tags: [] + data_quality_errors_tags: [] + data_quality_info_tags: + - 'en:packaging-data-incomplete' + - 'en:ingredients-percent-analysis-ok' + - 'en:ecoscore-extended-data-computed' + - 'en:ecoscore-extended-data-less-precise-than-agribalyse' + - 'en:food-groups-1-known' + - 'en:food-groups-2-known' + - 'en:food-groups-3-unknown' + data_quality_tags: + - 'en:packaging-data-incomplete' + - 'en:ingredients-percent-analysis-ok' + - 'en:ecoscore-extended-data-computed' + - 'en:ecoscore-extended-data-less-precise-than-agribalyse' + - 'en:food-groups-1-known' + - 'en:food-groups-2-known' + - 'en:food-groups-3-unknown' + - 'en:ecoscore-origins-of-ingredients-origins-are-100-percent-unknown' + - 'en:ecoscore-packaging-unspecified-shape' + - 'en:ecoscore-production-system-no-label' + data_quality_warnings_tags: + - 'en:ecoscore-origins-of-ingredients-origins-are-100-percent-unknown' + - 'en:ecoscore-packaging-unspecified-shape' + - 'en:ecoscore-production-system-no-label' + data_sources: 'Database - FoodRepo / openfood.ch, Databases, Producer - Ferrero, Producers, App - yuka, Apps, Producer - ferrero-france-commerciale, Database - Equadis, Database - GDSN, App - InFood, App - Open Food Facts, App - halal-healthy, App - smoothie-openfoodfacts' + data_sources_tags: + - database-foodrepo-openfood-ch + - databases + - producer-ferrero + - producers + - app-yuka + - apps + - producer-ferrero-france-commerciale + - database-equadis + - database-gdsn + - app-infood + - app-open-food-facts + - app-halal-healthy + - app-smoothie-openfoodfacts + ecoscore_data: + adjustments: + origins_of_ingredients: + aggregated_origins: + - origin: 'en:unknown' + percent: 100 + epi_score: 0 + epi_value: -5 + origins_from_origins_field: + - 'en:unknown' + transportation_scores: + fr: 0 + 'no': 0 + uk: 0 + us: 0 + world: 0 + transportation_values: + fr: 0 + 'no': 0 + uk: 0 + us: 0 + world: 0 + values: + fr: -5 + 'no': -5 + uk: -5 + us: -5 + world: -5 + warning: origins_are_100_percent_unknown + packaging: + non_recyclable_and_non_biodegradable_materials: 0 + packagings: + - ecoscore_material_score: 81 + ecoscore_shape_ratio: 1 + material: 'en:clear-glass' + shape: 'en:unknown' + score: 81 + value: -2 + warning: unspecified_shape + production_system: + labels: [] + value: 0 + warning: no_label + threatened_species: + ingredient: 'en:palm-oil' + value: -10 + agribalyse: + agribalyse_food_code: '31032' + co2_agriculture: 8.7770996 + co2_consumption: 0 + co2_distribution: 0.014104999 + co2_packaging: 0.18864842 + co2_processing: 0.69167973 + co2_total: 9.8742343 + co2_transportation: 0.19708507 + code: '31032' + dqr: '2.54' + ef_agriculture: 0.61477708 + ef_consumption: 0 + ef_distribution: 0.0045906531 + ef_packaging: 0.020453714 + ef_processing: 0.085674643 + ef_total: 0.74366703 + ef_transportation: 0.017824104 + is_beverage: 0 + name_en: Chocolate spread with hazelnuts + name_fr: PĂąte Ă  tartiner chocolat et noisette + score: 40 + grade: d + grades: + fr: d + 'no': d + uk: d + us: d + world: d + missing: + labels: 1 + origins: 1 + packagings: 1 + missing_data_warning: 1 + score: 23 + scores: + fr: 23 + 'no': 23 + uk: 23 + us: 23 + world: 23 + status: known + ecoscore_extended_data: + impact: + ef_single_score_log_stddev: 0.0539895633164057 + likeliest_impacts: + Climate_change: 0.172717449218484 + EF_single_score: 0.023255035815491 + likeliest_recipe: + 'en:emulsifier': 0.388589430098073 + 'en:hazelnut_oil': 12.806852015349 + 'en:palm_oil': 16.6103749736231 + 'en:sugar': 52.9709312507153 + 'en:water': 4.90093151221936 + 'fr:Cacao_Maigre_7': 3.94056985087663 + 'fr:Lait__cr_m__En_Poudre_8': 6.8959972390341 + mass_ratio_uncharacterized: 0.11 + uncharacterized_ingredients: + impact: + - 'fr:Lait ÉcrĂ©mĂ© En Poudre 8' + - 'fr:Cacao Maigre 7' + nutrition: + - 'fr:Lait ÉcrĂ©mĂ© En Poudre 8' + - 'fr:Cacao Maigre 7' + uncharacterized_ingredients_mass_proportion: + impact: 0.11 + nutrition: 0.11 + uncharacterized_ingredients_ratio: + impact: 0.333333333333333 + nutrition: 0.333333333333333 + warnings: + - 'The product has a high number of nutrition uncharacterized ingredients: 33%' + - 'The product has a high number of impact uncharacterized ingredients: 33%' + - 'The estimated mass of nutrition uncharacterized ingredients in the product is high: 11%' + - 'The estimated mass of impact uncharacterized ingredients in the product is high: 11%' + ecoscore_extended_data_version: '4' + ecoscore_grade: d + ecoscore_score: 23 + ecoscore_tags: + - d + editors_tags: + - user1 + - user2 + - user3 + - user4 + emb_codes: '' + emb_codes_20141016: '' + emb_codes_orig: '' + emb_codes_tags: [] + entry_dates_tags: + - '2016-03-11' + - 2016-03 + - '2016' + environment_impact_level: '' + environment_impact_level_tags: [] + expiration_date: 09/2021 + food_groups: 'en:sweets' + food_groups_tags: + - 'en:sugary-snacks' + - 'en:sweets' + fruits-vegetables-nuts_100g_estimate: 0 + generic_name: '' + generic_name_ar: نوŰȘÙ„Ű§ + generic_name_de: Nuss-Nougat-Creme + generic_name_en: '' + generic_name_es: Crema de Avellanas con cacao + generic_name_fr: PĂąte Ă  tartiner aux noisettes + generic_name_id: '' + generic_name_it: Nutella + generic_name_nl: '' + grades: {} + id: '3017620422003' + image_front_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' + image_front_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' + image_front_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' + image_nutrition_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.200.jpg' + image_nutrition_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.100.jpg' + image_nutrition_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.400.jpg' + image_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' + image_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' + image_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' + images: + '1': + sizes: + '100': + h: 100 + w: 56 + '400': + h: 400 + w: 225 + full: + h: 2000 + w: 1125 + uploaded_t: '1457680652' + uploader: openfoodfacts-contributors + '2': + sizes: + '100': + h: 100 + w: 75 + '400': + h: 400 + w: 300 + full: + h: 3264 + w: 2448 + uploaded_t: '1462829284' + uploader: openfoodfacts-contributors + '3': + sizes: + '100': + h: 100 + w: 56 + '400': + h: 400 + w: 225 + full: + h: 2000 + w: 1125 + uploaded_t: '1468510986' + uploader: user3 + front_en: + angle: '0' + coordinates_image_size: full + geometry: 0x0-0-0 + imgid: '1' + normalize: 'false' + rev: '399' + sizes: + '100': + h: 100 + w: 77 + '200': + h: 200 + w: 155 + '400': + h: 400 + w: 310 + full: + h: 1808 + w: 1400 + white_magic: 'false' + x1: '0' + x2: '0' + y1: '0' + y2: '0' + front_fr: + angle: 0 + coordinates_image_size: '400' + geometry: 0x0--5--5 + imgid: '2' + normalize: 'false' + rev: '415' + sizes: + '100': + h: 100 + w: 77 + '200': + h: 200 + w: 155 + '400': + h: 400 + w: 310 + full: + h: 1808 + w: 1400 + white_magic: 'false' + x1: '-1' + x2: '-1' + y1: '-1' + y2: '-1' + ingredients_fr: + angle: null + coordinates_image_size: '400' + geometry: 0x0-0-0 + imgid: '3' + normalize: null + rev: '299' + sizes: + '100': + h: 16 + w: 100 + '200': + h: 33 + w: 200 + '400': + h: 65 + w: 400 + full: + h: 334 + w: 2046 + white_magic: null + x1: null + x2: null + y1: null + y2: null + nutrition_en: + angle: '0' + coordinates_image_size: full + geometry: 0x0-0-0 + imgid: '3' + normalize: 'false' + rev: '400' + sizes: + '100': + h: 100 + w: 96 + '200': + h: 200 + w: 192 + '400': + h: 400 + w: 383 + full: + h: 572 + w: 548 + white_magic: 'false' + x1: '0' + x2: '0' + y1: '0' + y2: '0' + packaging_fr: + angle: 0 + coordinates_image_size: full + geometry: 0x0--1--1 + imgid: '3' + normalize: null + rev: '420' + sizes: + '100': + h: 31 + w: 100 + '200': + h: 61 + w: 200 + '400': + h: 122 + w: 400 + full: + h: 638 + w: 2084 + white_magic: null + x1: '-1' + x2: '-1' + y1: '-1' + y2: '-1' + informers_tags: + - user1 + - user2 + - user3 + - user4 + ingredients: + - id: 'en:sugar' + percent_estimate: 46.5 + percent_max: 63 + percent_min: 30 + text: sugar + vegan: 'yes' + vegetarian: 'yes' + - from_palm_oil: 'yes' + id: 'en:palm-oil' + percent_estimate: 25.5 + percent_max: 38 + percent_min: 13 + text: palm oil + vegan: 'yes' + vegetarian: 'yes' + - id: 'en:hazelnut' + percent: 13 + percent_estimate: 13 + percent_max: 13 + percent_min: 13 + text: hazelnuts + vegan: 'yes' + vegetarian: 'yes' + - id: 'en:skim-milk-powder-8' + percent: 7 + percent_estimate: 7 + percent_max: 7 + percent_min: 7 + text: skim milk powder 8 + - id: 'en:lean-cocoa-7' + percent: 4 + percent_estimate: 4 + percent_max: 4 + percent_min: 4 + text: lean cocoa 7 + - id: 'en:emulsifier' + ingredients: + - id: 'en:soya-lecithin' + percent_estimate: 2 + percent_max: 4 + percent_min: 0 + text: soy lecithins + vegan: 'yes' + vegetarian: 'yes' + percent_estimate: 2 + percent_max: 4 + percent_min: 0 + text: emulsifiers + - id: 'en:vanillin' + percent_estimate: 2 + percent_max: 4 + percent_min: 0 + text: vanillin + ingredients_analysis: + 'en:palm-oil': + - 'en:palm-oil' + 'en:vegan-status-unknown': + - 'en:skim-milk-powder-8' + - 'en:lean-cocoa-7' + - 'en:vanillin' + 'en:vegetarian-status-unknown': + - 'en:skim-milk-powder-8' + - 'en:lean-cocoa-7' + - 'en:vanillin' + ingredients_analysis_tags: + - 'en:palm-oil' + - 'en:vegan-status-unknown' + - 'en:vegetarian-status-unknown' + ingredients_from_or_that_may_be_from_palm_oil_n: 0 + ingredients_from_palm_oil_n: 0 + ingredients_from_palm_oil_tags: [] + ingredients_hierarchy: + - 'en:sugar' + - 'en:added-sugar' + - 'en:disaccharide' + - 'en:palm-oil' + - 'en:oil-and-fat' + - 'en:vegetable-oil-and-fat' + - 'en:palm-oil-and-fat' + - 'en:hazelnut' + - 'en:nut' + - 'en:tree-nut' + - 'en:skim-milk-powder-8' + - 'en:lean-cocoa-7' + - 'en:emulsifier' + - 'en:vanillin' + - 'en:soya-lecithin' + - 'en:e322' + - 'en:e322i' + ingredients_n: 8 + ingredients_n_tags: + - '8' + - 1-10 + ingredients_original_tags: + - 'en:sugar' + - 'en:palm-oil' + - 'en:hazelnut' + - 'en:skim-milk-powder-8' + - 'en:lean-cocoa-7' + - 'en:emulsifier' + - 'en:vanillin' + - 'en:soya-lecithin' + ingredients_percent_analysis: 1 + ingredients_tags: + - 'en:sugar' + - 'en:added-sugar' + - 'en:disaccharide' + - 'en:palm-oil' + - 'en:oil-and-fat' + - 'en:vegetable-oil-and-fat' + - 'en:palm-oil-and-fat' + - 'en:hazelnut' + - 'en:nut' + - 'en:tree-nut' + - 'en:skim-milk-powder-8' + - 'en:lean-cocoa-7' + - 'en:emulsifier' + - 'en:vanillin' + - 'en:soya-lecithin' + - 'en:e322' + - 'en:e322i' + ingredients_text: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' + ingredients_text_en: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' + ingredients_text_fr: 'Sucre, huile de palme, _NOISETTES_ 13%, _LAIT_ Ă©crĂ©mĂ© en poudre 8,7%, cacao maigre 7,4%, Ă©mulsifiants: lĂ©cithine [SOJA]; vanilline. Sans gluten' + ingredients_text_with_allergens: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' + ingredients_text_with_allergens_en: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' + ingredients_text_with_allergens_fr: 'Sucre, huile de palme, NOISETTES 13%, LAIT Ă©crĂ©mĂ© en poudre 8,7%, cacao maigre 7,4%, Ă©mulsifiants: lĂ©cithine [SOJA]; vanilline. Sans gluten' + ingredients_that_may_be_from_palm_oil_n: 0 + ingredients_that_may_be_from_palm_oil_tags: [] + ingredients_with_specified_percent_n: 3 + ingredients_with_specified_percent_sum: 24 + ingredients_with_unspecified_percent_n: 4 + ingredients_with_unspecified_percent_sum: 76 + interface_version_created: '20120622' + interface_version_modified: 20150316.jqm2 + known_ingredients_n: 15 + labels: 'Sans gluten,en:nonorganic' + labels_hierarchy: + - 'en:no-gluten' + - 'en:nonorganic' + labels_lc: fr + labels_tags: + - 'en:no-gluten' + - 'en:nonorganic' + lang: en + languages: + 'en:arabic': 2 + 'en:english': 4 + 'en:french': 10 + 'en:german': 3 + 'en:italian': 3 + 'en:spanish': 7 + languages_codes: + en: 4 + fr: 10 + languages_hierarchy: + - 'en:english' + - 'en:french' + languages_tags: + - 'en:english' + - 'en:french' + - 'en:multilingual' + last_check_dates_tags: + - '2021-07-21' + - 2021-07 + - '2021' + last_checked_t: 1626872806 + last_checker: user3 + last_edit_dates_tags: + - '2022-07-29' + - 2022-07 + - '2022' + last_editor: user4 + last_image_dates_tags: + - '2022-07-29' + - 2022-07 + - '2022' + last_image_t: 1659084293 + last_modified_by: user4 + last_modified_t: 1659084329 + lc: en + link: '' + main_countries_tags: [] + manufacturing_places: '' + manufacturing_places_tags: [] + max_imgid: '121' + minerals_prev_tags: [] + minerals_tags: [] + misc_tags: + - 'en:nutrition-no-fiber' + - 'en:nutrition-fruits-vegetables-nuts-estimate-from-ingredients' + - 'en:nutrition-no-fiber-or-fruits-vegetables-nuts' + - 'en:nutriscore-computed' + - 'en:ecoscore-extended-data-computed' + - 'en:ecoscore-extended-data-version-4' + - 'en:ecoscore-missing-data-warning' + - 'en:ecoscore-missing-data-labels' + - 'en:ecoscore-missing-data-origins' + - 'en:ecoscore-missing-data-packagings' + - 'en:ecoscore-computed' + no_nutrition_data: 'null' + nova_group: 4 + nova_groups: '4' + nova_groups_markers: + '3': + - - ingredients + - 'en:sugar' + '4': + - - additives + - 'en:e322' + - - ingredients + - 'en:emulsifier' + nova_groups_tags: + - 'en:4-ultra-processed-food-and-drink-products' + nucleotides_prev_tags: [] + nucleotides_tags: [] + nutrient_levels: + fat: high + salt: low + saturated-fat: high + sugars: high + nutrient_levels_tags: + - 'en:fat-in-high-quantity' + - 'en:saturated-fat-in-high-quantity' + - 'en:sugars-in-high-quantity' + - 'en:salt-in-low-quantity' + nutriments: + alcohol: 0 + alcohol_100g: 0 + alcohol_serving: 0 + alcohol_unit: '% vol' + alcohol_value: 0 + carbohydrates: 57.5 + carbohydrates_100g: 57.5 + carbohydrates_serving: 8.62 + carbohydrates_unit: g + carbohydrates_value: 57.5 + carbon-footprint-from-known-ingredients_product: 135 + carbon-footprint-from-known-ingredients_serving: 5.07 + energy: 2252 + energy-kcal: 539 + energy-kcal_100g: 539 + energy-kcal_serving: 80.8 + energy-kcal_unit: kcal + energy-kcal_value: 539 + energy-kj: 2252 + energy-kj_100g: 2252 + energy-kj_serving: 338 + energy-kj_unit: kJ + energy-kj_value: 2252 + energy_100g: 2252 + energy_serving: 338 + energy_unit: kJ + energy_value: 2252 + fat: 30.9 + fat_100g: 30.9 + fat_serving: 4.63 + fat_unit: g + fat_value: 30.9 + fruits-vegetables-nuts-estimate-from-ingredients_100g: 13 + fruits-vegetables-nuts-estimate-from-ingredients_serving: 13 + nova-group: 4 + nova-group_100g: 4 + nova-group_serving: 4 + nutrition-score-fr: 26 + nutrition-score-fr_100g: 26 + proteins: 6.3 + proteins_100g: 6.3 + proteins_serving: 0.945 + proteins_unit: g + proteins_value: 6.3 + salt: 0.107 + salt_100g: 0.107 + salt_serving: 0.016 + salt_unit: g + salt_value: 0.107 + saturated-fat: 10.6 + saturated-fat_100g: 10.6 + saturated-fat_serving: 1.59 + saturated-fat_unit: g + saturated-fat_value: 10.6 + sodium: 0.0428 + sodium_100g: 0.0428 + sodium_serving: 0.00642 + sodium_unit: g + sodium_value: 0.0428 + sugars: 56.3 + sugars_100g: 56.3 + sugars_serving: 8.44 + sugars_unit: g + sugars_value: 56.3 + nutriscore_data: + energy: 2252 + energy_points: 6 + energy_value: 2252 + fiber: 0 + fiber_points: 0 + fiber_value: 0 + fruits_vegetables_nuts_colza_walnut_olive_oils: 13 + fruits_vegetables_nuts_colza_walnut_olive_oils_points: 0 + fruits_vegetables_nuts_colza_walnut_olive_oils_value: 13 + grade: e + is_beverage: 0 + is_cheese: 0 + is_fat: 0 + is_water: 0 + negative_points: 26 + positive_points: 0 + proteins: 6.3 + proteins_points: 3 + proteins_value: 6.3 + saturated_fat: 10.6 + saturated_fat_points: 10 + saturated_fat_ratio: 34.3042071197411 + saturated_fat_ratio_points: 5 + saturated_fat_ratio_value: 34.3 + saturated_fat_value: 10.6 + score: 26 + sodium: 42.8 + sodium_points: 0 + sodium_value: 42.8 + sugars: 56.3 + sugars_points: 10 + sugars_value: 56.3 + nutriscore_grade: e + nutriscore_score: 26 + nutriscore_score_opposite: -26 + nutrition_data: 'on' + nutrition_data_per: 100g + nutrition_data_prepared: '' + nutrition_data_prepared_per: 100g + nutrition_grade_fr: e + nutrition_grades: e + nutrition_grades_tags: + - e + nutrition_score_beverage: 0 + nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients: 1 + nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients_value: 13 + nutrition_score_warning_no_fiber: 1 + obsolete: '' + obsolete_since_date: '' + origin: '' + origins: '' + origins_hierarchy: [] + origins_lc: fr + origins_tags: [] + other_nutritional_substances_tags: [] + owner: org-ferrero-france-commerciale + owners_tags: org-ferrero-france-commerciale + packaging: PP 5 Ummi PLASTIQUE / PLASTIEK PAP 27 WWW PAPIER / PAPIER CIPAP 82 PANNEAU DE FIBRE COMPOSITES/ COMPOSIET VEZELPLAAT GL 70 VERRE / GLAS + packaging_hierarchy: + - 'fr:PP 5 Ummi PLASTIQUE / PLASTIEK PAP 27 WWW PAPIER / PAPIER CIPAP 82 PANNEAU DE FIBRE COMPOSITES/ COMPOSIET VEZELPLAAT GL 70 VERRE / GLAS' + packaging_lc: fr + packaging_tags: + - 'fr:pp-5-ummi-plastique-plastiek-pap-27-www-papier-papier-cipap-82-panneau-de-fibre-composites-composiet-vezelplaat-gl-70-verre-glas' + packaging_text: '' + packaging_text_ar: '' + packaging_text_de: '' + packaging_text_en: '' + packaging_text_es: 'Pot en verre, couvercle en plastique.' + packaging_text_fr: "1 couvercle plastique blanc opaque PP Ă  jeter,\r\n1 plaque en carton PAP 21 Ă  recycler,\r\n1 opercule en carton C/PAP 82 Ă  recycler,\r\n1 pot en verre Ă  recycler" + packaging_text_id: '' + packaging_text_it: '' + packaging_text_nl: '' + packagings: + - material: 'en:clear-glass' + photographers_tags: + - user1 + - user2 + - user3 + - user4 + pnns_groups_1: Sugary snacks + pnns_groups_1_tags: + - sugary-snacks + - known + pnns_groups_2: Sweets + pnns_groups_2_tags: + - sweets + - known + popularity_key: 20999992556 + popularity_tags: + - top-10-scans-2021 + - top-50-scans-2021 + - top-100-scans-2021 + - top-500-scans-2021 + - top-1000-scans-2021 + - top-5000-scans-2021 + - top-10000-scans-2021 + - top-50000-scans-2021 + - top-100000-scans-2021 + - top-10-fr-scans-2021 + - top-50-fr-scans-2021 + - top-100-fr-scans-2021 + - top-500-fr-scans-2021 + - top-1000-fr-scans-2021 + - top-5000-fr-scans-2021 + - top-10000-fr-scans-2021 + - top-50000-fr-scans-2021 + - top-100000-fr-scans-2021 + - top-country-fr-scans-2021 + - at-least-5-fr-scans-2021 + - at-least-10-fr-scans-2021 + product_name: Nutella + product_name_ar: نوŰȘÙŠÙ„Ű§ + product_name_de: Nutella + product_name_en: Nutella + product_name_es: Nutella + product_name_fr: PĂąte Ă  tartiner Nutella noisettes et cacao - 400g + product_name_id: '' + product_name_it: Nutella + product_name_nl: '' + product_quantity: '400' + purchase_places: F - 77480 Mousseaux les Bray France + purchase_places_tags: + - f-77480-mousseaux-les-bray-france + quantity: 400g + removed_countries_tags: [] + rev: 421 + scans_n: 3713 + scores: {} + selected_images: + front: + display: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.400.jpg' + small: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.200.jpg' + thumb: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.100.jpg' + ingredients: + display: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.400.jpg' + small: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.200.jpg' + thumb: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.100.jpg' + nutrition: + display: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.400.jpg' + small: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.200.jpg' + thumb: + en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.100.jpg' + packaging: + display: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.400.jpg' + small: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.200.jpg' + thumb: + fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.100.jpg' + serving_quantity: '15' + serving_size: 15g + sortkey: 1610877517 + sources: + - fields: + - product_name_de + - product_name_it + - brands + - countries + id: openfood-ch + images: [] + import_t: 1548767279 + manufacturer: '0' + name: FoodRepo + source_licence: Creative Commons Attribution 4.0 International License + source_licence_url: 'https://creativecommons.org/licenses/by/4.0/' + url: 'https://www.foodrepo.org/ch/products/19413' + - fields: + - packaging + - ingredients_text_fr + id: ferrero + images: [] + import_t: 1552318840 + manufacturer: '1' + name: Ferrero + url: 'https://www.ferrero.fr' + sources_fields: + org-gs1: + gln: '3010176200101' + gpcCategoryCode: '10000187' + gpcCategoryName: PĂątes Ă  Tartiner SucrĂ©es (Longue Conservation) + isAllergenRelevantDataProvided: 'true' + lastChangeDateTime: '2022-07-13T16:01:41+02:00' + partyName: FERRERO FRANCE COMMERCIALE + productionVariantDescription: '2014' + publicationDateTime: '2022-07-13T16:01:41+02:00' + states: 'en:to-be-completed, en:nutrition-facts-completed, en:ingredients-completed, en:expiration-date-completed, en:packaging-code-to-be-completed, en:characteristics-to-be-completed, en:origins-to-be-completed, en:categories-completed, en:brands-completed, en:packaging-completed, en:quantity-completed, en:product-name-completed, en:photos-to-be-validated, en:packaging-photo-to-be-selected, en:nutrition-photo-selected, en:ingredients-photo-to-be-selected, en:front-photo-selected, en:photos-uploaded' + states_hierarchy: + - 'en:to-be-completed' + - 'en:nutrition-facts-completed' + - 'en:ingredients-completed' + - 'en:expiration-date-completed' + - 'en:packaging-code-to-be-completed' + - 'en:characteristics-to-be-completed' + - 'en:origins-to-be-completed' + - 'en:categories-completed' + - 'en:brands-completed' + - 'en:packaging-completed' + - 'en:quantity-completed' + - 'en:product-name-completed' + - 'en:photos-to-be-validated' + - 'en:packaging-photo-to-be-selected' + - 'en:nutrition-photo-selected' + - 'en:ingredients-photo-to-be-selected' + - 'en:front-photo-selected' + - 'en:photos-uploaded' + states_tags: + - 'en:to-be-completed' + - 'en:nutrition-facts-completed' + - 'en:ingredients-completed' + - 'en:expiration-date-completed' + - 'en:packaging-code-to-be-completed' + - 'en:characteristics-to-be-completed' + - 'en:origins-to-be-completed' + - 'en:categories-completed' + - 'en:brands-completed' + - 'en:packaging-completed' + - 'en:quantity-completed' + - 'en:product-name-completed' + - 'en:photos-to-be-validated' + - 'en:packaging-photo-to-be-selected' + - 'en:nutrition-photo-selected' + - 'en:ingredients-photo-to-be-selected' + - 'en:front-photo-selected' + - 'en:photos-uploaded' + stores: 'Bi1 Magasins U Carrefour Franprix Auchan Casino IntermarchĂ©,carrefour.fr' + stores_tags: + - bi1-magasins-u-carrefour-franprix-auchan-casino-intermarche + - carrefour-fr + teams: 'pain-au-chocolat,shark-attack,stakano,chocolatine,la-robe-est-bleue,vegan,m,b,c,vegancheck' + teams_tags: + - pain-au-chocolat + - shark-attack + - stakano + - chocolatine + - la-robe-est-bleue + - vegan + - m + - b + - c + - vegancheck + traces: '' + traces_from_ingredients: '' + traces_from_user: '(fr) ' + traces_hierarchy: [] + traces_lc: fr + traces_tags: [] + unique_scans_n: 2544 + unknown_ingredients_n: 2 + unknown_nutrients_tags: [] + update_key: ing20220322 + vitamins_prev_tags: [] + vitamins_tags: [] + status: 1 + status_verbose: product found \ No newline at end of file diff --git a/docs/api/ref/requestBodies/crop_a_photo.yaml b/docs/api/ref/requestBodies/crop_a_photo.yaml index 41f78ae4ae306..2ab18bb70e95a 100644 --- a/docs/api/ref/requestBodies/crop_a_photo.yaml +++ b/docs/api/ref/requestBodies/crop_a_photo.yaml @@ -4,30 +4,31 @@ description: | The origin of the cropping coordinates is the top-left corner. Note that rotation is applied *before* cropping, so the cropping bounding box is relative to the rotated image. +required: + - id + - code + - imgid properties: code: type: string description: Barcode of the product. example: "04963406" - required: true imgid: type: integer description: identifier of the image to select, it should be a number example: 2 - required: true id: type: string description: | identifier of the selected image field, should be in the format `{IMAGE_TYPE}_{LANG}` format, where `IMAGE_TYPE` is one of - `front|ingredients|nutrition|packaging` and `LANG` is the 2 letter + `front|ingredients|nutrition|packaging|other` and `LANG` is the 2 letter language code. Note that if you select an image for the main language of the product (ex: `ingredients_it` if `it` is the main language), this image will be displayed on Product Opener for all languages (ex: on `https://fr.openfoodfacts.org`, unless `ingredients_fr` exists). example: front_en - required: true x1: type: integer example: 0 diff --git a/docs/api/ref/responses/get_product_by_barcode.yaml b/docs/api/ref/responses/get_product_by_barcode.yaml index 2fc26d79dd2dd..38fb28b36568e 100644 --- a/docs/api/ref/responses/get_product_by_barcode.yaml +++ b/docs/api/ref/responses/get_product_by_barcode.yaml @@ -8,1115 +8,4 @@ allOf: product: type: object allOf: - - $ref: ../schemas/product.yaml -x-examples: - example-1: - code: '3017620422003' - product: - _id: '3017620422003' - _keywords: - - et - - pate - - cacao - - produit - - ferrero - - gluten - - petit-dejeuner - - san - - au - - aux - - sucre - - nutella - abbreviated_product_name: Nutella t.400 - abbreviated_product_name_fr: Nutella t.400 - abbreviated_product_name_fr_imported: Nutella t.400 - added_countries_tags: [] - additives_n: 1 - additives_original_tags: - - 'en:e322' - additives_prev_original_tags: - - 'en:e322' - additives_tags: - - 'en:e322' - allergens: 'en:milk,en:nuts,en:soybeans' - allergens_from_ingredients: 'en:nuts, hazelnuts' - allergens_from_user: '(fr) en:milk,en:nuts,en:soybeans' - allergens_hierarchy: - - 'en:milk' - - 'en:nuts' - - 'en:soybeans' - allergens_imported: 'Lait, Fruits Ă  coque, Soja' - allergens_lc: fr - allergens_tags: - - 'en:milk' - - 'en:nuts' - - 'en:soybeans' - amino_acids_prev_tags: [] - amino_acids_tags: [] - brands: Ferrero - brands_imported: Nutella - brands_tags: - - ferrero - carbon_footprint_percent_of_known_ingredients: 13 - categories: 'Produits Ă  tartiner,Petit-dĂ©jeuners,Produits Ă  tartiner sucrĂ©s,PĂątes Ă  tartiner,PĂątes Ă  tartiner aux noisettes,PĂątes Ă  tartiner aux noisettes et au cacao' - categories_hierarchy: - - 'en:breakfasts' - - 'en:spreads' - - 'en:sweet-spreads' - - 'en:hazelnut-spreads' - - 'en:chocolate-spreads' - - 'en:cocoa-and-hazelnuts-spreads' - categories_lc: fr - categories_properties: - 'agribalyse_food_code:en': '31032' - 'agribalyse_proxy_food_code:en': '31032' - 'ciqual_food_code:en': '31032' - categories_properties_tags: - - all-products - - categories-known - - agribalyse-food-code-31032 - - agribalyse-food-code-known - - agribalyse-proxy-food-code-31032 - - agribalyse-proxy-food-code-known - - ciqual-food-code-31032 - - ciqual-food-code-known - - agribalyse-known - - agribalyse-31032 - categories_tags: - - 'en:breakfasts' - - 'en:spreads' - - 'en:sweet-spreads' - - 'fr:pates-a-tartiner' - - 'en:hazelnut-spreads' - - 'en:chocolate-spreads' - - 'en:cocoa-and-hazelnuts-spreads' - category_properties: - 'ciqual_food_name:en': Chocolate spread with hazelnuts - checked: 'on' - checkers_tags: - - moon-rabbit - ciqual_food_name_tags: - - chocolate-spread-with-hazelnuts - cities_tags: [] - code: '3017620422003' - codes_tags: - - code-13 - - 3017620422xxx - - 301762042xxxx - - 30176204xxxxx - - 3017620xxxxxx - - 301762xxxxxxx - - 30176xxxxxxxx - - 3017xxxxxxxxx - - 301xxxxxxxxxx - - 30xxxxxxxxxxx - - 3xxxxxxxxxxxx - compared_to_category: 'en:cocoa-and-hazelnuts-spreads' - complete: 0 - completeness: 0.875 - conservation_conditions: A conserver au sec et Ă  l'abri de la chaleur. Ne pas mettre au rĂ©frigĂ©rateur. - conservation_conditions_fr: A conserver au sec et Ă  l'abri de la chaleur. Ne pas mettre au rĂ©frigĂ©rateur. - conservation_conditions_fr_imported: A conserver au sec et Ă  l'abri de la chaleur. Ne pas mettre au rĂ©frigĂ©rateur. - correctors_tags: - - user1 - - user2 - - user3 - - user4 - countries: 'en:Algeria Austria Belgium Canada France Germany Italy Luxembourg Mexico Morocco Netherlands Portugal Senegal Spain Switzerland Tunisia United Kingdom United States' - countries_beforescanbot: 'Belgium,France' - countries_hierarchy: - - 'en:Algeria Austria Belgium Canada France Germany Italy Luxembourg Mexico Morocco Netherlands Portugal Senegal Spain Switzerland Tunisia United Kingdom United States' - countries_imported: France - countries_lc: fr - countries_tags: - - 'en:algeria-austria-belgium-canada-france-germany-italy-luxembourg-mexico-morocco-netherlands-portugal-senegal-spain-switzerland-tunisia-united-kingdom-united-states' - created_t: 1457680652 - creator: openfoodfacts-contributors - customer_service: 'FERRERO FRANCE COMMERCIALE - Service Consommateurs, CS 90058 - 76136 MONT SAINT AIGNAN Cedex' - customer_service_fr: 'FERRERO FRANCE COMMERCIALE - Service Consommateurs, CS 90058 - 76136 MONT SAINT AIGNAN Cedex' - customer_service_fr_imported: 'FERRERO FRANCE COMMERCIALE - Service Consommateurs, CS 90058 - 76136 MONT SAINT AIGNAN Cedex' - data_quality_bugs_tags: [] - data_quality_errors_tags: [] - data_quality_info_tags: - - 'en:packaging-data-incomplete' - - 'en:ingredients-percent-analysis-ok' - - 'en:ecoscore-extended-data-computed' - - 'en:ecoscore-extended-data-less-precise-than-agribalyse' - - 'en:food-groups-1-known' - - 'en:food-groups-2-known' - - 'en:food-groups-3-unknown' - data_quality_tags: - - 'en:packaging-data-incomplete' - - 'en:ingredients-percent-analysis-ok' - - 'en:ecoscore-extended-data-computed' - - 'en:ecoscore-extended-data-less-precise-than-agribalyse' - - 'en:food-groups-1-known' - - 'en:food-groups-2-known' - - 'en:food-groups-3-unknown' - - 'en:ecoscore-origins-of-ingredients-origins-are-100-percent-unknown' - - 'en:ecoscore-packaging-unspecified-shape' - - 'en:ecoscore-production-system-no-label' - data_quality_warnings_tags: - - 'en:ecoscore-origins-of-ingredients-origins-are-100-percent-unknown' - - 'en:ecoscore-packaging-unspecified-shape' - - 'en:ecoscore-production-system-no-label' - data_sources: 'Database - FoodRepo / openfood.ch, Databases, Producer - Ferrero, Producers, App - yuka, Apps, Producer - ferrero-france-commerciale, Database - Equadis, Database - GDSN, App - InFood, App - Open Food Facts, App - halal-healthy, App - smoothie-openfoodfacts' - data_sources_imported: 'Database - Equadis, Database - GDSN, Databases, Producers, Producer - ferrero-france-commerciale, Producers, Producer - ferrero-france-commerciale' - data_sources_tags: - - database-foodrepo-openfood-ch - - databases - - producer-ferrero - - producers - - app-yuka - - apps - - producer-ferrero-france-commerciale - - database-equadis - - database-gdsn - - app-infood - - app-open-food-facts - - app-halal-healthy - - app-smoothie-openfoodfacts - ecoscore_data: - adjustments: - origins_of_ingredients: - aggregated_origins: - - origin: 'en:unknown' - percent: 100 - epi_score: 0 - epi_value: -5 - origins_from_origins_field: - - 'en:unknown' - transportation_scores: - fr: 0 - 'no': 0 - uk: 0 - us: 0 - world: 0 - transportation_values: - fr: 0 - 'no': 0 - uk: 0 - us: 0 - world: 0 - values: - fr: -5 - 'no': -5 - uk: -5 - us: -5 - world: -5 - warning: origins_are_100_percent_unknown - packaging: - non_recyclable_and_non_biodegradable_materials: 0 - packagings: - - ecoscore_material_score: 81 - ecoscore_shape_ratio: 1 - material: 'en:clear-glass' - shape: 'en:unknown' - score: 81 - value: -2 - warning: unspecified_shape - production_system: - labels: [] - value: 0 - warning: no_label - threatened_species: - ingredient: 'en:palm-oil' - value: -10 - agribalyse: - agribalyse_food_code: '31032' - co2_agriculture: 8.7770996 - co2_consumption: 0 - co2_distribution: 0.014104999 - co2_packaging: 0.18864842 - co2_processing: 0.69167973 - co2_total: 9.8742343 - co2_transportation: 0.19708507 - code: '31032' - dqr: '2.54' - ef_agriculture: 0.61477708 - ef_consumption: 0 - ef_distribution: 0.0045906531 - ef_packaging: 0.020453714 - ef_processing: 0.085674643 - ef_total: 0.74366703 - ef_transportation: 0.017824104 - is_beverage: 0 - name_en: Chocolate spread with hazelnuts - name_fr: PĂąte Ă  tartiner chocolat et noisette - score: 40 - grade: d - grades: - fr: d - 'no': d - uk: d - us: d - world: d - missing: - labels: 1 - origins: 1 - packagings: 1 - missing_data_warning: 1 - score: 23 - scores: - fr: 23 - 'no': 23 - uk: 23 - us: 23 - world: 23 - status: known - ecoscore_extended_data: - impact: - ef_single_score_log_stddev: 0.0539895633164057 - likeliest_impacts: - Climate_change: 0.172717449218484 - EF_single_score: 0.023255035815491 - likeliest_recipe: - 'en:emulsifier': 0.388589430098073 - 'en:hazelnut_oil': 12.806852015349 - 'en:palm_oil': 16.6103749736231 - 'en:sugar': 52.9709312507153 - 'en:water': 4.90093151221936 - 'fr:Cacao_Maigre_7': 3.94056985087663 - 'fr:Lait__cr_m__En_Poudre_8': 6.8959972390341 - mass_ratio_uncharacterized: 0.11 - uncharacterized_ingredients: - impact: - - 'fr:Lait ÉcrĂ©mĂ© En Poudre 8' - - 'fr:Cacao Maigre 7' - nutrition: - - 'fr:Lait ÉcrĂ©mĂ© En Poudre 8' - - 'fr:Cacao Maigre 7' - uncharacterized_ingredients_mass_proportion: - impact: 0.11 - nutrition: 0.11 - uncharacterized_ingredients_ratio: - impact: 0.333333333333333 - nutrition: 0.333333333333333 - warnings: - - 'The product has a high number of nutrition uncharacterized ingredients: 33%' - - 'The product has a high number of impact uncharacterized ingredients: 33%' - - 'The estimated mass of nutrition uncharacterized ingredients in the product is high: 11%' - - 'The estimated mass of impact uncharacterized ingredients in the product is high: 11%' - ecoscore_extended_data_version: '4' - ecoscore_grade: d - ecoscore_score: 23 - ecoscore_tags: - - d - editors_tags: - - user1 - - user2 - - user3 - - user4 - emb_codes: '' - emb_codes_20141016: '' - emb_codes_orig: '' - emb_codes_tags: [] - entry_dates_tags: - - '2016-03-11' - - 2016-03 - - '2016' - environment_impact_level: '' - environment_impact_level_tags: [] - expiration_date: 09/2021 - food_groups: 'en:sweets' - food_groups_tags: - - 'en:sugary-snacks' - - 'en:sweets' - fruits-vegetables-nuts_100g_estimate: 0 - generic_name: '' - generic_name_ar: نوŰȘÙ„Ű§ - generic_name_de: Nuss-Nougat-Creme - generic_name_en: '' - generic_name_es: Crema de Avellanas con cacao - generic_name_fr: PĂąte Ă  tartiner aux noisettes - generic_name_fr_imported: PĂąte Ă  tartiner aux noisettes - generic_name_id: '' - generic_name_it: Nutella - generic_name_nl: '' - grades: {} - id: '3017620422003' - image_front_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' - image_front_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' - image_front_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' - image_nutrition_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.200.jpg' - image_nutrition_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.100.jpg' - image_nutrition_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.400.jpg' - image_small_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' - image_thumb_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' - image_url: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' - images: - '1': - sizes: - '100': - h: 100 - w: 56 - '400': - h: 400 - w: 225 - full: - h: 2000 - w: 1125 - uploaded_t: '1457680652' - uploader: openfoodfacts-contributors - '2': - sizes: - '100': - h: 100 - w: 75 - '400': - h: 400 - w: 300 - full: - h: 3264 - w: 2448 - uploaded_t: '1462829284' - uploader: openfoodfacts-contributors - '3': - sizes: - '100': - h: 100 - w: 56 - '400': - h: 400 - w: 225 - full: - h: 2000 - w: 1125 - uploaded_t: '1468510986' - uploader: user3 - front_en: - angle: '0' - coordinates_image_size: full - geometry: 0x0-0-0 - imgid: '1' - normalize: 'false' - rev: '399' - sizes: - '100': - h: 100 - w: 77 - '200': - h: 200 - w: 155 - '400': - h: 400 - w: 310 - full: - h: 1808 - w: 1400 - white_magic: 'false' - x1: '0' - x2: '0' - y1: '0' - y2: '0' - front_fr: - angle: 0 - coordinates_image_size: '400' - geometry: 0x0--5--5 - imgid: '2' - normalize: 'false' - rev: '415' - sizes: - '100': - h: 100 - w: 77 - '200': - h: 200 - w: 155 - '400': - h: 400 - w: 310 - full: - h: 1808 - w: 1400 - white_magic: 'false' - x1: '-1' - x2: '-1' - y1: '-1' - y2: '-1' - ingredients_fr: - angle: null - coordinates_image_size: '400' - geometry: 0x0-0-0 - imgid: '3' - normalize: null - rev: '299' - sizes: - '100': - h: 16 - w: 100 - '200': - h: 33 - w: 200 - '400': - h: 65 - w: 400 - full: - h: 334 - w: 2046 - white_magic: null - x1: null - x2: null - y1: null - y2: null - nutrition_en: - angle: '0' - coordinates_image_size: full - geometry: 0x0-0-0 - imgid: '3' - normalize: 'false' - rev: '400' - sizes: - '100': - h: 100 - w: 96 - '200': - h: 200 - w: 192 - '400': - h: 400 - w: 383 - full: - h: 572 - w: 548 - white_magic: 'false' - x1: '0' - x2: '0' - y1: '0' - y2: '0' - packaging_fr: - angle: 0 - coordinates_image_size: full - geometry: 0x0--1--1 - imgid: '3' - normalize: null - rev: '420' - sizes: - '100': - h: 31 - w: 100 - '200': - h: 61 - w: 200 - '400': - h: 122 - w: 400 - full: - h: 638 - w: 2084 - white_magic: null - x1: '-1' - x2: '-1' - y1: '-1' - y2: '-1' - informers_tags: - - user1 - - user2 - - user3 - - user4 - ingredients: - - id: 'en:sugar' - percent_estimate: 46.5 - percent_max: 63 - percent_min: 30 - text: sugar - vegan: 'yes' - vegetarian: 'yes' - - from_palm_oil: 'yes' - id: 'en:palm-oil' - percent_estimate: 25.5 - percent_max: 38 - percent_min: 13 - text: palm oil - vegan: 'yes' - vegetarian: 'yes' - - id: 'en:hazelnut' - percent: 13 - percent_estimate: 13 - percent_max: 13 - percent_min: 13 - text: hazelnuts - vegan: 'yes' - vegetarian: 'yes' - - id: 'en:skim-milk-powder-8' - percent: 7 - percent_estimate: 7 - percent_max: 7 - percent_min: 7 - text: skim milk powder 8 - - id: 'en:lean-cocoa-7' - percent: 4 - percent_estimate: 4 - percent_max: 4 - percent_min: 4 - text: lean cocoa 7 - - id: 'en:emulsifier' - ingredients: - - id: 'en:soya-lecithin' - percent_estimate: 2 - percent_max: 4 - percent_min: 0 - text: soy lecithins - vegan: 'yes' - vegetarian: 'yes' - percent_estimate: 2 - percent_max: 4 - percent_min: 0 - text: emulsifiers - - id: 'en:vanillin' - percent_estimate: 2 - percent_max: 4 - percent_min: 0 - text: vanillin - ingredients_analysis: - 'en:palm-oil': - - 'en:palm-oil' - 'en:vegan-status-unknown': - - 'en:skim-milk-powder-8' - - 'en:lean-cocoa-7' - - 'en:vanillin' - 'en:vegetarian-status-unknown': - - 'en:skim-milk-powder-8' - - 'en:lean-cocoa-7' - - 'en:vanillin' - ingredients_analysis_tags: - - 'en:palm-oil' - - 'en:vegan-status-unknown' - - 'en:vegetarian-status-unknown' - ingredients_from_or_that_may_be_from_palm_oil_n: 0 - ingredients_from_palm_oil_n: 0 - ingredients_from_palm_oil_tags: [] - ingredients_hierarchy: - - 'en:sugar' - - 'en:added-sugar' - - 'en:disaccharide' - - 'en:palm-oil' - - 'en:oil-and-fat' - - 'en:vegetable-oil-and-fat' - - 'en:palm-oil-and-fat' - - 'en:hazelnut' - - 'en:nut' - - 'en:tree-nut' - - 'en:skim-milk-powder-8' - - 'en:lean-cocoa-7' - - 'en:emulsifier' - - 'en:vanillin' - - 'en:soya-lecithin' - - 'en:e322' - - 'en:e322i' - ingredients_n: 8 - ingredients_n_tags: - - '8' - - 1-10 - ingredients_original_tags: - - 'en:sugar' - - 'en:palm-oil' - - 'en:hazelnut' - - 'en:skim-milk-powder-8' - - 'en:lean-cocoa-7' - - 'en:emulsifier' - - 'en:vanillin' - - 'en:soya-lecithin' - ingredients_percent_analysis: 1 - ingredients_tags: - - 'en:sugar' - - 'en:added-sugar' - - 'en:disaccharide' - - 'en:palm-oil' - - 'en:oil-and-fat' - - 'en:vegetable-oil-and-fat' - - 'en:palm-oil-and-fat' - - 'en:hazelnut' - - 'en:nut' - - 'en:tree-nut' - - 'en:skim-milk-powder-8' - - 'en:lean-cocoa-7' - - 'en:emulsifier' - - 'en:vanillin' - - 'en:soya-lecithin' - - 'en:e322' - - 'en:e322i' - ingredients_text: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' - ingredients_text_en: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' - ingredients_text_fr: 'Sucre, huile de palme, _NOISETTES_ 13%, _LAIT_ Ă©crĂ©mĂ© en poudre 8,7%, cacao maigre 7,4%, Ă©mulsifiants: lĂ©cithine [SOJA]; vanilline. Sans gluten' - ingredients_text_with_allergens: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' - ingredients_text_with_allergens_en: 'sugar, palm oil, hazelnuts 13%, skim milk powder 8, 7%, lean cocoa 7, 4%, emulsifiers: soy lecithins, vanillin' - ingredients_text_with_allergens_fr: 'Sucre, huile de palme, NOISETTES 13%, LAIT Ă©crĂ©mĂ© en poudre 8,7%, cacao maigre 7,4%, Ă©mulsifiants: lĂ©cithine [SOJA]; vanilline. Sans gluten' - ingredients_that_may_be_from_palm_oil_n: 0 - ingredients_that_may_be_from_palm_oil_tags: [] - ingredients_with_specified_percent_n: 3 - ingredients_with_specified_percent_sum: 24 - ingredients_with_unspecified_percent_n: 4 - ingredients_with_unspecified_percent_sum: 76 - interface_version_created: '20120622' - interface_version_modified: 20150316.jqm2 - known_ingredients_n: 15 - labels: 'Sans gluten,en:nonorganic' - labels_hierarchy: - - 'en:no-gluten' - - 'en:nonorganic' - labels_lc: fr - labels_tags: - - 'en:no-gluten' - - 'en:nonorganic' - lang: en - lang_imported: fr - languages: - 'en:arabic': 2 - 'en:english': 4 - 'en:french': 10 - 'en:german': 3 - 'en:italian': 3 - 'en:spanish': 7 - languages_codes: - en: 4 - fr: 10 - languages_hierarchy: - - 'en:english' - - 'en:french' - languages_tags: - - 'en:english' - - 'en:french' - - 'en:multilingual' - last_check_dates_tags: - - '2021-07-21' - - 2021-07 - - '2021' - last_checked_t: 1626872806 - last_checker: user3 - last_edit_dates_tags: - - '2022-07-29' - - 2022-07 - - '2022' - last_editor: user4 - last_image_dates_tags: - - '2022-07-29' - - 2022-07 - - '2022' - last_image_t: 1659084293 - last_modified_by: user4 - last_modified_t: 1659084329 - lc: en - lc_imported: fr - link: '' - main_countries_tags: [] - manufacturing_places: '' - manufacturing_places_tags: [] - max_imgid: '121' - minerals_prev_tags: [] - minerals_tags: [] - misc_tags: - - 'en:nutrition-no-fiber' - - 'en:nutrition-fruits-vegetables-nuts-estimate-from-ingredients' - - 'en:nutrition-no-fiber-or-fruits-vegetables-nuts' - - 'en:nutriscore-computed' - - 'en:ecoscore-extended-data-computed' - - 'en:ecoscore-extended-data-version-4' - - 'en:ecoscore-missing-data-warning' - - 'en:ecoscore-missing-data-labels' - - 'en:ecoscore-missing-data-origins' - - 'en:ecoscore-missing-data-packagings' - - 'en:ecoscore-computed' - no_nutrition_data: 'null' - no_nutrition_data_imported: 'false' - nova_group: 4 - nova_groups: '4' - nova_groups_markers: - '3': - - - ingredients - - 'en:sugar' - '4': - - - additives - - 'en:e322' - - - ingredients - - 'en:emulsifier' - nova_groups_tags: - - 'en:4-ultra-processed-food-and-drink-products' - nucleotides_prev_tags: [] - nucleotides_tags: [] - nutrient_levels: - fat: high - salt: low - saturated-fat: high - sugars: high - nutrient_levels_tags: - - 'en:fat-in-high-quantity' - - 'en:saturated-fat-in-high-quantity' - - 'en:sugars-in-high-quantity' - - 'en:salt-in-low-quantity' - nutriments: - alcohol: 0 - alcohol_100g: 0 - alcohol_serving: 0 - alcohol_unit: '% vol' - alcohol_value: 0 - carbohydrates: 57.5 - carbohydrates_100g: 57.5 - carbohydrates_serving: 8.62 - carbohydrates_unit: g - carbohydrates_value: 57.5 - carbon-footprint-from-known-ingredients_product: 135 - carbon-footprint-from-known-ingredients_serving: 5.07 - energy: 2252 - energy-kcal: 539 - energy-kcal_100g: 539 - energy-kcal_serving: 80.8 - energy-kcal_unit: kcal - energy-kcal_value: 539 - energy-kj: 2252 - energy-kj_100g: 2252 - energy-kj_serving: 338 - energy-kj_unit: kJ - energy-kj_value: 2252 - energy_100g: 2252 - energy_serving: 338 - energy_unit: kJ - energy_value: 2252 - fat: 30.9 - fat_100g: 30.9 - fat_serving: 4.63 - fat_unit: g - fat_value: 30.9 - fruits-vegetables-nuts-estimate-from-ingredients_100g: 13 - fruits-vegetables-nuts-estimate-from-ingredients_serving: 13 - nova-group: 4 - nova-group_100g: 4 - nova-group_serving: 4 - nutrition-score-fr: 26 - nutrition-score-fr_100g: 26 - proteins: 6.3 - proteins_100g: 6.3 - proteins_serving: 0.945 - proteins_unit: g - proteins_value: 6.3 - salt: 0.107 - salt_100g: 0.107 - salt_serving: 0.016 - salt_unit: g - salt_value: 0.107 - saturated-fat: 10.6 - saturated-fat_100g: 10.6 - saturated-fat_serving: 1.59 - saturated-fat_unit: g - saturated-fat_value: 10.6 - sodium: 0.0428 - sodium_100g: 0.0428 - sodium_serving: 0.00642 - sodium_unit: g - sodium_value: 0.0428 - sugars: 56.3 - sugars_100g: 56.3 - sugars_serving: 8.44 - sugars_unit: g - sugars_value: 56.3 - nutriscore_data: - energy: 2252 - energy_points: 6 - energy_value: 2252 - fiber: 0 - fiber_points: 0 - fiber_value: 0 - fruits_vegetables_nuts_colza_walnut_olive_oils: 13 - fruits_vegetables_nuts_colza_walnut_olive_oils_points: 0 - fruits_vegetables_nuts_colza_walnut_olive_oils_value: 13 - grade: e - is_beverage: 0 - is_cheese: 0 - is_fat: 0 - is_water: 0 - negative_points: 26 - positive_points: 0 - proteins: 6.3 - proteins_points: 3 - proteins_value: 6.3 - saturated_fat: 10.6 - saturated_fat_points: 10 - saturated_fat_ratio: 34.3042071197411 - saturated_fat_ratio_points: 5 - saturated_fat_ratio_value: 34.3 - saturated_fat_value: 10.6 - score: 26 - sodium: 42.8 - sodium_points: 0 - sodium_value: 42.8 - sugars: 56.3 - sugars_points: 10 - sugars_value: 56.3 - nutriscore_grade: e - nutriscore_score: 26 - nutriscore_score_opposite: -26 - nutrition_data: 'on' - nutrition_data_per: 100g - nutrition_data_per_imported: 100g - nutrition_data_prepared: '' - nutrition_data_prepared_per: 100g - nutrition_grade_fr: e - nutrition_grades: e - nutrition_grades_tags: - - e - nutrition_score_beverage: 0 - nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients: 1 - nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients_value: 13 - nutrition_score_warning_no_fiber: 1 - obsolete: '' - obsolete_imported: '0' - obsolete_since_date: '' - origin: '' - origin_ar: '' - origin_de: '' - origin_en: '' - origin_es: '' - origin_fr: '' - origin_it: '' - origins: '' - origins_hierarchy: [] - origins_lc: fr - origins_tags: [] - other_nutritional_substances_tags: [] - owner: org-ferrero-france-commerciale - owner_fields: - abbreviated_product_name_fr: 1657859437 - allergens: 1657859437 - brands: 1657859437 - carbohydrates: 1657859437 - conservation_conditions_fr: 1657859437 - countries: 1657859437 - customer_service_fr: 1657859437 - data_sources: 1657859437 - energy: 1611293436 - energy-kcal: 1657859437 - energy-kj: 1657859437 - fat: 1657859437 - generic_name_fr: 1657859437 - ingredients_text_fr: 1657859437 - lang: 1657859437 - lc: 1657859437 - no_nutrition_data: 1657859437 - nutrition_data_per: 1657859437 - obsolete: 1657859437 - owner: 1657859437 - packaging: 1657859437 - producer_version_id: 1657859437 - product_name_fr: 1657859437 - proteins: 1657859437 - quantity: 1657859437 - salt: 1657859437 - saturated-fat: 1657859437 - serving_size: 1657859437 - sugars: 1657859437 - owner_imported: org-ferrero-france-commerciale - owners_tags: org-ferrero-france-commerciale - packaging: PP 5 Ummi PLASTIQUE / PLASTIEK PAP 27 WWW PAPIER / PAPIER CIPAP 82 PANNEAU DE FIBRE COMPOSITES/ COMPOSIET VEZELPLAAT GL 70 VERRE / GLAS - packaging_hierarchy: - - 'fr:PP 5 Ummi PLASTIQUE / PLASTIEK PAP 27 WWW PAPIER / PAPIER CIPAP 82 PANNEAU DE FIBRE COMPOSITES/ COMPOSIET VEZELPLAAT GL 70 VERRE / GLAS' - packaging_imported: bocal - packaging_lc: fr - packaging_tags: - - 'fr:pp-5-ummi-plastique-plastiek-pap-27-www-papier-papier-cipap-82-panneau-de-fibre-composites-composiet-vezelplaat-gl-70-verre-glas' - packaging_text: '' - packaging_text_ar: '' - packaging_text_de: '' - packaging_text_en: '' - packaging_text_es: 'Pot en verre, couvercle en plastique.' - packaging_text_fr: "1 couvercle plastique blanc opaque PP Ă  jeter,\r\n1 plaque en carton PAP 21 Ă  recycler,\r\n1 opercule en carton C/PAP 82 Ă  recycler,\r\n1 pot en verre Ă  recycler" - packaging_text_id: '' - packaging_text_it: '' - packaging_text_nl: '' - packagings: - - material: 'en:clear-glass' - photographers_tags: - - user1 - - user2 - - user3 - - user4 - pnns_groups_1: Sugary snacks - pnns_groups_1_tags: - - sugary-snacks - - known - pnns_groups_2: Sweets - pnns_groups_2_tags: - - sweets - - known - popularity_key: 20999992556 - popularity_tags: - - top-10-scans-2021 - - top-50-scans-2021 - - top-100-scans-2021 - - top-500-scans-2021 - - top-1000-scans-2021 - - top-5000-scans-2021 - - top-10000-scans-2021 - - top-50000-scans-2021 - - top-100000-scans-2021 - - top-10-fr-scans-2021 - - top-50-fr-scans-2021 - - top-100-fr-scans-2021 - - top-500-fr-scans-2021 - - top-1000-fr-scans-2021 - - top-5000-fr-scans-2021 - - top-10000-fr-scans-2021 - - top-50000-fr-scans-2021 - - top-100000-fr-scans-2021 - - top-country-fr-scans-2021 - - at-least-5-fr-scans-2021 - - at-least-10-fr-scans-2021 - producer_version_id: '2014' - producer_version_id_imported: '2014' - product_name: Nutella - product_name_ar: نوŰȘÙŠÙ„Ű§ - product_name_de: Nutella - product_name_en: Nutella - product_name_es: Nutella - product_name_fr: PĂąte Ă  tartiner Nutella noisettes et cacao - 400g - product_name_fr_imported: PĂąte Ă  tartiner Nutella noisettes et cacao - 400g - product_name_id: '' - product_name_it: Nutella - product_name_nl: '' - product_quantity: '400' - purchase_places: F - 77480 Mousseaux les Bray France - purchase_places_tags: - - f-77480-mousseaux-les-bray-france - quantity: 400g - quantity_imported: 400 g - removed_countries_tags: [] - rev: 421 - scans_n: 3713 - scores: {} - selected_images: - front: - display: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.400.jpg' - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.400.jpg' - small: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.200.jpg' - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.200.jpg' - thumb: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.399.100.jpg' - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/front_fr.415.100.jpg' - ingredients: - display: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.400.jpg' - small: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.200.jpg' - thumb: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/ingredients_fr.299.100.jpg' - nutrition: - display: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.400.jpg' - small: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.200.jpg' - thumb: - en: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/nutrition_en.400.100.jpg' - packaging: - display: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.400.jpg' - small: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.200.jpg' - thumb: - fr: 'https://images.openfoodfacts.org/images/products/301/762/042/2003/packaging_fr.420.100.jpg' - serving_quantity: '15' - serving_size: 15g - serving_size_imported: 15 g (15) - sortkey: 1610877517 - sources: - - fields: - - product_name_de - - product_name_it - - brands - - countries - id: openfood-ch - images: [] - import_t: 1548767279 - manufacturer: '0' - name: FoodRepo - source_licence: Creative Commons Attribution 4.0 International License - source_licence_url: 'https://creativecommons.org/licenses/by/4.0/' - url: 'https://www.foodrepo.org/ch/products/19413' - - fields: - - packaging - - ingredients_text_fr - id: ferrero - images: [] - import_t: 1552318840 - manufacturer: '1' - name: Ferrero - url: 'https://www.ferrero.fr' - sources_fields: - org-gs1: - gln: '3010176200101' - gpcCategoryCode: '10000187' - gpcCategoryName: PĂątes Ă  Tartiner SucrĂ©es (Longue Conservation) - isAllergenRelevantDataProvided: 'true' - lastChangeDateTime: '2022-07-13T16:01:41+02:00' - partyName: FERRERO FRANCE COMMERCIALE - productionVariantDescription: '2014' - publicationDateTime: '2022-07-13T16:01:41+02:00' - states: 'en:to-be-completed, en:nutrition-facts-completed, en:ingredients-completed, en:expiration-date-completed, en:packaging-code-to-be-completed, en:characteristics-to-be-completed, en:origins-to-be-completed, en:categories-completed, en:brands-completed, en:packaging-completed, en:quantity-completed, en:product-name-completed, en:photos-to-be-validated, en:packaging-photo-to-be-selected, en:nutrition-photo-selected, en:ingredients-photo-to-be-selected, en:front-photo-selected, en:photos-uploaded' - states_hierarchy: - - 'en:to-be-completed' - - 'en:nutrition-facts-completed' - - 'en:ingredients-completed' - - 'en:expiration-date-completed' - - 'en:packaging-code-to-be-completed' - - 'en:characteristics-to-be-completed' - - 'en:origins-to-be-completed' - - 'en:categories-completed' - - 'en:brands-completed' - - 'en:packaging-completed' - - 'en:quantity-completed' - - 'en:product-name-completed' - - 'en:photos-to-be-validated' - - 'en:packaging-photo-to-be-selected' - - 'en:nutrition-photo-selected' - - 'en:ingredients-photo-to-be-selected' - - 'en:front-photo-selected' - - 'en:photos-uploaded' - states_tags: - - 'en:to-be-completed' - - 'en:nutrition-facts-completed' - - 'en:ingredients-completed' - - 'en:expiration-date-completed' - - 'en:packaging-code-to-be-completed' - - 'en:characteristics-to-be-completed' - - 'en:origins-to-be-completed' - - 'en:categories-completed' - - 'en:brands-completed' - - 'en:packaging-completed' - - 'en:quantity-completed' - - 'en:product-name-completed' - - 'en:photos-to-be-validated' - - 'en:packaging-photo-to-be-selected' - - 'en:nutrition-photo-selected' - - 'en:ingredients-photo-to-be-selected' - - 'en:front-photo-selected' - - 'en:photos-uploaded' - stores: 'Bi1 Magasins U Carrefour Franprix Auchan Casino IntermarchĂ©,carrefour.fr' - stores_tags: - - bi1-magasins-u-carrefour-franprix-auchan-casino-intermarche - - carrefour-fr - teams: 'pain-au-chocolat,shark-attack,stakano,chocolatine,la-robe-est-bleue,vegan,m,b,c,vegancheck' - teams_tags: - - pain-au-chocolat - - shark-attack - - stakano - - chocolatine - - la-robe-est-bleue - - vegan - - m - - b - - c - - vegancheck - traces: '' - traces_from_ingredients: '' - traces_from_user: '(fr) ' - traces_hierarchy: [] - traces_lc: fr - traces_tags: [] - unique_scans_n: 2544 - unknown_ingredients_n: 2 - unknown_nutrients_tags: [] - update_key: ing20220322 - vitamins_prev_tags: [] - vitamins_tags: [] - status: 1 - status_verbose: product found + - $ref: ../schemas/product.yaml \ No newline at end of file diff --git a/docs/api/ref/responses/search_for_products.yaml b/docs/api/ref/responses/search_for_products.yaml index f286f52aead84..3fea4cf0d615a 100644 --- a/docs/api/ref/responses/search_for_products.yaml +++ b/docs/api/ref/responses/search_for_products.yaml @@ -2,18 +2,28 @@ type: object properties: count: type: integer + description: | + Total number of products found example: 2701 page: type: integer + description: | + Page number of returned results example: 1 page_count: type: integer + description: | + Total number of pages example: 24 page_size: type: integer + description: | + Number of products per pages example: 24 products: type: array + description: | + The products matching the query corresponding to current page items: $ref: ../schemas/product.yaml skip: diff --git a/docs/api/ref/schemas/image.yaml b/docs/api/ref/schemas/image.yaml index 613005d9326cd..ecf222b5790bd 100644 --- a/docs/api/ref/schemas/image.yaml +++ b/docs/api/ref/schemas/image.yaml @@ -1,30 +1,36 @@ type: object +description: | + This object represent an image that was uploaded to a product. + "imgid" is an integer which is a sequential number unique to each picture. properties: sizes: type: object + description: | + The available image sizes for the product (both reduced and full). + The reduced images are the ones with numbers as the key( 100, 200 etc) + while the full images have `full` as the key. properties: - '100': - type: object - properties: - h: - type: integer - w: - type: integer - '400': - type: object - properties: - h: - type: integer - w: - type: integer full: - type: object - properties: - h: - type: integer - w: - type: integer + description: | + properties of fullsize image + **TODO** explain how to compute name + $ref: ./image_size.yaml + patternProperties: + '(?100|400)': + description: | + properties of thumbnail of size `image_size`. + **TODO** explain how to compute name + + For real type: see description of property `full`. + (Put this way because of a [bug in rapidoc](https://github.com/rapi-doc/RapiDoc/issues/880)) + type: string uploaded_t: type: string + example: '1457680652' + description: | + The time the image was uploaded (as unix timestamp). uploader: - type: string \ No newline at end of file + type: string + example: openfoodfacts-contributors + description: | + The contributor that uploaded the image. diff --git a/docs/api/ref/schemas/images/selected_image.yaml b/docs/api/ref/schemas/image_role.yaml similarity index 81% rename from docs/api/ref/schemas/images/selected_image.yaml rename to docs/api/ref/schemas/image_role.yaml index 5fbca7f90e35a..b2177788089b6 100644 --- a/docs/api/ref/schemas/images/selected_image.yaml +++ b/docs/api/ref/schemas/image_role.yaml @@ -1,4 +1,6 @@ type: object +description: | + property of an image (or part thereof) selected for a particular role and a particular language. properties: angle: type: integer @@ -9,7 +11,7 @@ properties: example: full geometry: type: string - example: 0x0--1--1 + example: "0x0--1--1" imgid: type: string example: '121' @@ -29,13 +31,13 @@ properties: while the full images have `full` as the key. properties: '100': - $ref: ./properties/image_size.yaml + $ref: ./image_size.yaml '200': - $ref: ./properties/image_size.yaml + $ref: ./image_size.yaml '400': - $ref: ./properties/image_size.yaml + $ref: ./image_size.yaml full: - $ref: ./properties/image_size.yaml + $ref: ./image_size.yaml white_magic: type: 'null' example: null diff --git a/docs/api/ref/schemas/images/properties/image_size.yaml b/docs/api/ref/schemas/image_size.yaml similarity index 100% rename from docs/api/ref/schemas/images/properties/image_size.yaml rename to docs/api/ref/schemas/image_size.yaml diff --git a/docs/api/ref/schemas/image_urls.yaml b/docs/api/ref/schemas/image_urls.yaml new file mode 100644 index 0000000000000..10d56a6afa968 --- /dev/null +++ b/docs/api/ref/schemas/image_urls.yaml @@ -0,0 +1,5 @@ +type: object +patternProperties: + '(?\w\w)': + type: string + description: url of the image for language `language_code` \ No newline at end of file diff --git a/docs/api/ref/schemas/images/image.yaml b/docs/api/ref/schemas/images/image.yaml deleted file mode 100644 index 38655698a1c39..0000000000000 --- a/docs/api/ref/schemas/images/image.yaml +++ /dev/null @@ -1,26 +0,0 @@ -type: object -description: '' -properties: - sizes: - type: object - description: | - The available image sizes for the product (both reduced and full). - The reduced images are the ones with numbers as the key( 100, 200 etc) - while the full images have `full` as the key. - properties: - '100': - $ref: ./properties/image_size.yaml - '400': - $ref: ./properties/image_size.yaml - full: - $ref: ./properties/image_size.yaml - uploaded_t: - type: string - example: '1457680652' - description: | - The time the image was uploaded. - uploader: - type: string - example: openfoodfacts-contributors - description: | - The contributor that uploaded the image. diff --git a/docs/api/ref/schemas/ingredient.yaml b/docs/api/ref/schemas/ingredient.yaml index 4b812f2c71c52..f50e562d3681d 100644 --- a/docs/api/ref/schemas/ingredient.yaml +++ b/docs/api/ref/schemas/ingredient.yaml @@ -1,20 +1,24 @@ type: array +description: | + This structure gives the different ingredients and some information about them, + like estimate on their quantity. items: type: object properties: id: type: string ingredients: - $ref: ./ingredient.yaml + description: | + Sub ingredients composing this ingredients. + # self recursive + $ref: "#/" percent: type: integer percent_estimate: type: - - integer - number percent_max: type: - - integer - number percent_min: type: integer diff --git a/docs/api/ref/schemas/product.yaml b/docs/api/ref/schemas/product.yaml index 3dc9c71d8b26f..4b9a3a859d4c8 100644 --- a/docs/api/ref/schemas/product.yaml +++ b/docs/api/ref/schemas/product.yaml @@ -1,2043 +1,29 @@ type: object -properties: - _id: - type: string - _keywords: - type: array - items: - type: string - abbreviated_product_name: - type: string - abbreviated_product_name_fr: - type: string - abbreviated_product_name_fr_imported: - type: string - added_countries_tags: - type: array - items: - type: object - additives_n: - type: integer - description: | - Number of food additives. - additives_original_tags: - type: array - items: - type: string - additives_prev_original_tags: - type: array - items: - type: string - additives_tags: - type: array - items: - type: string - allergens: - type: string - allergens_from_ingredients: - type: string - allergens_from_user: - type: string - allergens_hierarchy: - type: array - items: - type: string - allergens_imported: - type: string - allergens_lc: - type: string - allergens_tags: - type: array - items: - type: string - amino_acids_prev_tags: - type: array - items: - type: object - amino_acids_tags: - type: array - items: - type: object - brands: - type: string - brands_imported: - type: string - brands_tags: - type: array - items: - type: string - carbon_footprint_percent_of_known_ingredients: - type: integer - categories: - type: string - categories_hierarchy: - type: array - items: - type: string - categories_lc: - type: string - categories_properties: - type: object - properties: - "agribalyse_food_code:en": - type: string - "agribalyse_proxy_food_code:en": - type: string - "ciqual_food_code:en": - type: string - categories_properties_tags: - type: array - items: - type: string - categories_tags: - type: array - items: - type: string - category_properties: - type: object - properties: - "ciqual_food_name:en": - type: string - checked: - type: string - checkers_tags: - type: array - items: - type: string - ciqual_food_name_tags: - type: array - items: - type: string - cities_tags: - type: array - items: - type: object - code: - type: string - codes_tags: - type: array - items: - type: string - compared_to_category: - type: string - complete: - type: integer - completeness: - type: number - conservation_conditions: - type: string - conservation_conditions_fr: - type: string - conservation_conditions_fr_imported: - type: string - correctors_tags: - type: array - items: - type: string - countries: - type: string - description: | - List of countries where the product is sold. - countries_beforescanbot: - type: string - countries_hierarchy: - type: array - items: - type: string - countries_imported: - type: string - countries_lc: - type: string - countries_tags: - type: array - items: - type: string - created_t: - type: integer - description: | - Date when the product was added (UNIX timestamp format). - creator: - type: string - description: | - The contributor who added the product first. - customer_service: - type: string - description: | - Contact info of customer service. - customer_service_fr: - type: string - customer_service_fr_imported: - type: string - data_quality_bugs_tags: - type: array - items: - type: object - data_quality_errors_tags: - type: array - items: - type: object - data_quality_info_tags: - type: array - items: - type: string - data_quality_tags: - type: array - items: - type: string - data_quality_warnings_tags: - type: array - items: - type: string - data_sources: - type: string - description: | - Source of data imported from producers. - data_sources_imported: - type: string - data_sources_tags: - type: array - items: - type: string - ecoscore_data: - type: object - properties: - adjustments: - type: object - properties: - origins_of_ingredients: - type: object - properties: - aggregated_origins: - type: array - items: - type: object - properties: - origin: - type: string - percent: - type: integer - epi_score: - type: integer - epi_value: - type: integer - origins_from_origins_field: - type: array - items: - type: string - transportation_scores: - type: object - properties: - ad: - type: integer - al: - type: integer - at: - type: integer - ax: - type: integer - ba: - type: integer - be: - type: integer - bg: - type: integer - ch: - type: integer - cy: - type: integer - cz: - type: integer - de: - type: integer - dk: - type: integer - dz: - type: integer - ee: - type: integer - eg: - type: integer - es: - type: integer - fi: - type: integer - fo: - type: integer - fr: - type: integer - gg: - type: integer - gi: - type: integer - gr: - type: integer - hr: - type: integer - hu: - type: integer - ie: - type: integer - il: - type: integer - im: - type: integer - is: - type: integer - it: - type: integer - je: - type: integer - lb: - type: integer - li: - type: integer - lt: - type: integer - lu: - type: integer - lv: - type: integer - ly: - type: integer - ma: - type: integer - mc: - type: integer - md: - type: integer - me: - type: integer - mk: - type: integer - mt: - type: integer - nl: - type: integer - "no": - type: integer - pl: - type: integer - ps: - type: integer - pt: - type: integer - ro: - type: integer - rs: - type: integer - se: - type: integer - si: - type: integer - sj: - type: integer - sk: - type: integer - sm: - type: integer - sy: - type: integer - tn: - type: integer - tr: - type: integer - ua: - type: integer - uk: - type: integer - us: - type: integer - va: - type: integer - world: - type: integer - xk: - type: integer - transportation_values: - type: object - properties: - ad: - type: integer - al: - type: integer - at: - type: integer - ax: - type: integer - ba: - type: integer - be: - type: integer - bg: - type: integer - ch: - type: integer - cy: - type: integer - cz: - type: integer - de: - type: integer - dk: - type: integer - dz: - type: integer - ee: - type: integer - eg: - type: integer - es: - type: integer - fi: - type: integer - fo: - type: integer - fr: - type: integer - gg: - type: integer - gi: - type: integer - gr: - type: integer - hr: - type: integer - hu: - type: integer - ie: - type: integer - il: - type: integer - im: - type: integer - is: - type: integer - it: - type: integer - je: - type: integer - lb: - type: integer - li: - type: integer - lt: - type: integer - lu: - type: integer - lv: - type: integer - ly: - type: integer - ma: - type: integer - mc: - type: integer - md: - type: integer - me: - type: integer - mk: - type: integer - mt: - type: integer - nl: - type: integer - "no": - type: integer - pl: - type: integer - ps: - type: integer - pt: - type: integer - ro: - type: integer - rs: - type: integer - se: - type: integer - si: - type: integer - sj: - type: integer - sk: - type: integer - sm: - type: integer - sy: - type: integer - tn: - type: integer - tr: - type: integer - ua: - type: integer - uk: - type: integer - us: - type: integer - va: - type: integer - world: - type: integer - xk: - type: integer - values: - type: object - properties: - ad: - type: integer - al: - type: integer - at: - type: integer - ax: - type: integer - ba: - type: integer - be: - type: integer - bg: - type: integer - ch: - type: integer - cy: - type: integer - cz: - type: integer - de: - type: integer - dk: - type: integer - dz: - type: integer - ee: - type: integer - eg: - type: integer - es: - type: integer - fi: - type: integer - fo: - type: integer - fr: - type: integer - gg: - type: integer - gi: - type: integer - gr: - type: integer - hr: - type: integer - hu: - type: integer - ie: - type: integer - il: - type: integer - im: - type: integer - is: - type: integer - it: - type: integer - je: - type: integer - lb: - type: integer - li: - type: integer - lt: - type: integer - lu: - type: integer - lv: - type: integer - ly: - type: integer - ma: - type: integer - mc: - type: integer - md: - type: integer - me: - type: integer - mk: - type: integer - mt: - type: integer - nl: - type: integer - "no": - type: integer - pl: - type: integer - ps: - type: integer - pt: - type: integer - ro: - type: integer - rs: - type: integer - se: - type: integer - si: - type: integer - sj: - type: integer - sk: - type: integer - sm: - type: integer - sy: - type: integer - tn: - type: integer - tr: - type: integer - ua: - type: integer - uk: - type: integer - us: - type: integer - va: - type: integer - world: - type: integer - xk: - type: integer - warning: - type: string - packaging: - type: object - properties: - non_recyclable_and_non_biodegradable_materials: - type: integer - packagings: - type: array - items: - type: object - properties: - ecoscore_material_score: - type: integer - ecoscore_shape_ratio: - type: integer - material: - type: string - shape: - type: string - score: - type: integer - value: - type: integer - warning: - type: string - production_system: - type: object - properties: - labels: - type: array - example: "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: - $ref: "./agribalyse.yaml" - grade: - type: string - grades: - type: object - properties: - ad: - type: string - al: - type: string - at: - type: string - ax: - type: string - ba: - type: string - be: - type: string - bg: - type: string - ch: - type: string - cy: - type: string - cz: - type: string - de: - type: string - dk: - type: string - dz: - type: string - ee: - type: string - eg: - type: string - es: - type: string - fi: - type: string - fo: - type: string - fr: - type: string - gg: - type: string - gi: - type: string - gr: - type: string - hr: - type: string - hu: - type: string - ie: - type: string - il: - type: string - im: - type: string - is: - type: string - it: - type: string - je: - type: string - lb: - type: string - li: - type: string - lt: - type: string - lu: - type: string - lv: - type: string - ly: - type: string - ma: - type: string - mc: - type: string - md: - type: string - me: - type: string - mk: - type: string - mt: - type: string - nl: - type: string - "no": - type: string - pl: - type: string - ps: - type: string - pt: - type: string - ro: - type: string - rs: - type: string - se: - type: string - si: - type: string - sj: - type: string - sk: - type: string - sm: - type: string - sy: - type: string - tn: - type: string - tr: - type: string - ua: - type: string - uk: - type: string - us: - type: string - va: - type: string - world: - type: string - xk: - type: string - missing: - type: object - properties: - labels: - type: integer - origins: - type: integer - packagings: - type: integer +description: | + This is all the fields describing a product and how to display it on a page. - missing_data_warning: - type: integer + Refer to the different sub schema for more readable entries: - previous_data: - type: object - properties: - grade: - type: string - score: - type: integer - agribalyse: - $ref: "./agribalyse.yaml" - score: - type: integer - scores: - type: object - properties: - ad: - type: integer - al: - type: integer - at: - type: integer - ax: - type: integer - ba: - type: integer - be: - type: integer - bg: - type: integer - ch: - type: integer - cy: - type: integer - cz: - type: integer - de: - type: integer - dk: - type: integer - dz: - type: integer - ee: - type: integer - eg: - type: integer - es: - type: integer - fi: - type: integer - fo: - type: integer - fr: - type: integer - gg: - type: integer - gi: - type: integer - gr: - type: integer - hr: - type: integer - hu: - type: integer - ie: - type: integer - il: - type: integer - im: - type: integer - is: - type: integer - it: - type: integer - je: - type: integer - lb: - type: integer - li: - type: integer - lt: - type: integer - lu: - type: integer - lv: - type: integer - ly: - type: integer - ma: - type: integer - mc: - type: integer - md: - type: integer - me: - type: integer - mk: - type: integer - mt: - type: integer - nl: - type: integer - "no": - type: integer - pl: - type: integer - ps: - type: integer - pt: - type: integer - ro: - type: integer - rs: - type: integer - se: - type: integer - si: - type: integer - sj: - type: integer - sk: - type: integer - sm: - type: integer - sy: - type: integer - tn: - type: integer - tr: - type: integer - ua: - type: integer - uk: - type: integer - us: - type: integer - va: - type: integer - world: - type: integer - xk: - type: integer - status: - type: string - ecoscore_extended_data_version: - type: string - ecoscore_grade: - type: string - ecoscore_score: - type: integer - ecoscore_tags: - type: array - items: - type: string - editors_tags: - type: array - items: - type: string - emb_codes: - type: string - description: | - Packager code. - example: EMB 2013330 - emb_codes_orig: - type: string - emb_codes_tags: - type: array - items: - type: object - entry_dates_tags: - type: array - items: - type: string - environment_impact_level: - type: string - environment_impact_level_tags: - type: array - items: - type: object - expiration_date: - type: string - food_groups: - type: string - food_groups_tags: - type: array - items: - type: string - fruits-vegetables-nuts_100g_estimate: - type: integer - generic_name: - type: string - description: | - Legal name of the product as regulated - by the European authorities. - generic_name_en: - type: string - description: | - This can be returned in many other languages - like generic_name_fr (for french). - grades: - type: object - id: - type: string - image_front_small_url: - type: string - image_front_thumb_url: - type: string - image_front_url: - type: string - image_nutrition_small_url: - type: string - image_nutrition_thumb_url: - type: string - image_nutrition_url: - type: string - image_small_url: - type: string - image_thumb_url: - type: string - image_url: - type: string - images: - type: object - properties: - "1": - $ref: ./image.yaml - informers_tags: - type: array - items: - type: string - ingredients: - $ref: ./ingredient.yaml - ingredients_analysis: - type: object - properties: - "en:palm-oil": - type: array - items: - type: string - "en:vegan-status-unknown": - type: array - items: - type: string - "en:vegetarian-status-unknown": - type: array - items: - type: string - ingredients_analysis_tags: - type: array - items: - type: string - ingredients_from_or_that_may_be_from_palm_oil_n: - type: integer - ingredients_from_palm_oil_n: - type: integer - ingredients_from_palm_oil_tags: - type: array - items: - type: object - ingredients_hierarchy: - type: array - items: - type: string - ingredients_n: - type: integer - ingredients_n_tags: - type: array - items: - type: string - ingredients_original_tags: - type: array - items: - type: string - ingredients_percent_analysis: - type: integer - ingredients_tags: - type: array - items: - type: string - ingredients_text: - type: string - description: | - Raw list of ingredients. This will get automatically - parsed and get used to compute the Eco-Score. You can - either request it (if it exists) or send it in a specific language. - example: ingredients_text_en - ingredients_text_ar: - type: string - ingredients_text_de: - type: string - ingredients_text_en: - type: string - ingredients_text_en_ocr_1642445989: - type: string - ingredients_text_en_ocr_1642445989_result: - type: string - ingredients_text_en_ocr_1643128902: - type: string - ingredients_text_en_ocr_1643128902_result: - type: string - ingredients_text_es: - type: string - ingredients_text_fr: - type: string - ingredients_text_fr_imported: - type: string - ingredients_text_fr_ocr_1642445989: - type: string - ingredients_text_fr_ocr_1642445989_result: - type: string - ingredients_text_fr_ocr_1643128902: - type: string - ingredients_text_fr_ocr_1643128902_result: - type: string - ingredients_text_id: - type: string - ingredients_text_it: - type: string - ingredients_text_nl: - type: string - ingredients_text_with_allergens: - type: string - ingredients_text_with_allergens_ar: - type: string - ingredients_text_with_allergens_de: - type: string - ingredients_text_with_allergens_en: - type: string - ingredients_text_with_allergens_es: - type: string - ingredients_text_with_allergens_fr: - type: string - ingredients_text_with_allergens_it: - type: string - ingredients_that_may_be_from_palm_oil_n: - type: integer - ingredients_that_may_be_from_palm_oil_tags: - type: array - items: - type: object - ingredients_with_specified_percent_n: - type: integer - ingredients_with_specified_percent_sum: - type: integer - ingredients_with_unspecified_percent_n: - type: integer - ingredients_with_unspecified_percent_sum: - type: integer - interface_version_created: - type: string - interface_version_modified: - type: string - knowledge_panels: - $ref: ./knowledge_panels/panels.yaml - known_ingredients_n: - type: integer - labels: - type: string - labels_hierarchy: - type: array - items: - type: string - labels_lc: - type: string - labels_tags: - type: array - items: - type: string - lang: - type: string - lang_imported: - type: string - languages: - type: object - properties: - "en:arabic": - type: integer - "en:english": - type: integer - "en:french": - type: integer - "en:german": - type: integer - "en:italian": - type: integer - "en:spanish": - type: integer - languages_codes: - type: object - properties: - ar: - type: integer - de: - type: integer - en: - type: integer - es: - type: integer - fr: - type: integer - it: - type: integer - languages_hierarchy: - type: array - items: - type: string - languages_tags: - type: array - items: - type: string - last_check_dates_tags: - type: array - items: - type: string - last_checked_t: - type: integer - last_checker: - type: string - last_edit_dates_tags: - type: array - items: - type: string - last_editor: - type: string - last_image_dates_tags: - type: array - items: - type: string - last_image_t: - type: integer - last_modified_by: - type: string - description: | - The username of the user who last modified the product. - example: sebleouf - last_modified_t: - type: integer - description: | - Date when the product page was last modified. - lc: - type: string - lc_imported: - type: string - link: - type: string - main_countries_tags: - type: array - items: - type: object - manufacturing_places: - type: string - description: | - Places where the product was manufactured or transformed. - manufacturing_places_tags: - type: array - items: - type: object - max_imgid: - type: string - minerals_prev_tags: - type: array - items: - type: object - minerals_tags: - type: array - items: - type: object - misc_tags: - type: array - items: - type: string - no_nutrition_data: - type: string - description: | - When a product does not have nutrition data displayed on the - packaging, the user can check the field "Nutrition facts are - not specified on the product". - By doing so, the no_nutrition_data field takes the value "on". - This case is frequent (thousands of products). - example: "on" - no_nutrition_data_imported: - type: string - nova_group: - type: integer - nova_groups: - type: string - nova_groups_markers: - type: object - properties: - "3": - type: array - items: - type: string - "4": - type: array - items: - type: string - nova_groups_tags: - type: array - items: - type: string - nucleotides_prev_tags: - type: array - items: - type: object - nucleotides_tags: - type: array - items: - type: object - nutrient_levels: - type: object - properties: - fat: - type: string - salt: - type: string - saturated-fat: - type: string - sugars: - type: string - nutrient_levels_tags: - type: array - items: - type: string - nutriments: - type: object - properties: - alcohol: - type: integer - alcohol_100g: - type: integer - alcohol_serving: - type: integer - alcohol_unit: - type: string - alcohol_value: - type: integer - carbohydrates: - type: number - carbohydrates_100g: - type: number - carbohydrates_serving: - type: number - carbohydrates_unit: - type: string - carbohydrates_value: - type: number - carbon-footprint-from-known-ingredients_product: - type: integer - carbon-footprint-from-known-ingredients_serving: - type: number - energy: - type: integer - energy-kcal: - type: integer - energy-kcal_100g: - type: integer - energy-kcal_serving: - type: number - energy-kcal_unit: - type: string - description: | - The unit used in the field energy-kcal_unit - (example in JSON: “energy_unit”: “kcal”). - The only possible value is “kcal.”' - energy-kcal_value: - type: integer - description: | - The standardized value of a serving of 100g - (or 100ml for liquids) for energy expressed in kcal. - example: 190 - energy-kj: - type: integer - energy-kj_100g: - type: integer - energy-kj_serving: - type: integer - energy-kj_unit: - type: string - energy-kj_value: - type: integer - energy_100g: - type: integer - energy_serving: - type: integer - energy_unit: - type: string - description: | - The unit used in the energy_value field - (example in JSON: “energy_unit”: “kJ”). - Possible values are “kJ” or “kcal”.' - energy_value: - type: integer - description: | - The standardized value of a serving of 100g - (or 100ml for liquids) for energy expressed in - the unit specified in the field energy_unit. - example: 190 - erythritol: - type: integer - description: | - erythritol is a polyol which is not providing any energy. - As such, it needs not be taken into account when computing - the energy of a product. Eryhtritol is now displayed on - nutrition facts sheet of some products, mainly in the USA. - This value is entered either by contributors, either by - imports. - example: 4 - erythritol_100g: - type: number - description: | - erythritol is a polyol which is not providing any energy. - As such, it needs not be taken into account when computing - the energy of a product. Eryhtritol is now displayed on - nutrition facts sheet of some products, mainly in the USA. - This value per 100g is computed from erythritol, erythritol_unit, - and serving_size. - example: 12.5 - erythritol_serving: - type: number - erythritol_unit: - type: string - example: "g" - erythritol_value: - type: number - fat: - type: number - fat_100g: - type: number - fat_serving: - type: number - fat_unit: - type: string - fat_value: - type: number - fruits-vegetables-nuts-estimate-from-ingredients_100g: - type: integer - fruits-vegetables-nuts-estimate-from-ingredients_serving: - type: integer - nova-group: - type: integer - nova-group_100g: - type: integer - nova-group_serving: - type: integer - nutrition-score-fr: - type: integer - nutrition-score-fr_100g: - type: integer - description: | - Experimental nutrition score derived from - the UK FSA score and adapted for the French market - (formula defined by the team of Professor Hercberg). - proteins: - type: number - proteins_100g: - type: number - proteins_serving: - type: number - proteins_unit: - type: string - proteins_value: - type: number - salt: - type: number - salt_100g: - type: number - salt_serving: - type: number - salt_unit: - type: string - salt_value: - type: number - saturated-fat: - type: number - saturated-fat_100g: - type: number - saturated-fat_serving: - type: number - saturated-fat_unit: - type: string - saturated-fat_value: - type: number - sodium: - type: number - sodium_100g: - type: number - sodium_serving: - type: number - sodium_unit: - type: string - sodium_value: - type: number - sugars: - type: number - sugars_100g: - type: number - sugars_serving: - type: number - sugars_unit: - type: string - sugars_value: - type: number - nutriscore_data: - type: object - properties: - energy: - type: integer - energy_points: - type: integer - energy_value: - type: integer - fiber: - type: integer - fiber_points: - type: integer - fiber_value: - type: integer - fruits_vegetables_nuts_colza_walnut_olive_oils: - type: integer - fruits_vegetables_nuts_colza_walnut_olive_oils_points: - type: integer - fruits_vegetables_nuts_colza_walnut_olive_oils_value: - type: integer - grade: - type: string - is_beverage: - type: integer - is_cheese: - type: integer - is_fat: - type: integer - is_water: - type: integer - negative_points: - type: integer - positive_points: - type: integer - proteins: - type: number - proteins_points: - type: integer - proteins_value: - type: number - saturated_fat: - type: number - saturated_fat_points: - type: integer - saturated_fat_ratio: - type: number - saturated_fat_ratio_points: - type: integer - saturated_fat_ratio_value: - type: number - saturated_fat_value: - type: number - score: - type: integer - sodium: - type: number - sodium_points: - type: integer - sodium_value: - type: number - sugars: - type: number - sugars_points: - type: integer - sugars_value: - type: number - nutriscore_grade: - type: string - nutriscore_score: - type: integer - nutriscore_score_opposite: - type: integer - nutrition_data: - type: string - nutrition_data_per: - type: string - nutrition_data_per_imported: - type: string - nutrition_data_prepared: - type: string - nutrition_data_prepared_per: - type: string - nutrition_grade_fr: - type: string - description: | - Nutrition grade (‘a’ to ‘e’), - https://world.openfoodfacts.org/nutriscore. - nutrition_grades: - type: string - nutrition_grades_tags: - type: array - items: - type: string - nutrition_score_beverage: - type: integer - nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients: - type: integer - ? nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients_value - : type: integer - nutrition_score_warning_no_fiber: - type: integer - obsolete: - type: string - obsolete_imported: - type: string - obsolete_since_date: - type: string - origin: - type: string - origin_en: - type: string - description: | - This can be returned in many other languages - like origin_fr (for french). - origins: - type: string - description: | - Origins of ingredients - origins_hierarchy: - type: array - items: - type: object - origins_lc: - type: string - origins_tags: - type: array - items: - type: object - other_nutritional_substances_tags: - type: array - items: - type: object - owner: - type: string - owner_fields: - type: object - properties: - abbreviated_product_name_fr: - type: integer - allergens: - type: integer - brands: - type: integer - carbohydrates: - type: integer - conservation_conditions_fr: - type: integer - countries: - type: integer - customer_service_fr: - type: integer - data_sources: - type: integer - energy: - type: integer - energy-kcal: - type: integer - energy-kj: - type: integer - fat: - type: integer - generic_name_fr: - type: integer - ingredients_text_fr: - type: integer - lang: - type: integer - lc: - type: integer - no_nutrition_data: - type: integer - nutrition_data_per: - type: integer - obsolete: - type: integer - owner: - type: integer - packaging: - type: string - description: | - shape, material. - example: Cardboard - producer_version_id: - type: integer - product_name_fr: - type: integer - proteins: - type: integer - quantity: - type: integer - salt: - type: integer - saturated-fat: - type: integer - serving_size: - type: integer - sugars: - type: integer - owner_imported: - type: string - owners_tags: - type: string - packaging: - type: string - packaging_hierarchy: - type: array - items: - type: string - packaging_imported: - type: string - packaging_lc: - type: string - packaging_tags: - type: array - items: - type: string - packaging_text: - type: string - description: | - Recycling instructions as raw text, e.g. Plastic - bottle to recycle, Plastic cap to recycle. - This will get automatically parsed and - will be used to compute the Eco-Score. - You can either request it (if it exists) or - send it in a specific language. - example: packaging_text_en - packaging_text_en: - type: string - description: | - This can be returned in many other languages - like packaging_text_fr (for french). - packagings: - $ref: ./packagings/packagings.yaml - packagings_complete: - $ref: ./packagings/packagings_complete.yaml - photographers_tags: - type: array - items: - type: string - pnns_groups_1: - type: string - pnns_groups_1_tags: - type: array - items: - type: string - pnns_groups_2: - type: string - pnns_groups_2_tags: - type: array - items: - type: string - popularity_key: - type: integer - popularity_tags: - type: array - items: - type: string - producer_version_id: - type: string - producer_version_id_imported: - type: string - product_name: - type: string - description: | - The name of the product - product_name_en: - type: string - description: | - The name of the product can also - be in many other languages like - product_name_fr (for french). - product_quantity: - type: string - purchase_places: - type: string - description: | - Country, state, or city where the product can be purchased. - example: Paris - purchase_places_tags: - type: array - items: - type: string - quantity: - type: string - description: | - Quantity and Unit. - quantity_imported: - type: string - removed_countries_tags: - type: array - items: - type: object - rev: - type: integer - scans_n: - type: integer - scores: - type: object - selected_images: - type: object - properties: - front: - type: object - properties: - display: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - it: - type: string - small: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - it: - type: string - thumb: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - it: - type: string - ingredients: - type: object - properties: - display: - type: object - properties: - es: - type: string - fr: - type: string - small: - type: object - properties: - es: - type: string - fr: - type: string - thumb: - type: object - properties: - es: - type: string - fr: - type: string - nutrition: - type: object - properties: - display: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - small: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - thumb: - type: object - properties: - en: - type: string - es: - type: string - fr: - type: string - packaging: - type: object - properties: - display: - type: object - properties: - fr: - type: string - small: - type: object - properties: - fr: - type: string - thumb: - type: object - properties: - fr: - type: string - serving_quantity: - type: string - serving_size: - type: string - description: | - Serving size in g (or ml). - serving_size_imported: - type: string - sortkey: - type: integer - sources: - type: array - items: - type: object - properties: - fields: - type: array - items: - type: string - id: - type: string - images: - type: array - items: - type: object - import_t: - type: integer - manufacturer: - type: - - integer - - string - name: - type: string - source_licence: - type: string - source_licence_url: - type: string - url: - type: - - "null" - - string - sources_fields: - type: object - properties: - org-gs1: - type: object - properties: - gln: - type: string - gpcCategoryCode: - type: string - gpcCategoryName: - type: string - isAllergenRelevantDataProvided: - type: string - lastChangeDateTime: - type: string - partyName: - type: string - productionVariantDescription: - type: string - publicationDateTime: - type: string - states: - type: string - states_hierarchy: - type: array - items: - type: string - states_tags: - type: array - items: - type: string - stores: - type: string - description: | - Distributor name. - example: Walmart - stores_tags: - type: array - items: - type: string - teams: - type: string - teams_tags: - type: array - items: - type: string - traces: - type: string - description: | - List of substances that might cause allergies - that are present in trace amounts in the product - (this does not include the ingredients, as they - are not only present in trace amounts). - It is taxonomized with the allergens taxonomy. - traces_from_ingredients: - type: string - traces_from_user: - type: string - traces_hierarchy: - type: array - items: - type: object - traces_lc: - type: string - traces_tags: - type: array - items: - type: object - unique_scans_n: - type: integer - unknown_ingredients_n: - type: integer - unknown_nutrients_tags: - type: array - items: - type: object - update_key: - type: string - vitamins_prev_tags: - type: array - items: - type: object - vitamins_tags: - type: array - items: - type: object + * [Product Base](#cmp--schemas-product-base): Base fields of a product + * [Product Misc](#cmp--schemas-product-misc): Miscellaneous but important fields of a product + * [Product Tags](#cmp--schemas-product-tags): Tags fields on a product + * [Product Nutrition](#cmp--schemas-product-nutrition): Nutrition fields of a product + * [Product Ingredients](#cmp--schemas-product-ingredients): Fields about ingredients of a product + * [Product Images](#cmp--schemas-product-images): Information about Images of a product + * [Product Eco-Score](#cmp--schemas-product-images): Fields related to Eco-Score for a product + * [Product Metadata](#cmp--schemas-product-ecoscore): Metadata of a product (author, editors, etc.) + * [Product Data Quality](#cmp--schemas-product-quality): fields related to data quality for a product + * [Product Knowledge Panels](#cmp--schemas-product-knowledge-panels): Knowledge panels for a product + +allOf: + - $ref: './product_base.yaml' + - $ref: './product_misc.yaml' + - $ref: './product_tags.yaml' + - $ref: './product_images.yaml' + - $ref: './product_ecoscore.yaml' + - $ref: './product_ingredients.yaml' + - $ref: './product_nutrition.yaml' + - $ref: './product_quality.yaml' + - $ref: './product_extended.yaml' + - $ref: './product_meta.yaml' + - $ref: './product_knowledge_panels.yaml' diff --git a/docs/api/ref/schemas/product_base.yaml b/docs/api/ref/schemas/product_base.yaml new file mode 100644 index 0000000000000..3be26b56bbbd9 --- /dev/null +++ b/docs/api/ref/schemas/product_base.yaml @@ -0,0 +1,87 @@ +type: object +description: | + Base product data +properties: + abbreviated_product_name: + type: string + description: Abbreviated name in requested language + code: + type: string + description: | + barcode of the product (can be EAN-13 or internal codes for some food stores), + for products without a barcode, + Open Food Facts assigns a number starting with the 200 reserved prefix + codes_tags: + type: array + items: + type: string + description: | + A value which is the type of barcode "code-13" or "code-8" + and + A series of mask for the barcode + It helps retrieve barcodes starting by + example: + ["code-13","3017620422xxx","301762042xxxx","30176204xxxxx","3017620xxxxxx","301762xxxxxxx","30176xxxxxxxx","3017xxxxxxxxx","301xxxxxxxxxx","30xxxxxxxxxxx","3xxxxxxxxxxxx"] + generic_name: + type: string + description: | + Legal name of the product as regulated + by the European authorities. + id: + description: | + internal identifier for the product, usually set to the value of `code`, + except on the producers platform where it is prefixed by the owner + type: string + lc: + type: string + description: | + Main language of the product. + This is a duplicate of `lang` property (for historical reasons). + lang: + type: string + description: | + Main language of the product. + + This should be the main language of product packaging (if one is predominant). + + Main language is also used to decide which ingredients list to parse. + nova_group: + type: integer + description: + Nova group as an integer from 1 to 4. See https://world.openfoodfacts.org/nova + nova_groups: + type: string + obsolete: + type: string + obsolete_since_date: + description: | + A date at which the product was declared obsolete. + This means it's not produced any more. + type: string + product_name: + type: string + description: | + The name of the product + product_name_en: + type: string + description: | + The name of the product can also + be in many other languages like + product_name_fr (for french). + product_quantity: + type: string + quantity: + type: string + description: | + Quantity and Unit. + + +patternProperties: + abbreviated_product_name_(?\w\w): + type: string + description: Abbreviated name in language `language_code`. + 'generic_name_(?\w\w)': + type: string + description: | + This can be returned in many other languages + like generic_name_fr (for french). \ No newline at end of file diff --git a/docs/api/ref/schemas/product_ecoscore.yaml b/docs/api/ref/schemas/product_ecoscore.yaml new file mode 100644 index 0000000000000..a892add3f14e2 --- /dev/null +++ b/docs/api/ref/schemas/product_ecoscore.yaml @@ -0,0 +1,142 @@ +type: object +description: Fields related to Eco-Score for a product +properties: + ecoscore_data: + type: object + description: | + An object about a lot of details about data needed for nutriscore computation + and complementary data of interest. + properties: + adjustments: + type: object + properties: + origins_of_ingredients: + type: object + properties: + aggregated_origins: + type: array + items: + type: object + properties: + origin: + type: string + percent: + type: integer + epi_score: + type: integer + epi_value: + type: integer + origins_from_origins_field: + type: array + items: + type: string + transportation_scores: + type: object + patternProperties: + (?\w\w): + type: integer + transportation_values: + type: object + patternProperties: + (?\w\w): + type: integer + + values: + type: object + patternProperties: + (?\w\w): + type: integer + warning: + type: string + packaging: + type: object + properties: + non_recyclable_and_non_biodegradable_materials: + type: integer + packagings: + type: array + items: + type: object + properties: + ecoscore_material_score: + type: integer + ecoscore_shape_ratio: + type: integer + material: + type: string + shape: + type: string + score: + type: integer + value: + type: integer + warning: + type: string + production_system: + type: object + properties: + labels: + type: array + example: "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: + $ref: "./agribalyse.yaml" + grade: + type: string + grades: + type: object + patternProperties: + (?\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 + score: + type: integer + agribalyse: + $ref: "./agribalyse.yaml" + score: + type: integer + scores: + type: object + patternProperties: + (?\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 \ No newline at end of file diff --git a/docs/api/ref/schemas/product_extended.yaml b/docs/api/ref/schemas/product_extended.yaml new file mode 100644 index 0000000000000..23ece91efaea2 --- /dev/null +++ b/docs/api/ref/schemas/product_extended.yaml @@ -0,0 +1,162 @@ +type: object +properties: + additives_original_tags: + type: array + items: + type: string + additives_prev_original_tags: + type: array + items: + type: string + added_countries_tags: + type: array + items: + type: object + allergens_from_ingredients: + type: string + allergens_from_user: + type: string + + amino_acids_prev_tags: + type: array + items: + type: object + amino_acids_tags: + type: array + items: + type: object + carbon_footprint_percent_of_known_ingredients: + type: integer + categories_properties: + type: object + properties: + "agribalyse_food_code:en": + type: string + "agribalyse_proxy_food_code:en": + type: string + "ciqual_food_code:en": + type: string + categories_properties_tags: + type: array + items: + type: string + category_properties: + type: object + additionalProperties: + description: those are properties taken from the category taxonomy + type: string + ciqual_food_name_tags: + type: array + items: + type: string + compared_to_category: + type: string + description: | + the category to use for comparison. + + **TODO** explain how it is chosen. + conservation_conditions: + type: string + customer_service: + type: string + description: | + Contact info of customer service. + expiration_date: + type: string + + link: + type: string + description: | + link to the product on the website of the producer + + main_countries_tags: + type: array + items: + type: object + + minerals_prev_tags: + type: array + items: + type: object + minerals_tags: + type: array + items: + type: object + owner_fields: + type: object + description: | + Those are fields provided by the producer (through producers platform), + and the value he provided. + properties: + additionalProperties: + description: | + you can retrieve all kind of properties, the same as on the parent object (the product). + It's not processed entries (like tags for example) but raw ones. + type: + oneOf: + - integer + - string + - object + nova_groups_markers: + type: object + description: | + Detail of ingredients or processing that makes the products having Nova 3 or 4 + properties: + "3": + description: | + Markers of level 3 + type: array + items: + type: array + description: | + This array has two element for each marker. + One + items: + type: string + "4": + description: | + Markers of level 4 + type: array + items: + # same as above + $ref: "#/properties/nova_groups_markers/properties/3/items" + + nucleotides_tags: + type: array + items: + type: object + origin: + type: string + purchase_places: + type: string + description: | + Country, state, or city where the product can be purchased. + example: Paris + purchase_places_tags: + type: array + items: + type: string + stores: + type: string + description: | + Distributor name. + example: Walmart + stores_tags: + type: array + items: + type: string + traces_from_ingredients: + type: string + traces_from_user: + type: string + + +patternProperties: + 'conservation_conditions_(?\w\w)': + type: string + 'customer_service_(?\w\w)': + type: string + 'origin_(?\w\w)': + type: string + description: | + `origin` in language indicated by `language_code` diff --git a/docs/api/ref/schemas/product_hidden.yaml b/docs/api/ref/schemas/product_hidden.yaml new file mode 100644 index 0000000000000..ffd9c110b75e3 --- /dev/null +++ b/docs/api/ref/schemas/product_hidden.yaml @@ -0,0 +1,110 @@ +type: object +detail: | + Here are referenced fields that one may found in the database but + either have no real meaning or should not be considered part of the API + +properties: + allergens_imported: + type: string + brands_imported: + type: string + countries_imported: + type: string + data_sources_imported: + type: string + lang_imported: + type: string + lc_imported: + type: string + no_nutrition_data_imported: + type: string + nutrition_data_per_imported: + type: string + obsolete_imported: + type: string + owner_imported: + type: string + packaging_imported: + type: string + producer_version_id_imported: + type: string + quantity_imported: + type: string + serving_size_imported: + type: string + + + grades: + type: object + + countries_beforescanbot: + type: string + nucleotides_prev_tags: + type: array + items: + type: object + + nutrition_data: + type: string + nutrition_data_per: + type: string + nutrition_data_prepared: + type: string + nutrition_data_prepared_per: + type: string + + + _id: + type: string + description: id in database of the product, this normally is the barcode + _keywords: + type: array + items: + type: string + + max_imgid: + type: string + packaging: + type: string + packaging_hierarchy: + type: array + items: + type: string + packaging_lc: + type: string + packaging_tags: + type: array + items: + type: string + producer_version_id: + description: | + A version id internal to the producer. + We may grab those from PIM or GS1 platforms. + type: string + removed_countries_tags: + type: array + items: + type: object + sortkey: + type: integer + + vitamins_prev_tags: + type: array + items: + type: object + + scores: + type: object + +patternProperties: + 'abbreviated_product_name_(?\w\w)_imported': + type: string + 'conservation_conditions_(?\w\w)_imported': + type: string + 'customer_service_(?\w\w)_imported': + type: string + + 'ingredients_text_(?\w\w)_imported': + type: string + description: | + list of ingredients as imported by the producer in language_code \ No newline at end of file diff --git a/docs/api/ref/schemas/product_images.yaml b/docs/api/ref/schemas/product_images.yaml new file mode 100644 index 0000000000000..662a4d29ca279 --- /dev/null +++ b/docs/api/ref/schemas/product_images.yaml @@ -0,0 +1,88 @@ +type: object +description: | + Information about Images of a product. + + Images ensure the reliability of Open Food Facts data. + It provides a primary source and proof of all the structured data. + You may therefore want to display it along the structured information. +properties: + image_front_small_url: + type: string + image_front_thumb_url: + type: string + image_front_url: + type: string + image_nutrition_small_url: + type: string + image_nutrition_thumb_url: + type: string + image_nutrition_url: + type: string + image_small_url: + type: string + image_thumb_url: + type: string + image_url: + type: string + images: + description: | + This contains properties for all images contained on the product. + type: object + properties: + 1: + type: object + description: | + This represents an image uploaded for this product. + $ref: ./image.yaml + front: + description: + This represents an image (or part of it) selected for a specific role on this product. + type: object + $ref: ./image_role.yaml + patternProperties: + '(?\d+)': + description: | + See property `1` to get the real type of those objects + (Put this way because of a [bug in rapidoc](https://github.com/rapi-doc/RapiDoc/issues/880)) + type: string + '(?front|nutrition|ingredients|packaging|other)_(?\w\w)': + description: | + See property `front` to get the real type of those objects + (Put this way because of a [bug in rapidoc](https://github.com/rapi-doc/RapiDoc/issues/880)) + type: string + + last_image_dates_tags: + type: array + items: + type: string + last_image_t: + type: integer + + selected_images: + type: object + properties: + front: + type: object + description: URLs of thumbnails image of image of type `image_type` + properties: + display: + description: | + Thumbnail urls of product image (front) adapted to display on product page + type: object + $ref: 'image_urls.yaml' + small: + description: | + Thumbnail urls of product image (front) adapted to display on product list page + type: object + $ref: 'image_urls.yaml' + thumb: + description: | + Thumbnail urls of product image (front) in smallest format + type: object + $ref: 'image_urls.yaml' + patternProperties: + '(?front|packaging|ingredients|nutrition|other)': + description: | + See property `front` to get the real type of those objects + (Put this way because of a [bug in rapidoc](https://github.com/rapi-doc/RapiDoc/issues/880)) + type: string \ No newline at end of file diff --git a/docs/api/ref/schemas/product_ingredients.yaml b/docs/api/ref/schemas/product_ingredients.yaml new file mode 100644 index 0000000000000..b885d5a69e945 --- /dev/null +++ b/docs/api/ref/schemas/product_ingredients.yaml @@ -0,0 +1,152 @@ +type: object +description: Fields about ingredients of a product +properties: + + additives_tags: + type: array + items: + type: string + allergens: + type: string + description: comma separated list of allergens + allergens_lc: + type: string + description: language in which `allergens` where input + allergens_hierarchy: + type: array + items: + type: string + allergens_tags: + type: array + items: + type: string + + ingredients: + $ref: ./ingredient.yaml + ingredients_analysis: + type: object + properties: + "en:palm-oil": + type: array + items: + type: string + "en:vegan-status-unknown": + type: array + items: + type: string + "en:vegetarian-status-unknown": + type: array + items: + type: string + ingredients_analysis_tags: + type: array + items: + type: string + ingredients_from_or_that_may_be_from_palm_oil_n: + type: integer + ingredients_from_palm_oil_n: + type: integer + ingredients_from_palm_oil_tags: + type: array + items: + type: object + ingredients_hierarchy: + type: array + items: + type: string + ingredients_n: + type: integer + ingredients_n_tags: + type: array + items: + type: string + ingredients_original_tags: + type: array + items: + type: string + ingredients_percent_analysis: + type: integer + ingredients_tags: + type: array + items: + type: string + ingredients_text: + type: string + description: | + Raw list of ingredients. This will get automatically + parsed and get used to compute the Eco-Score or find allergens, etc.. + + It's a copy of ingredients_text in the main language of the product (see `lang` proprety). + + example: | + Farine de blĂ©* 67,4%, sucre de canne*, huile de tournesol olĂ©ique*, graines de chia* 5,2%, son de blĂ©*, oranges dĂ©shydratĂ©es * 0,9%, farine de riz*, poudres Ă  lever (acide citrique, carbonates de sodium), arĂŽme naturel d'orange. + ingredients_text_with_allergens: + type: string + description: | + Same text as `ingredients_text` but where allergens have HTML elements around them to identify them + example: | + Farine de blĂ©* 67,4%, sucre de canne*, huile de tournesol olĂ©ique*, graines de chia* 5,2%, son de blĂ©*, oranges dĂ©shydratĂ©es * 0,9%, farine de riz*, poudres Ă  lever (acide citrique, carbonates de sodium), arĂŽme naturel d'orange. + ingredients_that_may_be_from_palm_oil_n: + type: integer + ingredients_that_may_be_from_palm_oil_tags: + type: array + items: + type: object + ingredients_with_specified_percent_n: + type: integer + ingredients_with_specified_percent_sum: + type: integer + ingredients_with_unspecified_percent_n: + type: integer + ingredients_with_unspecified_percent_sum: + type: integer + known_ingredients_n: + type: integer + origins: + type: string + description: | + Origins of ingredients + origins_hierarchy: + type: array + items: + type: object + origins_lc: + type: string + origins_tags: + type: array + items: + type: object + traces: + type: string + description: | + List of substances that might cause allergies + that are present in trace amounts in the product + (this does not include the ingredients, as they + are not only present in trace amounts). + It is taxonomized with the allergens taxonomy. + traces_hierarchy: + type: array + items: + type: object + traces_lc: + type: string + traces_tags: + type: array + items: + type: object + unknown_ingredients_n: + type: integer + + +patternProperties: + 'ingredients_text_(?\w\w)': + type: string + description: | + Raw list of ingredients in language given by 'language_code'. + + See `ingredients_text` + 'ingredients_text_with_allergens_(?\w\w)': + description: | + Like `ingredients_text_with_allergens` for a particular language + type: string + diff --git a/docs/api/ref/schemas/product_knowledge_panels.yaml b/docs/api/ref/schemas/product_knowledge_panels.yaml new file mode 100644 index 0000000000000..92dafe8e896b5 --- /dev/null +++ b/docs/api/ref/schemas/product_knowledge_panels.yaml @@ -0,0 +1,6 @@ +type: object +description: | + Knowledge panels for a product +properties: + knowledge_panels: + $ref: ./knowledge_panels/panels.yaml diff --git a/docs/api/ref/schemas/product_meta.yaml b/docs/api/ref/schemas/product_meta.yaml new file mode 100644 index 0000000000000..0cc972c56272f --- /dev/null +++ b/docs/api/ref/schemas/product_meta.yaml @@ -0,0 +1,145 @@ +type: object +description: | + Metadata of a product (author, editors, creation date, etc.) + +properties: + created_t: + type: integer + description: | + Date when the product was added (UNIX timestamp format). + See also `entry_dates_tags` + example: + 1457680652 + creator: + type: string + description: | + The contributor who added the product first. + editors_tags: + description: | + List of editors who edited the product. + type: array + items: + type: string + + informers_tags: + type: array + items: + type: string + interface_version_created: + type: string + interface_version_modified: + type: string + languages: + type: object + patternProperties: + 'en:(?\w\w)': + type: integer + description: | + **TODO** explain ! + languages_codes: + type: object + patternProperties: + (?\w\w): + type: integer + description: | + Same as `languages` but by language code, instead of language tags + languages_hierarchy: + type: array + items: + type: string + languages_tags: + type: array + items: + type: string + last_edit_dates_tags: + type: array + items: + type: string + last_editor: + type: string + + last_modified_by: + type: string + description: | + The username of the user who last modified the product. + example: sebleouf + last_modified_t: + type: integer + description: | + Date when the product page was last modified. + owner: + description: | + Id of the producer in case he provides his own data about a product (producer platform). + type: string + owners_tags: + description: | + Tagyfied version of owner + type: string + photographers_tags: + type: array + items: + type: string + rev: + description: revision number of this product version (each edit adds a revision) + type: integer + sources: + type: array + items: + type: object + properties: + fields: + type: array + items: + type: string + id: + type: string + images: + type: array + items: + type: object + import_t: + type: integer + manufacturer: + type: + - integer + - string + name: + type: string + source_licence: + type: string + source_licence_url: + type: string + url: + type: + - "null" + - string + sources_fields: + type: object + properties: + org-gs1: + type: object + properties: + gln: + type: string + gpcCategoryCode: + type: string + gpcCategoryName: + type: string + isAllergenRelevantDataProvided: + type: string + lastChangeDateTime: + type: string + partyName: + type: string + productionVariantDescription: + type: string + publicationDateTime: + type: string + teams: + type: string + teams_tags: + type: array + items: + type: string + update_key: + type: string diff --git a/docs/api/ref/schemas/product_misc.yaml b/docs/api/ref/schemas/product_misc.yaml new file mode 100644 index 0000000000000..238ae40ce3bfb --- /dev/null +++ b/docs/api/ref/schemas/product_misc.yaml @@ -0,0 +1,106 @@ +type: object +description: | + Miscellaneous but important fields of a product +properties: + additives_n: + type: integer + description: | + Number of food additives. + checked: + type: string + complete: + type: integer + completeness: + type: number + ecoscore_grade: + type: string + description: | + See also: `ecoscore_tags` + ecoscore_score: + type: integer + description: | + See also: `ecoscore_tags` + food_groups: + type: string + food_groups_tags: + type: array + items: + type: string + nutrient_levels: + description: | + Traffic light indicators on main nutrients levels + type: object + properties: + fat: + type: string + enum: ["low", "moderate", "high"] + salt: + type: string + enum: ["low", "moderate", "high"] + saturated-fat: + type: string + enum: ["low", "moderate", "high"] + sugars: + type: string. + enum: ["low", "moderate", "high"] + packaging_text: + type: string + description: | + Recycling instructions as raw text, e.g. Plastic + bottle to recycle, Plastic cap to recycle. + This will get automatically parsed and + will be used to compute the Eco-Score. + You can either request it (if it exists) or + send it in a specific language. + example: packaging_text_en + packagings: + $ref: ./packagings/packagings.yaml + packagings_complete: + $ref: ./packagings/packagings_complete.yaml + + pnns_groups_1: + description: | + Category of food according to [French Nutrition and Health Program](https://fr.wikipedia.org/wiki/Programme_national_nutrition_sant%C3%A9) + type: string + pnns_groups_1_tags: + type: array + items: + type: string + pnns_groups_2: + description: | + Sub Category of food according to [French Nutrition and Health Program](https://fr.wikipedia.org/wiki/Programme_national_nutrition_sant%C3%A9) + type: string + pnns_groups_2_tags: + type: array + items: + type: string + popularity_key: + type: integer + popularity_tags: + type: array + items: + type: string + scans_n: + type: integer + unique_scans_n: + type: integer + serving_quantity: + type: string + description: | + Normalized version of serving_size. + Note that this is NOT the number of servings by product. + (in perl, see `normalize_serving_size`) + serving_size: + type: string + description: | + Serving size text (generally in g or ml). + We expect a quantity + unit but the user is free to input any string. + +patternProperties: + 'food_groups_(?\w\w)': + type: string + description: see `food_groups` + 'packaging_text_(?\w\w)': + type: string + description: | + Packaging text in language designated by `language_code` \ No newline at end of file diff --git a/docs/api/ref/schemas/product_nutrition.yaml b/docs/api/ref/schemas/product_nutrition.yaml new file mode 100644 index 0000000000000..9cf20b7c915d7 --- /dev/null +++ b/docs/api/ref/schemas/product_nutrition.yaml @@ -0,0 +1,259 @@ +type: object +description: | + Nutrition fields of a product +properties: + fruits-vegetables-nuts_100g_estimate: + type: integer + description: | + An estimate, from ingredients list of the percentage of vegetable and nuts. + This is an important information for Nutri-Score computation. + no_nutrition_data: + type: string + description: | + When a product does not have nutrition data displayed on the + packaging, the user can check the field "Nutrition facts are + not specified on the product". + By doing so, the no_nutrition_data field takes the value "on". + This case is frequent (thousands of products). + example: "on" + nutriments: + type: object + description: | + All known nutrients for the product. + + Note that each nutrients are declined with a variety of suffixes like `_100g`, `_serving`, + see patternProperties below. + A specific `_unit` is the unit used to measure the nutrient. + + Also for products that have a nutrition table for prepared product + (eg. the nutrition facts for a bowl of milk with cocoa powder), + a `_prepared` suffix is added (before other suffixes). + + **FIXME** add more nutrients with description. + properties: + alcohol: + description: | + Quantity of alcool per 100g, per serving + type: number + carbohydrates: + type: number + energy: + type: number + energy-kcal: + type: number + energy-kj: + type: number + fat: + type: number + fruits-vegetables-nuts-estimate-from-ingredients_100g: + type: number + nova-group: + type: integer + nutrition-score-fr: + description: | + Experimental nutrition score derived from + the UK FSA score and adapted for the French market + (formula defined by the team of Professor Hercberg). + proteins: + type: number + salt: + type: number + saturated-fat: + type: number + sodium: + type: number + sugars: + type: number + carbon-footprint-from-known-ingredients_product: + type: integer + carbon-footprint-from-known-ingredients_serving: + type: number + erythritol: + type: number + description: | + erythritol is a polyol which is not providing any energy. + As such, it needs not be taken into account when computing + the energy of a product. Eryhtritol is now displayed on + nutrition facts sheet of some products, mainly in the USA. + This value is entered either by contributors, either by + imports. + example: 12.5 + patternProperties: + '(?\w+)_unit': + description: | + The unit in which the nutrient for 100g or per serving is measured. + + The possible values depends on the nutrient. + + * `g` for grams + * `mg` for milligrams + * `ÎŒg` for micrograms + * `cl` for centiliters + * `ml` for mililiters + * `dv` for recommended daily intakes (aka [Dietary Reference Intake](https://en.wikipedia.org/wiki/Dietary_Reference_Intake)) + * `% vol` for alcohol vol per 100 ml + + đŸ€“ code: see the [Units module][units-module], + and [Food:default_unit_for_nid function][default-unit] + + [units-module]: https://openfoodfacts.github.io/openfoodfacts-server/dev/ref-perl-pod/ProductOpener/Units.html + [default-unit]: https://openfoodfacts.github.io/openfoodfacts-server/dev/ref-perl-pod/ProductOpener/Food.html#default_unit_for_nid_(_%24nid) + enum: ['ć…Źæ–€', '慬捇', 'kg', 'ĐșĐł', 'l', 'Đ»', 'æŻ«ć…‹', 'mg', 'ĐŒĐł', 'mcg', '”g', 'oz', 'fl oz', 'dl', 'ĐŽĐ»', 'cl', 'ĐșĐ»', 'æ–€', 'g', '', ' ', 'kj', '態', '慬態', 'Đł', 'ĐŒĐ»', 'ml', 'mmol/l', 'æŻ«ć‡', '% vol', 'ph', '%', '% dv', '% vol (alcohol)', 'iu', 'mol/l', 'mval/l', 'ppm', 'ïżœrh', 'ïżœfh', 'ïżœe', 'ïżœdh', 'gpg'] + '(?\w+)_100g': + description: | + The standardized value of a serving of 100g (or 100ml for liquids) + for the nutrient. + + This is computed from the `nutrient` property, + the serving size, and the `nutrient`_unit field. + type: number + '(?\w+)_serving': + description: | + The standardized value of a serving for this product. + type: number + '(?\w+)_value': + description: | + The standardized value of a serving of 100g (or 100ml for liquids) + for the nutrient. + type: number + '(?\w+)_prepared': + description: | + The value for nutrient for **prepared** product. + type: number + '(?\w+)_prepared_unit': + description: | + The unit in which the nutrient for 100g or per serving of **prepared** product is measured. + type: string + '(?\w+)_prepared_100g': + description: | + The standardized value of a serving of 100g (or 100ml for liquids) + for the nutrient, for **prepared** product. + type: number + '(?\w+)_prepared_serving': + description: | + The standardized value of a serving for the **prepared** product. + type: number + '(?\w+)_prepared_value': + description: | + The standardized value of a serving of 100g (or 100ml for liquids) + for the nutrient for **prepared** product. + type: number + nutriscore_data: + description: | + Detail of data the Nutri-Score was computed upon. + + **TODO** document each property + type: object + properties: + energy: + type: integer + energy_points: + type: integer + energy_value: + type: integer + fiber: + type: integer + fiber_points: + type: integer + fiber_value: + type: integer + fruits_vegetables_nuts_colza_walnut_olive_oils: + type: integer + fruits_vegetables_nuts_colza_walnut_olive_oils_points: + type: integer + fruits_vegetables_nuts_colza_walnut_olive_oils_value: + type: integer + grade: + type: string + is_beverage: + type: integer + is_cheese: + type: integer + is_fat: + type: integer + is_water: + type: integer + negative_points: + type: integer + positive_points: + type: integer + proteins: + type: number + proteins_points: + type: integer + proteins_value: + type: number + saturated_fat: + type: number + saturated_fat_points: + type: integer + saturated_fat_ratio: + type: number + saturated_fat_ratio_points: + type: integer + saturated_fat_ratio_value: + type: number + saturated_fat_value: + type: number + score: + type: integer + sodium: + type: number + sodium_points: + type: integer + sodium_value: + type: number + sugars: + type: number + sugars_points: + type: integer + sugars_value: + type: number + nutriscore_grade: + description: | + Nutri-Score for the product as a letter. + + See https://world.openfoodfacts.org/nutriscore. + type: string + enum: ["a", "b", "c", "d", "e"] + nutriscore_score: + description: | + Nutri-Score for the product as an integer (see also `nutriscore_grade`). + type: integer + nutriscore_score_opposite: + type: integer + nutrition_grade_fr: + type: string + description: | + Nutrition grade (‘a’ to ‘e’), + https://world.openfoodfacts.org/nutriscore. + nutrition_grades: + description: | + Nutrition grades as a comma separated list. + + Some products with multiple components might have multiple Nutri-Score + type: string + nutrition_grades_tags: + type: array + items: + type: string + nutrition_score_beverage: + type: integer + nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients: + type: integer + nutrition_score_warning_fruits_vegetables_nuts_estimate_from_ingredients_value: + type: integer + nutrition_score_warning_no_fiber: + type: integer + other_nutritional_substances_tags: + type: array + items: + type: object + unknown_nutrients_tags: + type: array + items: + type: object + vitamins_tags: + type: array + items: + type: object diff --git a/docs/api/ref/schemas/product_quality.yaml b/docs/api/ref/schemas/product_quality.yaml new file mode 100644 index 0000000000000..cf3917392bfe3 --- /dev/null +++ b/docs/api/ref/schemas/product_quality.yaml @@ -0,0 +1,66 @@ +type: object +description: | + This is data that is linked to products data quality +properties: + data_quality_bugs_tags: + type: array + items: + type: object + data_quality_errors_tags: + type: array + items: + type: object + data_quality_info_tags: + type: array + items: + type: string + data_quality_tags: + type: array + items: + type: string + data_quality_warnings_tags: + type: array + items: + type: string + data_sources: + type: string + description: | + Source of data imported from producers. + data_sources_tags: + type: array + items: + type: string + last_check_dates_tags: + type: array + items: + type: string + last_checked_t: + type: integer + last_checker: + type: string + + states: + description: | + comma separated list of values indicating some states of the product, + like things to be done, or to be completed. + See [states taxonomy](https://static.openfoodfacts.net/data/taxonomies/states.json) + type: string + states_hierarchy: + type: array + items: + type: string + states_tags: + type: array + items: + description: + Each state describe something that is completed or is to be done or improved on the product. + + Refer to [states taxonomy](https://static.openfoodfacts.net/data/taxonomies/states.json) + type: string + + misc_tags: + description: | + Information about different aspect of the product + type: array + items: + type: string \ No newline at end of file diff --git a/docs/api/ref/schemas/product_tags.yaml b/docs/api/ref/schemas/product_tags.yaml new file mode 100644 index 0000000000000..8eb49070d429c --- /dev/null +++ b/docs/api/ref/schemas/product_tags.yaml @@ -0,0 +1,114 @@ +type: object +description: | + Data about a product which is represented as tags +properties: + + brands: + type: string + brands_tags: + type: array + items: + type: string + + categories: + type: string + categories_hierarchy: + type: array + items: + type: string + categories_lc: + type: string + categories_tags: + type: array + items: + type: string + + checkers_tags: + type: array + items: + type: string + cities: + type: string + cities_tags: + type: array + items: + type: object + correctors_tags: + type: array + items: + type: string + + countries: + type: string + description: | + List of countries where the product is sold. + countries_hierarchy: + type: array + items: + type: string + countries_lc: + type: string + countries_tags: + type: array + items: + type: string + ecoscore_tags: + description: | + All ecoscore of a product. + Most of the time it's only one value, + but it might eventually be more for products composed of sub-products. + See also: `ecoscore_score`, `ecoscore_grade`. + type: array + items: + type: string + + emb_codes: + type: string + description: | + Packager code. + example: EMB 2013330 + emb_codes_orig: + type: string + emb_codes_tags: + type: array + items: + type: object + + + labels: + type: string + labels_hierarchy: + type: array + items: + type: string + labels_lc: + type: string + labels_tags: + type: array + items: + type: string + + entry_dates_tags: + description: | + The data as a series of tag: `yyyy-mm-dd`, `yyyy-mm`, `yyyy` + type: array + items: + type: string + example: ["2016-03-11","2016-03","2016"] + + manufacturing_places: + type: string + description: | + Places where the product was manufactured or transformed. + manufacturing_places_tags: + type: array + items: + type: object + nova_groups_tags: + type: array + items: + type: string + nutrient_levels_tags: + type: array + items: + type: string \ No newline at end of file diff --git a/docs/assets/api-rapidoc.html b/docs/assets/api-rapidoc.html index 0d9eef5384350..541654d598dc5 100644 --- a/docs/assets/api-rapidoc.html +++ b/docs/assets/api-rapidoc.html @@ -31,7 +31,7 @@ "hk", ); -# http://healthycanadians.gc.ca/eating-nutrition/label-etiquetage/tips-conseils/nutrition-fact-valeur-nutritive-eng.php +=head2 %nutriments_tables + +An array that condition how nutrients are displayed. + +It is a list of nutrients names with eventual prefixes and suffixes: + +=over + +=item C<#nutrient> a leading C<#> indicates a comment and will be ignored + +=item C a leading C indicates an important nutrient, they should always be shown + +=item The level of each nutrient is indicated by leading dashes before its id: +=over +=item C - no dash for top nutrients +=item C<-sub-nutrient> - for level 2 +=item C<--sub-sub-nutrient> - for level 3, etc. +=back + +=item C a C<-> at the end indicates that the nutrient should be hidden and only shown if explicitly added. + +=back + +=cut + +# http://healthycanadians.gc.ca/eating-nutrition/label-etiquetage/tips-conseils/nutrition-fact-valeur-nutritive-eng.php %nutriments_tables = ( europe => [ (