Products

Create or Update Product

This API allows to create or update a product (if the product already exists, its data is updated, otherwise it is created), or to analyze a test product (in which case no product is created or updated). To analyze a product, the "barcode" path component needs to contain the value "test" instead of a barcode.

New API to send structured product data in a JSON format instead of in a flattened list of key / value pairs field as-in the current product add / edit API that relies on a multipart/form-data format.

Important: this new Product WRITE API has been deployed in production, but it is still under development, and it may change.

This new API is used in particular to send structured packaging data: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-packaging-data/

The new API is gradually being extended to support other product fields.

Currently supported fields are:

  • language specific fields (e.g. product name, ingredients text)
  • tags fields (e.g. categories, labels)
  • packaging fields (e.g. packagings, packagings_add, packagings_complete)
  • image selection of uploaded images (e.g. front, ingredients, nutrition, packaging) for specific languages
PATCH
/api/v3/product/{barcode}

Path Parameters

barcodestring

The barcode of the product to to create or update, or "test" to analyze the product data sent without creating or updating a product.

Structured data for the product is passed in the product field.

For complex structures such as the packagings object, it is possible to replace pre-existing data, or completing it:

  • an object sent in the packagings field will replace any pre-existing data.
  • an object sent in the field suffixed with _add (e.g. packagings_add) will be merged with any pre-existing data.
lc?string

2 letter code of the language of the interface. Used for localizing some fields in returned values (e.g. knowledge panels). If not passed, the language may be inferred by the country of the user (passed through the cc field or inferred by the IP address). Full list at https://static.openfoodfacts.org/data/taxonomies/languages.json

cc?string

2 letter code of the country of the user. Used for localizing some fields in returned values (e.g. knowledge panels). If not passed, the country may be inferred by the IP address of the request. Full list at https://static.openfoodfacts.org/data/taxonomies/countries.json

fields?string

Comma separated list of fields requested in the response. Special values: "updated": returns field that were updated by the query (e.g. sending "packagings" or "packagings_add" would return "packagings"), "none": returns no fields, "all": returns all fields except generated fields that need to be explicitly requested such as "knowledge_panels". Defaults to "updated" for WRITE requests, and "all" for READ requests.

tags_lc?string

2 letter language code to request names of tags in a specific language.

For READ requets: if passed, all taxonomized tags of the response will include a lc_name property with the translation in the requested language, if available. Otherwise, the property value will contain the name in the original language, prefixed by the 2 language code and a colon.

For WRITE requests: if passed, taxonomized tags fields with a lc_name property will be considered to be in this language.

user_id?string
password?string

Password for login

Formatpassword
product?Product update API V3 (WRITE)

Model for creating or updating products using the v3 version of the product update API.

Response Body

