From 09f58211b516cf2f106d9ca5a3bdaa9535274c81 Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Mon, 6 Jan 2025 10:47:51 +0100 Subject: [PATCH] docs: move dev journey tutorials to a better location (#11187) also fix some links --- docs/api/tutorial-dev-journey.md | 22 +++++----- .../tutorial-uploading-photo-to-a-product.md | 3 +- .../tutorials}/adding-missing-products.md | 19 ++++----- .../tutorials}/comparing-sodas.md | 0 ...g-a-local-cache-of-open-food-facts-data.md | 4 +- .../tutorials}/finding-healthy-cereals.md | 0 .../tutorials}/folksonomy-engine.md | 0 .../get-in-touch-with-openfoodfacts.md | 0 .../get-ingredient-related-analysis.md | 24 +++++++++-- .../tutorials/get-the-green-score.md} | 40 +++++++++---------- .../tutorials}/get-the-nutriscore.md | 5 ++- ...reate-data-quality-controls-in-your-app.md | 0 .../license-be-on-the-legal-side.md | 0 .../tutorials}/product-prices.md | 0 .../reporting-issues-with-nutripatrol.md | 0 ...g-cosmetics-pet-food-and-other-products.md | 0 .../tutorials}/working-with-facets.md | 0 17 files changed, 71 insertions(+), 46 deletions(-) rename docs/{reference/api-tutorials => api/tutorials}/adding-missing-products.md (86%) rename docs/{reference/api-tutorials => api/tutorials}/comparing-sodas.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/creating-a-local-cache-of-open-food-facts-data.md (90%) rename docs/{reference/api-tutorials => api/tutorials}/finding-healthy-cereals.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/folksonomy-engine.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/get-in-touch-with-openfoodfacts.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/get-ingredient-related-analysis.md (94%) rename docs/{reference/api-tutorials/get-the-ecoscore.md => api/tutorials/get-the-green-score.md} (75%) rename docs/{reference/api-tutorials => api/tutorials}/get-the-nutriscore.md (98%) rename docs/{reference/api-tutorials => api/tutorials}/how-to-create-data-quality-controls-in-your-app.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/license-be-on-the-legal-side.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/product-prices.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/reporting-issues-with-nutripatrol.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/scanning-cosmetics-pet-food-and-other-products.md (100%) rename docs/{reference/api-tutorials => api/tutorials}/working-with-facets.md (100%) diff --git a/docs/api/tutorial-dev-journey.md b/docs/api/tutorial-dev-journey.md index 550b5c4399fa2..8e4166a51927d 100644 --- a/docs/api/tutorial-dev-journey.md +++ b/docs/api/tutorial-dev-journey.md @@ -1,16 +1,20 @@ ## Tutorials for Common developer journeys + ### READ only journeys -- []()Dev Journey 1: Comparing sodas -- []()Dev Journey 2: Finding healthy breakfast cereals + +- Dev Journey 1: [Comparing sodas](./tutorials/comparing-sodas.md) +- Dev Journey 2: [Finding healthy breakfast cereals](./tutorials/finding-healthy-cereals.md) ### READ and WRITE journeys -- []()Dev Journey 3: Adding missing products -- []()Dev Journey 4: Get the Nutri-Score -- []()Dev Journey 5: Get the Eco-Score -- []()Dev Journey 6: Get ingredient related analysis on new or existing products (Nova, allergens, additives…) -- []()Dev Journey 7: Adding non-standard fields to a food product using Folksonomy (coming soon for cosmetics, pet food, and other products) -- []()Dev Journey 8: Retrieving and adding prices to products using Open Prices + +- Dev Journey 3: [Adding missing products](./tutorials/adding-missing-products.md) +- Dev Journey 4: [Get the Nutri-Score](./tutorials/get-the-nutri-score.md) +- Dev Journey 5: [Get the Green-Score](./tutorials/get-the-green-score.md) +- Dev Journey 6: [Get ingredient related analysis on new or existing products (Nova, allergens, additives…)](./tutorials/get-ingredient-related-analysis.md) +- Dev Journey 7: [Adding non-standard fields to a food product using Folksonomy (coming soon for cosmetics, pet food, and other products)](./tutorials/folksonomy-engine.md) +- Dev Journey 8: [Retrieving and adding prices to products using Open Prices](./tutorials/product-prices.md) ## Adding more journeys -* If you feel a developer journey is missing, feel free to create a Pull Request, or propose it at reuse@openfoodfacts.org +* If you feel a developer journey is missing, or want to correct one, + feel free to create a Pull Request, or propose it at reuse@openfoodfacts.org diff --git a/docs/api/tutorial-uploading-photo-to-a-product.md b/docs/api/tutorial-uploading-photo-to-a-product.md index 09ff565f96b98..5c75a57151ab1 100644 --- a/docs/api/tutorial-uploading-photo-to-a-product.md +++ b/docs/api/tutorial-uploading-photo-to-a-product.md @@ -40,7 +40,8 @@ Multilingual products have several photos based on the languages present on the The WRITE operations in the Open Food Facts API require authentication. Therefore you need a valid `user_id` and `password` to write the photo to 100% Real Orange Juice. -> Sign up on the [Open Food Facts App](https://world.openfoodfacts.org/) to get your `user_id` and `password` if you dont have one. For more details, visit the [Open Food Facts Authentication](https://openfoodfacts.github.io/openfoodfacts-server/introduction/api/#authentication). +> Sign up on the [Open Food Facts App](https://world.openfoodfacts.org/) to get your `user_id` and `password` if you dont have one. +For more details, visit the : [Authentication paragraph in our introduction](../index.md#authentication). ## Parameters diff --git a/docs/reference/api-tutorials/adding-missing-products.md b/docs/api/tutorials/adding-missing-products.md similarity index 86% rename from docs/reference/api-tutorials/adding-missing-products.md rename to docs/api/tutorials/adding-missing-products.md index 11f9e73a74695..f512b98269695 100644 --- a/docs/reference/api-tutorials/adding-missing-products.md +++ b/docs/api/tutorials/adding-missing-products.md @@ -9,13 +9,13 @@ If you have an app that makes POST calls and you don't want your users to authen - `user_id`: myappname - `password`: 123456 -* For a complete reference on AUTH, please read: https://openfoodfacts.github.io/openfoodfacts-server/api/#authentication - +* For a complete reference on AUTH, please read: [Authentication in our introduction](../index.md#authentication) + --- ## Adding images to support your edit, and get machine learning predictions If you ask your users just one thing, it would be to send photos of the packaging (front, ingredients, nutrition, recycling, the more the better)
- Please refer to our comprehensive tutorial on uploading images +Please refer to our [comprehensive tutorial on uploading images](../tutorial-uploading-photo-to-a-product.md) --- @@ -57,7 +57,7 @@ You can define one or more parameters to add, for example, the brand and the Kos - `brands`: Häagen-Dazs - `labels`: kosher - + The call looks like this: @@ -94,21 +94,22 @@ It should be structured as: user-agent + user-id. `comment=Edit by a Healthy Choices 1.2 iOS user - SxGFRZkFwdytsK2NYaDg4MzRVenNvUEI4LzU2a2JWK05LZkFRSWc9PQ` ---- +--- ## Leveraging Robotoff ML predictions to simplify life for your users -Leveraging Robotoff prediction to simplify life for your users: https://openfoodfacts.github.io/openfoodfacts-server/api/intro-robotoff/ +Leveraging [Robotoff prediction](../intro-robotoff.md) to simplify life for your users. You can get a category prediction from images (useful for Nutri-Score and Eco-Score), you can get quality labels prediction, brand predictions, weight predictions from images. To achieve this you need the upload image section above. Adding data like product name, ingredients and nutrition can help, but some predictions can be done with just images. ## Getting your users to check ingredients OCR in an autonomous fashion -Getting your users to check ingredients OCR in an autonomous fashion: https://openfoodfacts.github.io/openfoodfacts-server/reference/api-tutorials/get-ingredient-related-analysis/ +Getting your users to [check ingredients OCR in an autonomous fashion](./get-ingredient-related-analysis.md) ## Getting your users to input nutrition facts -Getting your users to input nutrition facts: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-nutrition-data/ +[Getting your users to input nutrition facts](../../dev/explain-nutrition-data.md) + ## Getting your users to input packaging data -Getting your users to input packaging data: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-packaging-data/ +Getting your users to [input packaging data](../../dev/explain-packaging-data.md) ## Showing the result of their work - You can then reload the product, potentially using Knowledge Panels, to show the rewarding result of their work. diff --git a/docs/reference/api-tutorials/comparing-sodas.md b/docs/api/tutorials/comparing-sodas.md similarity index 100% rename from docs/reference/api-tutorials/comparing-sodas.md rename to docs/api/tutorials/comparing-sodas.md diff --git a/docs/reference/api-tutorials/creating-a-local-cache-of-open-food-facts-data.md b/docs/api/tutorials/creating-a-local-cache-of-open-food-facts-data.md similarity index 90% rename from docs/reference/api-tutorials/creating-a-local-cache-of-open-food-facts-data.md rename to docs/api/tutorials/creating-a-local-cache-of-open-food-facts-data.md index 15c280626e850..dfc54c5a7c816 100644 --- a/docs/reference/api-tutorials/creating-a-local-cache-of-open-food-facts-data.md +++ b/docs/api/tutorials/creating-a-local-cache-of-open-food-facts-data.md @@ -11,7 +11,7 @@ A local cache is a copy of OFF data stored directly on your system or server. Th - **FoodVisor Contributed (Python/MongoDB) backend:** The FoodVisor startup contributed a few years ago a Python-based backend with a MongoDB export, providing a solid starting point for caching in Python environments. - **Project-Specific Caches:** Several OFF projects like open-prices and robotoff have implemented local caches for their own needs. While not immediately reusable, they can serve as valuable references. -- **SDKs** We have a number of official SDKs that can be leveraged as part of a caching backend. Please leverage and contribute to those 🙏 +- **SDKs** We have [a number of official SDKs](../api.md#sdks) that can be leveraged as part of a caching backend. Please leverage and contribute to those 🙏 - **You can start a project within Open Food Facts to solve this** ### Need for Diverse Solutions @@ -25,7 +25,7 @@ For applications primarily focused on user-generated requests, a local cache may ### Licensing and Data Sharing Even when using a local cache, you're still bound by the Open Database License (ODbL). **Do not mix OFF data with external product data**. All additions or modifications made to OFF data must be shared back to OFF, preferably through the WRITE API. Consider incorporating this functionality into your cache implementation. -For more on legal issues, please read this page +For more on legal issues [please read this page](./license-be-on-the-legal-side.md) ### Challenges of Cache Maintenance diff --git a/docs/reference/api-tutorials/finding-healthy-cereals.md b/docs/api/tutorials/finding-healthy-cereals.md similarity index 100% rename from docs/reference/api-tutorials/finding-healthy-cereals.md rename to docs/api/tutorials/finding-healthy-cereals.md diff --git a/docs/reference/api-tutorials/folksonomy-engine.md b/docs/api/tutorials/folksonomy-engine.md similarity index 100% rename from docs/reference/api-tutorials/folksonomy-engine.md rename to docs/api/tutorials/folksonomy-engine.md diff --git a/docs/reference/api-tutorials/get-in-touch-with-openfoodfacts.md b/docs/api/tutorials/get-in-touch-with-openfoodfacts.md similarity index 100% rename from docs/reference/api-tutorials/get-in-touch-with-openfoodfacts.md rename to docs/api/tutorials/get-in-touch-with-openfoodfacts.md diff --git a/docs/reference/api-tutorials/get-ingredient-related-analysis.md b/docs/api/tutorials/get-ingredient-related-analysis.md similarity index 94% rename from docs/reference/api-tutorials/get-ingredient-related-analysis.md rename to docs/api/tutorials/get-ingredient-related-analysis.md index e2ba05210ef92..c1194fe23af79 100644 --- a/docs/reference/api-tutorials/get-ingredient-related-analysis.md +++ b/docs/api/tutorials/get-ingredient-related-analysis.md @@ -26,7 +26,7 @@ You can get information about absence or unawareness of the presence of: ## Flow ### The product does not exist -* You can use our [adding products tutorial](https://openfoodfacts.github.io/openfoodfacts-server/reference/api-tutorials/adding-missing-products/) +* You can use our [adding products tutorial](./adding-missing-products.md) ### The product does exist: Get the status of the product and show prompts in case of incomplete ingredients or category (also required for NOVA ultra-processing levels) @@ -51,7 +51,7 @@ then "Add ingredients to see the level of food processing and potential additive * Once the user has entered once of your completion flow, proceed to the next step ### Upload ingredient photo -* [Please follow our dedicated tutorial on photo upload](https://openfoodfacts.github.io/openfoodfacts-server/api/tutorial-uploading-photo-to-a-product/) +* [Please follow our dedicated tutorial on photo upload](../tutorial-uploading-photo-to-a-product.md) * The DART SDK is offering support for photo upload, and we encourage you to implement it in one of the official Open Food Facts SDKs if it's not supported yet. * Ensure that your users crop language by language, or take all languages at once, but you perform server side cropping on one specific language before performing the OCR * We're working on a ML solution to detect languages and performing auto-crops per language ([reuse@openfoodfacts.org](mailto:reuse@openfoodfacts.org) to learn more) @@ -64,39 +64,55 @@ then "Add ingredients to see the level of food processing and potential additive * The actions described in this topic do not modify the image, but provide metadata on how to use it (the data of the corners in the case of selection and the data of the rotation). That is, you send an image to the API, provide an id, you define, for example, the cropping and rotation parameters and as a response, the server generates a new image as requested and you can call this new version of the image. #### Selecting photos -* [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/tutorial-uploading-photo-to-a-product/) + +* [Please look at the specific tutorial](../tutorial-uploading-photo-to-a-product.md) + #### Rotating a photo + * [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v2/#get-/cgi/product_image_crop.pl) + #### Cropping Photos + **Note**: Cropping is only relevant for editing already selected images. You need to upload it first to the system, select it, retrieve its id, and then crop it. This is a non destructive crop. If there's an issue with the image, you should report it using the dedicated NutriPatrol API. Moderators will either perform a destructive crop, or more likely delete the image. * [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v2/#post-/cgi/product_image_crop.pl) + #### Unselecting photos + * [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v2/#post-/cgi/product_image_unselect.pl) ### Get the Optical Character Recognition (OCR) output of the ingredients photo + Open Food Facts uses optical character recognition (OCR) to retrieve ingredient data and other information (using Robotoff) from the photos of the product labels. **Notes**: * The OCR may contain errors. Encourage your users to correct the output using the ingredients WRITE API. * You can also use your own on-device OCR, especially if you're superconfident about it performing better than the server's cloudvision and if you plan to send a high number of queries. * Please DO NOT translate and send us the OCR output. We want to store only actual data. If you want translated version of the ingredient list, please send us an email to reuse@openfoodfacts.org + #### API solution + * [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v2/#get-/cgi/ingredients.pl) + #### Dart SDK solution + * [https://openfoodfacts.github.io/openfoodfacts-dart/model_OcrIngredientsResult/OcrIngredientsResult-class.html](https://openfoodfacts.github.io/openfoodfacts-dart/model_OcrIngredientsResult/OcrIngredientsResult-class.html) * [https://openfoodfacts.github.io/openfoodfacts-dart/utils_OcrField/OcrField-class.html](https://openfoodfacts.github.io/openfoodfacts-dart/utils_OcrField/OcrField-class.html) * [https://openfoodfacts.github.io/openfoodfacts-dart/utils_OcrField/OcrFieldExtension.html](https://openfoodfacts.github.io/openfoodfacts-dart/utils_OcrField/OcrFieldExtension.html) - + ### Present the result of the Optical Character Recognition (OCR) output to your user for human review + * Create a UI that encourages careful review, and encourages dropping the output if it's not right * Create a UI that encourages taking a less blurry, better framed photo to fix the output * Create a UI that handles multilinguism well + ### Send the ingredients + * [Please look at the reference located](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v2/#post-/cgi/product_jqm2.pl) ### Refresh product to display the result to your user + * [Please look at the reference](https://openfoodfacts.github.io/openfoodfacts-server/api/ref-v3/#get-/api/v3/product/-barcode-) ![alt_text](images/image1.png "image_tooltip") diff --git a/docs/reference/api-tutorials/get-the-ecoscore.md b/docs/api/tutorials/get-the-green-score.md similarity index 75% rename from docs/reference/api-tutorials/get-the-ecoscore.md rename to docs/api/tutorials/get-the-green-score.md index c34d3478a0f89..7d935e64ffc89 100644 --- a/docs/reference/api-tutorials/get-the-ecoscore.md +++ b/docs/api/tutorials/get-the-green-score.md @@ -1,19 +1,19 @@ -Helping your users get the Eco-Score for any product +Helping your users get the Green-Score for any product - If you can't get the information on a specific product, you can get your user to send photos and data. - That will then be processed by Open Food Facts to get the computed result you want to show them. - You can implement the complete flow so that they get immediately the result with some effort on their side. - That will ensure user satisfaction -- Please refer to the [product addition tutorial](https://openfoodfacts.github.io/openfoodfacts-server/reference/api-tutorials/adding-missing-products/) for the technical way to do the required operations (such as category input), and to the high level workflow below for all the cases you have to handle. +- Please refer to the [product addition tutorial](./adding-missing-products.md) for the technical way to do the required operations (such as category input), and to the high level workflow below for all the cases you have to handle. ## Table of contents -* Getting your app ready for the Eco-Score +* Getting your app ready for the Green-Score * Implementing the basic display of the score -* Displaying the Eco-Score outside France +* Displaying the Green-Score outside France * Ensuring a good user experience (even with data gaps) -* Adding disclaimers when we can't display the Eco-Score -* Adding disclaimers when the Eco-Score is computed with a data gap + Asking the users to photograph and/or complete missing information +* Adding disclaimers when we can't display the Green-Score +* Adding disclaimers when the Green-Score is computed with a data gap + Asking the users to photograph and/or complete missing information * Adding value by explaining * Product Attributes * Additional ways to get ready @@ -45,38 +45,38 @@ Helping your users get the Eco-Score for any product The Open Food Facts official app use this one, which is less work but also less flexible (will display other data as well). -### Displaying the Eco-Score outside France +### Displaying the Green-Score outside France * You need to ensure the country your users are in: * Asking them explicitly at startup, and storing the value * Geofencing your app to just one country * Using the phones or the IP address (using eg GeoIP) to infer a country -* You need to serve the matching Eco-Score value - * You can ask for a country specific Eco-Score +* You need to serve the matching Green-Score value + * You can ask for a country specific Green-Score * **If your users are outside France, you need to clearly display the experimental disclaimer at least once.** ### Ensuring a good user experience (even with data gaps) -_We can compute the Eco-Score for most of the database, but we’re missing some data on some products to make the computation exact, and it won’t be computed on some products. In any case, you need to make sure your users won’t be frustrated by implementing the following points:_ +_We can compute the Green-Score for most of the database, but we’re missing some data on some products to make the computation exact, and it won’t be computed on some products. In any case, you need to make sure your users won’t be frustrated by implementing the following points:_ -* Adding disclaimers when we can’t display the Eco-Score - * **Add a message if we have a category but no Eco-Score** +* Adding disclaimers when we can’t display the Green-Score + * **Add a message if we have a category but no Green-Score** * _if “en:categories-completed” _in states_tags_ **AND** ecoscore_grade=Null_ - * We could not compute an Eco-Score for this product. It might be that the category is not specific enough or that we don't have supporting data for this category. If you believe this is an error, you can email [contact@example.com](mailto:contact@example.com) + * We could not compute an Green-Score for this product. It might be that the category is not specific enough or that we don't have supporting data for this category. If you believe this is an error, you can email [contact@example.com](mailto:contact@example.com) * You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags ](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags) * **Help the user add the category if it is missing** * You can use our Robotoff API to get your users to validate a prediction * [Robotoff Questions](https://docs.google.com/document/d/1IoDy0toQrrqtWHvDYp2rEVw84Yq1J0x2pt-0RGTm7h0/edit) -* Adding disclaimers when the Eco-Score is computed with a data gap + Asking the users to photograph and/or complete missing information +* Adding disclaimers when the Green-Score is computed with a data gap + Asking the users to photograph and/or complete missing information * **Add a message if no labels are available** * if "en:labels-to-be-completed" in states_tags - * `"The Eco-Score takes into account environmental labels. Please take them into photo or edit the product so that they can be taken into account"` + * `"The Green-Score takes into account environmental labels. Please take them into photo or edit the product so that they can be taken into account"` * Asking your users for a photo should be enough * You can otherwise add toggles for Explicit labels (please add a photo of them to avoid mistakes) * You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags ](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags) * **Add a message if no origins are available** * if "en:origins-to-be-completed" in states_tags - * `"The Eco-Score takes into account the origins of the ingredients. Please take them into a photo (ingredient list and/or any geographic claim or edit the product so that they can be taken into account. If it is not clear, you can contact the food producer."` + * `"The Green-Score takes into account the origins of the ingredients. Please take them into a photo (ingredient list and/or any geographic claim or edit the product so that they can be taken into account. If it is not clear, you can contact the food producer."` * You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags ](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags) * **Add a message if recycling information is missing** * if "en:packaging-photo-to-be-selected" in states_tags @@ -84,10 +84,10 @@ _We can compute the Eco-Score for most of the database, but we’re missing some * if "en:packaging-to-be-completed" in states_tags * you can get your users to type it, take a photo, or have a combinatory picker with packaging type, packaging material, packaging recyclability * The field to input raw recycling instructions eg: “Plastic bottle to recycle, Plastic cap to recycle” is “packaging_text_en” (change the language code accordingly) - * It will get automatically parsed and get used to compute the Eco-Score + * It will get automatically parsed and get used to compute the Green-Score * You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,ecoscore_alpha,states_tags](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,ecoscore_alpha,states_tags) * **Sharing some of your code** - * You are very welcome to implement data contribution in one of our SDKs. The more apps let their user add photos and data, the more Eco-Scores we get. + * You are very welcome to implement data contribution in one of our SDKs. The more apps let their user add photos and data, the more Green-Scores we get. ### Adding value by explaining @@ -97,7 +97,7 @@ _We can compute the Eco-Score for most of the database, but we’re missing some * Full API documentation: [https://wiki.openfoodfacts.org/Product_Attributes](https://wiki.openfoodfacts.org/Product_Attributes) * Visual mockups: [https://github.com/openfoodfacts/openfoodfacts-androidapp/issues/3501](https://github.com/openfoodfacts/openfoodfacts-androidapp/issues/3501) * A Flutter implementation is available, and you are very welcome to contribute implementation in one of our existing SDKs (or create your own) -* Explanation of Eco-Score computations +* Explanation of Green-Score computations * [https://world-fr.openfoodfacts.org/api/v0/product/0634065322366.json?fields=environment_infocard,ecoscore_grade](https://world-fr.openfoodfacts.org/api/v0/product/0634065322366.json?fields=environment_infocard,ecoscore_grade) * HTML explanation. You can get the localized version by changing world-fr into world-de * The HTML explanation is already available in the openfoodfacts-dart package @@ -105,4 +105,4 @@ _We can compute the Eco-Score for most of the database, but we’re missing some ### Additional ways to get ready * Onboarding producers you know -* You can ask any producer you know to get in touch with us at [producers@openfoodfacts.org](mailto:producers@openfoodfacts.org) so that their products are Eco-Score ready in terms of data (we have easy ways to import their data using the Producer Platform: [https://world.pro.openfoodfacts.org/](https://world.pro.openfoodfacts.org/) ) +* You can ask any producer you know to get in touch with us at [producers@openfoodfacts.org](mailto:producers@openfoodfacts.org) so that their products are Green-Score ready in terms of data (we have easy ways to import their data using the Producer Platform: [https://world.pro.openfoodfacts.org/](https://world.pro.openfoodfacts.org/) ) diff --git a/docs/reference/api-tutorials/get-the-nutriscore.md b/docs/api/tutorials/get-the-nutriscore.md similarity index 98% rename from docs/reference/api-tutorials/get-the-nutriscore.md rename to docs/api/tutorials/get-the-nutriscore.md index 8142c3a9053cb..1277c28e6cd04 100644 --- a/docs/reference/api-tutorials/get-the-nutriscore.md +++ b/docs/api/tutorials/get-the-nutriscore.md @@ -1,11 +1,13 @@ ### Introduction + - If you can't get the information on a specific product, you can get your user to send photos and data, that will then be processed by Open Food Facts AI and contributors to get the computed result you want to show them. - You can implement the complete flow below so that they get immediately the result with some effort on their side. - That will ensure user satisfaction - Please refer to the [product addition tutorial](https://openfoodfacts.github.io/openfoodfacts-server/reference/api-tutorials/adding-missing-products/) for the technical way to do the required operations (such as nutrition input), and to the high level workflow below for all the cases you have to handle. ### Display Nutri-Score knowledge panels - All the logic below in 5 lines of code ! + - The Knowledge Panels are already implemented in the Dart package - They are simple to implement from the JSON API - They allow you to consume present and future knowledge from Open Food Facts @@ -15,6 +17,7 @@ Please use only the official assets to display the Nutri-Score. You can get v1 logos here: [NutriScore variants](https://drive.google.com/drive/u/1/folders/13SL2hgqYHSLMhYjMze9nYXV9GOdGMBgc) ### Getting ready for Nutri-Score V2 + - Nutri-Score V2 has a new computation method, which now requires the ingredient list, a category, and of course the nutrition table - It also has a transition period new logo, to indicate you are using the new computation. It is not compulsory to use it, but it will save you from a lot of questions from your users ("Do you have the new formula ?") - You can get the new assets by contacting reuse@openfoodfacts.org. We will make them public as soon as possible. Make sure you use v2 assets when showing v2 values. @@ -32,7 +35,7 @@ Here are the different messages to use according to the state:
"We could not compute an Nutri-Score for this product. It might be that the category is an exception. If you believe this is an error, you can email contact@thenameofyourapp.org"
- List of exceptions: -- You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags ](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags) +- You can get states with [https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags](https://world.openfoodfacts.org/api/v0/product/3414280980209.json?fields=ecoscore_grade,states_tags) #### Add a message if we have a category but no nutrition diff --git a/docs/reference/api-tutorials/how-to-create-data-quality-controls-in-your-app.md b/docs/api/tutorials/how-to-create-data-quality-controls-in-your-app.md similarity index 100% rename from docs/reference/api-tutorials/how-to-create-data-quality-controls-in-your-app.md rename to docs/api/tutorials/how-to-create-data-quality-controls-in-your-app.md diff --git a/docs/reference/api-tutorials/license-be-on-the-legal-side.md b/docs/api/tutorials/license-be-on-the-legal-side.md similarity index 100% rename from docs/reference/api-tutorials/license-be-on-the-legal-side.md rename to docs/api/tutorials/license-be-on-the-legal-side.md diff --git a/docs/reference/api-tutorials/product-prices.md b/docs/api/tutorials/product-prices.md similarity index 100% rename from docs/reference/api-tutorials/product-prices.md rename to docs/api/tutorials/product-prices.md diff --git a/docs/reference/api-tutorials/reporting-issues-with-nutripatrol.md b/docs/api/tutorials/reporting-issues-with-nutripatrol.md similarity index 100% rename from docs/reference/api-tutorials/reporting-issues-with-nutripatrol.md rename to docs/api/tutorials/reporting-issues-with-nutripatrol.md diff --git a/docs/reference/api-tutorials/scanning-cosmetics-pet-food-and-other-products.md b/docs/api/tutorials/scanning-cosmetics-pet-food-and-other-products.md similarity index 100% rename from docs/reference/api-tutorials/scanning-cosmetics-pet-food-and-other-products.md rename to docs/api/tutorials/scanning-cosmetics-pet-food-and-other-products.md diff --git a/docs/reference/api-tutorials/working-with-facets.md b/docs/api/tutorials/working-with-facets.md similarity index 100% rename from docs/reference/api-tutorials/working-with-facets.md rename to docs/api/tutorials/working-with-facets.md