---
title: "Revert Product to Previous Revision"
method: POST
path: "/api/v3/product_revert"
tags: ["Products"]
---

# Revert Product to Previous Revision

`POST /api/v3/product_revert`

## Request

- Base URL: `https://world.openfoodfacts.org`
- URL: `https://world.openfoodfacts.org/api/v3/product_revert`
- Auth: API key in cookie `session` and API key in header `User-Agent`

For moderators only, revert a product to a previous revision.

## Request body

- object
  - `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.
  - `code` string: Barcode of the product
  - `rev` integer: Revision number to revert to

## Response `200`

OK

- ResponseStatus: A response object to describe if a READ or WRITE request was successful or not, and if there were errors or warnings, and what the impact of those errors or warnings was.
  - `status` 'success' | 'success_with_warnings' | 'success_with_errors' | 'failure': Overall status of the request: whether it failed or succeeded, with or without warnings or errors.
  - `result` object: Overall result of the request (e.g. a product has been created)
    - `id` string: Identifier of a response result entry
    - `name` string: Name of the response result entry in English.
    - `lc_name` string: Name of the response result entry in the language specified in tags_lc, if supplied.
  - `warnings` WarningOrError[]: List of warnings. Warnings are used to alert about something that may be wrong, but is not necessarily wrong (e.g. a nutrient value that is unexpectedly high).
    - `message` object
      - `id` string: Identifier of a response message.
      - `name` string: Name of the response message entry in English.
      - `lc_name` string: Name of the response message entry in the language specified in tags_lc, if supplied.
      - `description` string: Description of the problem specific to the request, in English.
      - `lc_description` string: Description of the problem specific to the request, in the language specified in tags_lc, if supplied.
    - `field` object: Field that triggered the warning or error.
      - `id` string: Name of the field that triggered the warning or error.
      - `value` string: Value of the field that triggered the warning or error.
    - `impact` object
      - `id` string
      - `name` string
      - `lc_name` string
      - `description` string
      - `lc_description` string
  - `errors` WarningOrError[]: List of errors. Errors are used to alert about something that is definitely wrong (e.g. a nutrient value that is impossibly high).
    - `message` object
      - `id` string: Identifier of a response message.
      - `name` string: Name of the response message entry in English.
      - `lc_name` string: Name of the response message entry in the language specified in tags_lc, if supplied.
      - `description` string: Description of the problem specific to the request, in English.
      - `lc_description` string: Description of the problem specific to the request, in the language specified in tags_lc, if supplied.
    - `field` object: Field that triggered the warning or error.
      - `id` string: Name of the field that triggered the warning or error.
      - `value` string: Value of the field that triggered the warning or error.
    - `impact` object
      - `id` string
      - `name` string
      - `lc_name` string
      - `description` string
      - `lc_description` string

## Changes

- **2026-11-18** (v3) `ab04ff78cb83`: 1 breaking, 1 warning, 2 info
  - added `#/components/schemas/fields_tags_lc` to the request body `allOf` list
  - removed `#/components/schemas/fields_tags_lc.yaml` from the request body `allOf` list
  - added `#/components/schemas/response_status` to the response body `allOf` list for the response status `200`
  - removed `#/components/schemas/response_status.yaml` from the response body `allOf` list for the response status `200`
- **2025-11-05** (v3) `7138bb1b2d36`: 1 info
  - the endpoint scheme security `cookieAuth AND userAgentAuth` was added to the API
- **2025-07-02** (v3) `a82fb856bebd`: 2 info
  - api tag `Products` added
  - api tag `Write Requests` removed

[Operation history](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api-v3-under-development/changes/api/v3/product_revert/post.md)

---

[API](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api-v3-under-development.md) - [All operations](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api-v3-under-development/llms.txt) - [OpenAPI document](https://skmtc.dev/openfoodfacts/apis/open-food-facts-open-api-v3-under-development/revisions/ab04ff78cb83?raw)
