openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
658 stars 387 forks source link

Better API support for protected products #2012

Open aleene opened 5 years ago

aleene commented 5 years ago

Is your feature request related to a problem? Please describe. An API user can not determine and react on protected products.

Describe the solution you'd like Add a protected state to the product json. And if needed specify which fields are protected. If the info is in the product json, we can prohibit editing those fields.

If a protected product is written return with an error json, so the api user sees what happened and can react on it.

VaiTon commented 5 years ago

@aleene Could you please post an example URL?

teolemon commented 2 years ago