curl -X PATCH "https://world.openfoodfacts.org/api/v3/product/3017620422003" \
  -H "Content-Type: application/json" \
  -d '{
    "lc": "fr",
    "cc": "fr",
    "fields": "product_name,packagings",
    "tags_lc": "fr",
    "userid": "string",
    "password": "string",
    "code": "string",
    "product": {
      "packagings": [
        {
          "number_of_units": 6,
          "shape": {
            "id": "en:bottle"
          },
          "material": {
            "id": "en:plastic"
          },
          "recycling": {
            "id": "en:recycle"
          },
          "quantity_per_unit": "25 cl",
          "weight_measured": 10
        }
      ],
      "packagings_add": [
        {
          "number_of_units": 6,
          "shape": {
            "id": "en:bottle"
          },
          "material": {
            "id": "en:plastic"
          },
          "recycling": {
            "id": "en:recycle"
          },
          "quantity_per_unit": "25 cl",
          "weight_measured": 10
        }
      ],
      "product": {
        "title": "Product update API V3 (WRITE)",
        "type": "object",
        "description": "Model for creating or updating products using the v3 version of the product update API.",
        "examples": [],
        "allOf": [
          {
            "type": "object",
            "title": "Tags (WRITE)",
            "description": "Products have list of tags of different types (e.g. categories, labels) that can be replaced or added to with the following properties in API v3.\n",
            "properties": {
              "categories_tags": {
                "type": "array",
                "description": "An array of categories tag entries that will replace existing categories",
                "items": {
                  "title": "Input taxonomy tag",
                  "type": "string",
                  "description": "A tag entry, that will be matched against a taxonomy (e.g. a category, a label)\n\nThe entry is a string that can contain either:\n\n- a taxonomy entry id, in the form [2 letter language code]:[normalized canonical name] (e.g. \"en:green-teas\")\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\")\n- API v0 to v2: a string in the language of the request (specified with the lc field, or inferred from the subdomain the request is sent to (e.g. \"nl\" for requests sent to be.openfoodfacts.org)\n- API v3: a string in the default language of the field (e.g. French for categories_tags_fr) or in the language indicated by the tags_lc request field (e.g. Thés verts)\n\nAll entries will be matched to the corresponding taxonomy. It is possible to specify values that do not exist yet in the taxonomy. They may later be added as new taxonomy entries, or as new translations or synonyms of an existing entry."
                }
              },
              "categories_tags_add": {
                "type": "array",
                "description": "An array of categories tag entries that will be added to existing categories",
                "items": {
                  "title": "Input taxonomy tag",
                  "type": "string",
                  "description": "A tag entry, that will be matched against a taxonomy (e.g. a category, a label)\n\nThe entry is a string that can contain either:\n\n- a taxonomy entry id, in the form [2 letter language code]:[normalized canonical name] (e.g. \"en:green-teas\")\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\")\n- API v0 to v2: a string in the language of the request (specified with the lc field, or inferred from the subdomain the request is sent to (e.g. \"nl\" for requests sent to be.openfoodfacts.org)\n- API v3: a string in the default language of the field (e.g. French for categories_tags_fr) or in the language indicated by the tags_lc request field (e.g. Thés verts)\n\nAll entries will be matched to the corresponding taxonomy. It is possible to specify values that do not exist yet in the taxonomy. They may later be added as new taxonomy entries, or as new translations or synonyms of an existing entry."
                }
              }
            },
            "patternProperties": {
              "categories_tags_(?<language_code>\\w\\w)": {
                "type": "array",
                "description": "An array of categories tag entries that will replace existing categories, with a default language code",
                "items": {
                  "title": "Input taxonomy tag",
                  "type": "string",
                  "description": "A tag entry, that will be matched against a taxonomy (e.g. a category, a label)\n\nThe entry is a string that can contain either:\n\n- a taxonomy entry id, in the form [2 letter language code]:[normalized canonical name] (e.g. \"en:green-teas\")\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\")\n- API v0 to v2: a string in the language of the request (specified with the lc field, or inferred from the subdomain the request is sent to (e.g. \"nl\" for requests sent to be.openfoodfacts.org)\n- API v3: a string in the default language of the field (e.g. French for categories_tags_fr) or in the language indicated by the tags_lc request field (e.g. Thés verts)\n\nAll entries will be matched to the corresponding taxonomy. It is possible to specify values that do not exist yet in the taxonomy. They may later be added as new taxonomy entries, or as new translations or synonyms of an existing entry."
                }
              },
              "categories_tags_(?<language_code>\\w\\w)_add": {
                "type": "array",
                "description": "An array of categories tag entries that will be added to existing categories, with a default language code",
                "items": {
                  "title": "Input taxonomy tag",
                  "type": "string",
                  "description": "A tag entry, that will be matched against a taxonomy (e.g. a category, a label)\n\nThe entry is a string that can contain either:\n\n- a taxonomy entry id, in the form [2 letter language code]:[normalized canonical name] (e.g. \"en:green-teas\")\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\")\n- API v0 to v2: a string in the language of the request (specified with the lc field, or inferred from the subdomain the request is sent to (e.g. \"nl\" for requests sent to be.openfoodfacts.org)\n- API v3: a string in the default language of the field (e.g. French for categories_tags_fr) or in the language indicated by the tags_lc request field (e.g. Thés verts)\n\nAll entries will be matched to the corresponding taxonomy. It is possible to specify values that do not exist yet in the taxonomy. They may later be added as new taxonomy entries, or as new translations or synonyms of an existing entry."
                }
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "packagings": {
                "type": "array",
                "x-stoplight": {
                  "id": "69xpogby1amz6"
                },
                "title": "Packagings (WRITE)",
                "description": "The packagings object is an array of individual packaging component objects.\n\nThe Packaging data document explains how packaging data is structured in Open Food Facts: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-packaging-data/",
                "examples": [],
                "items": {
                  "title": "Packaging component (WRITE)",
                  "x-stoplight": {
                    "id": "iacgfu9zaek8v"
                  },
                  "type": "object",
                  "description": "Each packaging component has different properties to specify how many there are, its shape, material etc.\n\nThe shape, material and recycling properties will be mapped to one entry in the packaging_shapes, packaging_materials and packaging_recycling taxonomies.\n\nFor input, clients can either pass the id of a corresponding taxonomy entry (e.g. \"en:pizza-box\"), or a free text value prefixed with the language code of the text (e.g. \"en:Pizza box\", \"fr:boite à pizza\"). If the language code prefix is missing, the value of the \"lc\" field of the query will be used.\n\nThe resulting structure will contain the id of the canonical entry in the taxonomy if it good be matched, or the free text value prefixed with the language code otherwise.\n\nFor weights, the API is expecting a number with the number of grams. If a string is passed instead of a number, we will attempt to convert it to grams. The string may contain units (e.g. \"6.9 g\"), and use . or , as the decimal separator. Conversion may not work for all inputs. If a string was converted to a number, the API response will include a warning and specify the converted value.",
                  "examples": [
                    {
                      "number_of_units": 6,
                      "shape": {
                        "id": "en:bottle"
                      },
                      "material": {
                        "id": "en:plastic"
                      },
                      "recycling": {
                        "id": "en:recycle"
                      },
                      "quantity_per_unit": "25 cl",
                      "weight_measured": 10
                    }
                  ],
                  "properties": {
                    "number_of_units": {
                      "type": "integer",
                      "description": "Number of units of this packaging component contained in the product (e.g. 6 for a pack of 6 bottles)"
                    },
                    "shape": {
                      "title": "Packaging component shape (WRITE)",
                      "x-stoplight": {
                        "id": "yi44igltu79cl"
                      },
                      "description": "The shape property is canonicalized using the packaging_shapes taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "material": {
                      "title": "Packaging component material (WRITE)",
                      "x-stoplight": {
                        "id": "vgm9p553p4vd9"
                      },
                      "description": "The material property is canonicalized using the packaging_materials taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "recycling": {
                      "title": "Packaging component recycling instruction (WRITE)",
                      "x-stoplight": {
                        "id": "72oyv89xtgc2n"
                      },
                      "description": "The recycling property is canonicalized using the packaging_recycling taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "quantity_per_unit": {
                      "type": "string",
                      "description": "Quantity (weight or volume) of food product contained in the packaging component. (e.g. 75cl for a wine bottle)"
                    },
                    "weight_specified": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Weight (as specified by the manufacturer) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component). If passed a string - possibly with an unit - it will be converted to a number."
                    },
                    "weight_measured": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Weight (as measured by one or more users) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component). If passed a string - possibly with an unit - it will be converted to a number."
                    },
                    "brands": {
                      "type": "string",
                      "description": "A comma separated list of brands / product names for the packaging component (e.g. \"Tetra Pak\", Tetra Brik\""
                    },
                    "labels": {
                      "type": "string",
                      "description": "A comma separated list of labels, canonicalized with the packaging_labels taxonomy (e.g. \"en:FSC, fr:Encre végétale\")"
                    }
                  }
                }
              },
              "packagings_add": {
                "type": "array",
                "x-stoplight": {
                  "id": "69xpogby1amz6"
                },
                "title": "Packagings (WRITE)",
                "description": "The packagings object is an array of individual packaging component objects.\n\nThe Packaging data document explains how packaging data is structured in Open Food Facts: https://openfoodfacts.github.io/openfoodfacts-server/dev/explain-packaging-data/",
                "examples": [],
                "items": {
                  "title": "Packaging component (WRITE)",
                  "x-stoplight": {
                    "id": "iacgfu9zaek8v"
                  },
                  "type": "object",
                  "description": "Each packaging component has different properties to specify how many there are, its shape, material etc.\n\nThe shape, material and recycling properties will be mapped to one entry in the packaging_shapes, packaging_materials and packaging_recycling taxonomies.\n\nFor input, clients can either pass the id of a corresponding taxonomy entry (e.g. \"en:pizza-box\"), or a free text value prefixed with the language code of the text (e.g. \"en:Pizza box\", \"fr:boite à pizza\"). If the language code prefix is missing, the value of the \"lc\" field of the query will be used.\n\nThe resulting structure will contain the id of the canonical entry in the taxonomy if it good be matched, or the free text value prefixed with the language code otherwise.\n\nFor weights, the API is expecting a number with the number of grams. If a string is passed instead of a number, we will attempt to convert it to grams. The string may contain units (e.g. \"6.9 g\"), and use . or , as the decimal separator. Conversion may not work for all inputs. If a string was converted to a number, the API response will include a warning and specify the converted value.",
                  "examples": [
                    {
                      "number_of_units": 6,
                      "shape": {
                        "id": "en:bottle"
                      },
                      "material": {
                        "id": "en:plastic"
                      },
                      "recycling": {
                        "id": "en:recycle"
                      },
                      "quantity_per_unit": "25 cl",
                      "weight_measured": 10
                    }
                  ],
                  "properties": {
                    "number_of_units": {
                      "type": "integer",
                      "description": "Number of units of this packaging component contained in the product (e.g. 6 for a pack of 6 bottles)"
                    },
                    "shape": {
                      "title": "Packaging component shape (WRITE)",
                      "x-stoplight": {
                        "id": "yi44igltu79cl"
                      },
                      "description": "The shape property is canonicalized using the packaging_shapes taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "material": {
                      "title": "Packaging component material (WRITE)",
                      "x-stoplight": {
                        "id": "vgm9p553p4vd9"
                      },
                      "description": "The material property is canonicalized using the packaging_materials taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "recycling": {
                      "title": "Packaging component recycling instruction (WRITE)",
                      "x-stoplight": {
                        "id": "72oyv89xtgc2n"
                      },
                      "description": "The recycling property is canonicalized using the packaging_recycling taxonomy.",
                      "examples": [
                        {
                          "id": "string"
                        },
                        {
                          "lc_name": "bouteille"
                        }
                      ],
                      "anyOf": [
                        {
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Canonical id of the entry in the taxonomy. If the value cannot be mapped to a taxonomy entry, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        },
                        {
                          "properties": {
                            "lc_name": {
                              "type": "string",
                              "description": "Name of the entry in the language specified in the tags_lc field of the request. If the translation is not available, the value must be the name of the entry in its original language prefixed by the language 2 letter code and a colon."
                            }
                          }
                        }
                      ],
                      "type": "object"
                    },
                    "quantity_per_unit": {
                      "type": "string",
                      "description": "Quantity (weight or volume) of food product contained in the packaging component. (e.g. 75cl for a wine bottle)"
                    },
                    "weight_specified": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Weight (as specified by the manufacturer) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component). If passed a string - possibly with an unit - it will be converted to a number."
                    },
                    "weight_measured": {
                      "type": [
                        "number",
                        "string"
                      ],
                      "description": "Weight (as measured by one or more users) of one unit of the empty packaging component (in grams). (e.g. for a 6 pack of 1.5l water bottles, it might be 30, the weight in grams of 1 empty water bottle without its cap which is a different packaging component). If passed a string - possibly with an unit - it will be converted to a number."
                    },
                    "brands": {
                      "type": "string",
                      "description": "A comma separated list of brands / product names for the packaging component (e.g. \"Tetra Pak\", Tetra Brik\""
                    },
                    "labels": {
                      "type": "string",
                      "description": "A comma separated list of labels, canonicalized with the packaging_labels taxonomy (e.g. \"en:FSC, fr:Encre végétale\")"
                    }
                  }
                }
              },
              "packagings_complete": {
                "title": "packagings_complete",
                "type": "integer",
                "minimum": 0,
                "maximum": 1,
                "description": "Indicate if the packagings array contains all the packaging parts of the product. This field can be set by users when they enter or verify packaging data. Possible values are 0 or 1."
              },
              "lang": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2,
                "example": "fr",
                "description": "2 letter language code of the main language of the product (the most prominent on the packaging)"
              },
              "quantity": {
                "type": "string"
              },
              "serving_size": {
                "type": "string"
              },
              "images": {
                "type": "object",
                "properties": {
                  "selected": {
                    "description": "Images with specific information (e.g. front, ingredients, nutrition, packaging) for specific languages.\nEach selected image is a cropped version of an uploaded image.\n",
                    "type": "object",
                    "title": "Selected images",
                    "properties": {
                      "front": {
                        "description": "Front images of the full product in languages shown on the packaging.\nIn most cases we have a front image selected for only one language,\nunless the product has different packagings for different countries with the same barcode,\nor if the product has two front sides (e.g. in bilingual countries).\n",
                        "patternProperties": {
                          "(?<language_code>\\w\\w)": {
                            "oneOf": [
                              {
                                "type": "object",
                                "description": "Front image in the language given by the 2 letter \'language_code\'.\n",
                                "title": "Selected image",
                                "properties": {
                                  "imgid": {
                                    "type": "integer",
                                    "example": 12,
                                    "description": "The imgid of the original/source image edited (rotated, cropped, normalized etc) to produce the selected image.\nWhen uploading a new image and selecting it, the imgid will be automatically assigned by the server, and this field should not be passed.\nWhen selecting a previously uploaded image, the imgid must be passed to identify the source image.\n"
                                  },
                                  "rev": {
                                    "type": "integer",
                                    "example": 65,
                                    "description": "The revision number of the product when the image was selected.",
                                    "readOnly": true
                                  },
                                  "generation": {
                                    "type": "object",
                                    "description": "Properties to specify if the image is cropped, rotated, normalized or with the white background removed.\n",
                                    "properties": {
                                      "angle": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "The angle of the image rotation (if it was rotated). Only supported values are 0, 90, 180, 270."
                                      },
                                      "coordinates_image_size": {
                                        "type": "string",
                                        "description": "Possible values are \"full\" or \"400\". Indicates if the crop coordinates are relative to the full image, or to a resized version (max width and max height = 400)",
                                        "example": "full"
                                      },
                                      "normalize": {
                                        "type": "boolean",
                                        "description": "Normalize colors. Default is false."
                                      },
                                      "white_magic": {
                                        "type": "boolean",
                                        "description": "Try to remove the background for photos taken on a white background. Default is false.\n"
                                      },
                                      "x1": {
                                        "type": "integer",
                                        "description": "The x coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "x2": {
                                        "type": "string",
                                        "description": "The x coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y1": {
                                        "type": "string",
                                        "description": "The y coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y2": {
                                        "type": "string",
                                        "description": "The y coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image. \n"
                                      }
                                    }
                                  },
                                  "sizes": {
                                    "readOnly": true,
                                    "title": "Images Sizes",
                                    "type": "object",
                                    "description": "Contains the information about the images of a product in different sizes.\nThe reduced images are the ones with numbers as the key(100, 200 and 400)\nwhile the full images have `full` as the key.\n",
                                    "properties": {
                                      "100": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "200": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "400": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "full": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null",
                                "writeOnly": true,
                                "description": "Write only value to unselect a selected image\n"
                              }
                            ]
                          }
                        }
                      },
                      "ingredients": {
                        "description": "Cropped images of the ingredients list in languages shown on the packaging.\n",
                        "patternProperties": {
                          "(?<language_code>\\w\\w)": {
                            "oneOf": [
                              {
                                "type": "object",
                                "description": "Ingredient list image in the language given by the 2 letter \'language_code\'.\n",
                                "title": "Selected image",
                                "properties": {
                                  "imgid": {
                                    "type": "integer",
                                    "example": 12,
                                    "description": "The imgid of the original/source image edited (rotated, cropped, normalized etc) to produce the selected image.\nWhen uploading a new image and selecting it, the imgid will be automatically assigned by the server, and this field should not be passed.\nWhen selecting a previously uploaded image, the imgid must be passed to identify the source image.\n"
                                  },
                                  "rev": {
                                    "type": "integer",
                                    "example": 65,
                                    "description": "The revision number of the product when the image was selected.",
                                    "readOnly": true
                                  },
                                  "generation": {
                                    "type": "object",
                                    "description": "Properties to specify if the image is cropped, rotated, normalized or with the white background removed.\n",
                                    "properties": {
                                      "angle": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "The angle of the image rotation (if it was rotated). Only supported values are 0, 90, 180, 270."
                                      },
                                      "coordinates_image_size": {
                                        "type": "string",
                                        "description": "Possible values are \"full\" or \"400\". Indicates if the crop coordinates are relative to the full image, or to a resized version (max width and max height = 400)",
                                        "example": "full"
                                      },
                                      "normalize": {
                                        "type": "boolean",
                                        "description": "Normalize colors. Default is false."
                                      },
                                      "white_magic": {
                                        "type": "boolean",
                                        "description": "Try to remove the background for photos taken on a white background. Default is false.\n"
                                      },
                                      "x1": {
                                        "type": "integer",
                                        "description": "The x coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "x2": {
                                        "type": "string",
                                        "description": "The x coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y1": {
                                        "type": "string",
                                        "description": "The y coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y2": {
                                        "type": "string",
                                        "description": "The y coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image. \n"
                                      }
                                    }
                                  },
                                  "sizes": {
                                    "readOnly": true,
                                    "title": "Images Sizes",
                                    "type": "object",
                                    "description": "Contains the information about the images of a product in different sizes.\nThe reduced images are the ones with numbers as the key(100, 200 and 400)\nwhile the full images have `full` as the key.\n",
                                    "properties": {
                                      "100": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "200": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "400": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "full": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null",
                                "writeOnly": true,
                                "description": "Write only value to unselect a selected image              \n"
                              }
                            ]
                          }
                        }
                      },
                      "nutrition": {
                        "description": "Cropped images of the nutrition facts table / list in languages shown on the packaging.\n",
                        "patternProperties": {
                          "(?<language_code>\\w\\w)": {
                            "oneOf": [
                              {
                                "type": "object",
                                "description": "Nutrition facts image in the language given by the 2 letter \'language_code\'.\n",
                                "title": "Selected image",
                                "properties": {
                                  "imgid": {
                                    "type": "integer",
                                    "example": 12,
                                    "description": "The imgid of the original/source image edited (rotated, cropped, normalized etc) to produce the selected image.\nWhen uploading a new image and selecting it, the imgid will be automatically assigned by the server, and this field should not be passed.\nWhen selecting a previously uploaded image, the imgid must be passed to identify the source image.\n"
                                  },
                                  "rev": {
                                    "type": "integer",
                                    "example": 65,
                                    "description": "The revision number of the product when the image was selected.",
                                    "readOnly": true
                                  },
                                  "generation": {
                                    "type": "object",
                                    "description": "Properties to specify if the image is cropped, rotated, normalized or with the white background removed.\n",
                                    "properties": {
                                      "angle": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "The angle of the image rotation (if it was rotated). Only supported values are 0, 90, 180, 270."
                                      },
                                      "coordinates_image_size": {
                                        "type": "string",
                                        "description": "Possible values are \"full\" or \"400\". Indicates if the crop coordinates are relative to the full image, or to a resized version (max width and max height = 400)",
                                        "example": "full"
                                      },
                                      "normalize": {
                                        "type": "boolean",
                                        "description": "Normalize colors. Default is false."
                                      },
                                      "white_magic": {
                                        "type": "boolean",
                                        "description": "Try to remove the background for photos taken on a white background. Default is false.\n"
                                      },
                                      "x1": {
                                        "type": "integer",
                                        "description": "The x coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "x2": {
                                        "type": "string",
                                        "description": "The x coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y1": {
                                        "type": "string",
                                        "description": "The y coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y2": {
                                        "type": "string",
                                        "description": "The y coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image. \n"
                                      }
                                    }
                                  },
                                  "sizes": {
                                    "readOnly": true,
                                    "title": "Images Sizes",
                                    "type": "object",
                                    "description": "Contains the information about the images of a product in different sizes.\nThe reduced images are the ones with numbers as the key(100, 200 and 400)\nwhile the full images have `full` as the key.\n",
                                    "properties": {
                                      "100": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "200": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "400": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "full": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null",
                                "writeOnly": true,
                                "description": "Write only value to unselect a selected image\n"
                              }
                            ]
                          }
                        }
                      },
                      "packaging": {
                        "description": "Cropped images of the packaging / recycling information in languages shown on the packaging.\n",
                        "patternProperties": {
                          "(?<language_code>\\w\\w)": {
                            "oneOf": [
                              {
                                "type": "object",
                                "description": "Packaging / recycling information image in the language given by the 2 letter \'language_code\'.\n",
                                "title": "Selected image",
                                "properties": {
                                  "imgid": {
                                    "type": "integer",
                                    "example": 12,
                                    "description": "The imgid of the original/source image edited (rotated, cropped, normalized etc) to produce the selected image.\nWhen uploading a new image and selecting it, the imgid will be automatically assigned by the server, and this field should not be passed.\nWhen selecting a previously uploaded image, the imgid must be passed to identify the source image.\n"
                                  },
                                  "rev": {
                                    "type": "integer",
                                    "example": 65,
                                    "description": "The revision number of the product when the image was selected.",
                                    "readOnly": true
                                  },
                                  "generation": {
                                    "type": "object",
                                    "description": "Properties to specify if the image is cropped, rotated, normalized or with the white background removed.\n",
                                    "properties": {
                                      "angle": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "The angle of the image rotation (if it was rotated). Only supported values are 0, 90, 180, 270."
                                      },
                                      "coordinates_image_size": {
                                        "type": "string",
                                        "description": "Possible values are \"full\" or \"400\". Indicates if the crop coordinates are relative to the full image, or to a resized version (max width and max height = 400)",
                                        "example": "full"
                                      },
                                      "normalize": {
                                        "type": "boolean",
                                        "description": "Normalize colors. Default is false."
                                      },
                                      "white_magic": {
                                        "type": "boolean",
                                        "description": "Try to remove the background for photos taken on a white background. Default is false.\n"
                                      },
                                      "x1": {
                                        "type": "integer",
                                        "description": "The x coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "x2": {
                                        "type": "string",
                                        "description": "The x coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y1": {
                                        "type": "string",
                                        "description": "The y coordinate of the top left corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image.\n"
                                      },
                                      "y2": {
                                        "type": "string",
                                        "description": "The y coordinate of the bottom right corner of the area of interest.\nIf the image is rotated, the coordinates are relative to the rotated image. \n"
                                      }
                                    }
                                  },
                                  "sizes": {
                                    "readOnly": true,
                                    "title": "Images Sizes",
                                    "type": "object",
                                    "description": "Contains the information about the images of a product in different sizes.\nThe reduced images are the ones with numbers as the key(100, 200 and 400)\nwhile the full images have `full` as the key.\n",
                                    "properties": {
                                      "100": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "200": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "400": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      },
                                      "full": {
                                        "title": "Image Size",
                                        "type": "object",
                                        "description": "Contains the information (width, height and URL) about an image in a specific size.\nThe URL is generated at runtime if the `generate_images_urls` parameter is set to true.\n",
                                        "properties": {
                                          "h": {
                                            "type": "integer",
                                            "example": 400,
                                            "description": "The height of the reduced/full image in pixels.\n"
                                          },
                                          "w": {
                                            "type": "integer",
                                            "example": 255,
                                            "description": "The width of the reduced/full image in pixels.\n"
                                          },
                                          "url": {
                                            "type": "string",
                                            "example": "https://static.openfoodfacts.org/images/products/000/000/000/0000/400.jpg",
                                            "description": "The URL of the image. This property is generated at runtime if the generate_images_urls parameter is set to true.\n"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null",
                                "writeOnly": true,
                                "description": "Write only value to unselect a selected image\n"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      }
    }
  }'

{
  "status": "success_with_errors",
  "result": {
    "id": "en:product-updated",
    "en_name": "Product updated",
    "lc_name": "Produit mis à jour"
  },
  "errors": [
    {
      "message": {
        "id": "en: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": "en: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."
      }
    }
  ],
  "product": {
    "packagings": [
      {
        "material": "en:pp-polypropylene",
        "number": "2",
        "recycling": "en:discard",
        "shape": "en:lid"
      },
      {
        "material": "en:non-corrugated-cardboard",
        "number": "1",
        "recycling": "en:recycle",
        "shape": "en:box",
        "weight": 120
      },
      {
        "material": "en:paper-and-fibreboard-aluminium",
        "number": "2",
        "recycling": "en:recycle",
        "shape": "en:seal"
      },
      {
        "material": "en:clear-glass",
        "number": "2",
        "recycling": "en:recycle",
        "shape": "en:jar",
        "quantity": "200 ML",
        "quantity_value": 200,
        "quantity_unit": "ml",
        "weight": 80
      }
    ]
  }
}