Images
Delete Product Image
Changed onThis endpoint allows to delete an uploaded image for a product. Selected images that are cropped from it will also be deleted.
Image deletion is allowed only for moderators and admins, so the request must be authenticated with a session cookie or userid and password.
delete/api/v3/product/{code}/images/uploaded/{imgid}
Request
- Base URLhttps://world.openfoodfacts.org
- AuthAPI key in cookie session and API key in header User-Agent
Path parameters
codestring required
Example:3017620422003
The barcode of the product corresponding to the image.
imgidinteger required
Example:2
The id of the image to be deleted.
Response
OK
Example response
{
"status": "success_with_errors",
"result": {
"id": "product_updated",
"name": "Product updated",
"lc_name": "Produit mis à jour"
},
"errors": [
{
"message": {
"id": "sugars_higher_than_carbohydrates",
"name": "Sugars higher than carbohydrates",
"lc_name": "Sucres plus élevés que les glucides",
"description": "Sugars (40g) are higher than carbohydrates (35g).",
"lc_description": "Les sucres (40g) sont plus élévés que les glucdes."
},
"field": {
"id": "nutriment.sugars",
"value": "40"
},
"impact": {
"id": "nutrients_not_updated",
"name": "Nutrients not updated",
"lc_name": "Nutriments non mis à jour",
"description": "The nutrients were not updated.",
"lc_description": "Les nutriments n'ont pas été mis à jour."
}
}
]
}Changes
- info
added to the response body
allOflist for the response status - info
removed from the response body
allOflist for the response status
- info