Product-Tags Schema

Schema definition for the Product-Tags object in product data

Product-Tags Schema

This is a data schema, not an API endpoint. The Product-Tags object describes the shape of data returned inside product records by the Product Opener API.

{
  "type": "object",
  "description": "Data about a product which is represented as tags\n",
  "allOf": [
    {
      "type": "object",
      "title": "Product Base Tags",
      "properties": {
        "brands": {
          "type": "string",
          "description": "Comma separated list of brands (not taxonomized), in the last language used to edit it (recorded in brands_lc)\nThis field is mostly used for debugging and testing purposes. Do not use it for display purposes.\n"
        },
        "brands_tags": {
          "type": "array",
          "description": "An array of indexed brands tag entries (for search).\n\nThat is the id of brands found in taxonomy + \nbrands not found in taxonomy (with case / accents / spaces normalized).\n\nThis is mostly used for search as the normalization of entries not in the taxonomy is lossy.\n",
          "items": {
            "title": "Indexed taxonomy tag entry (lossy, for search only)",
            "type": "string",
            "description": "This field is used for search only. It is a lossy representation of the taxonomy tag entry, that can be used to index the entry in a search engine.\nA tag entry, that has been 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\") -> for entries that could be matched to a taxonomy entry\n- a string in a specific language, prefixed by the 2 letter language code, and normalized (deaccented and lowercased, depending on language)\n(e.g. \"fr:thes-verts\") -> for entries that could not be matched to a taxonomy entry"
          }
        },
        "categories": {
          "type": "string",
          "description": "Comma separated list of categories (not taxonomized), in the last language used to edit it (recorded in categories_lc)\nThis field is mostly used for debugging and testing purposes. Do not use it for display purposes.\n"
        },
        "categories_tags": {
          "type": "array",
          "description": "An array of indexed categories tag entries (for search).\n\nThat is the id of categories found in taxonomy + \ncategories not found in taxonomy (with case / accents / spaces normalized).\n\nThis is mostly used for search as the normalization of entries not in the taxonomy is lossy.\n",
          "items": {
            "title": "Indexed taxonomy tag entry (lossy, for search only)",
            "type": "string",
            "description": "This field is used for search only. It is a lossy representation of the taxonomy tag entry, that can be used to index the entry in a search engine.\nA tag entry, that has been 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\") -> for entries that could be matched to a taxonomy entry\n- a string in a specific language, prefixed by the 2 letter language code, and normalized (deaccented and lowercased, depending on language)\n(e.g. \"fr:thes-verts\") -> for entries that could not be matched to a taxonomy entry"
          }
        },
        "checkers_tags": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "List of checkers (users who checked the product) tags"
          }
        },
        "cities": {
          "type": "string"
        },
        "cities_tags": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "correctors_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "countries": {
          "type": "string",
          "description": "List of countries where the product is sold.\n"
        },
        "countries_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ecoscore_tags": {
          "description": "All ecoscore of a product.\nMost of the time it's only one value,\nbut it might eventually be more for products composed of sub-products.\nSee also: `ecoscore_score`, `ecoscore_grade`.\n",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "emb_codes": {
          "type": "string",
          "description": "Packager code. EMB is the French system of traceability codes for packager.\n",
          "example": "EMB 2013330"
        },
        "emb_codes_tags": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "labels": {
          "type": "string"
        },
        "labels_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "entry_dates_tags": {
          "description": "The data as a series of tag: `yyyy-mm-dd`, `yyyy-mm`, `yyyy`\n",
          "type": "array",
          "items": {
            "type": "string"
          },
          "examples": [
            [
              "2016-03-11",
              "2016-03",
              "2016"
            ]
          ]
        },
        "manufacturing_places": {
          "type": "string",
          "description": "Places where the product was manufactured or transformed.\n"
        },
        "manufacturing_places_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "nova_groups_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "nutrient_levels_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "brands_hierarchy": {
          "type": "array",
          "description": "An array of brands tag entries (for display and editing).\n\nThat is the id of brands found in taxonomy + \nbrands not found in taxonomy (as-is, with no normalization).\n\nThis is the field that should be used for display purposes, as it is not lossy.\n",
          "items": {
            "title": "Canonicalized taxonomy tag entry",
            "type": "string",
            "description": "A tag entry, that has been 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\") -> for entries that could be matched to a taxonomy entry\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\") -> for entries that could not be matched to a taxonomy entry"
          }
        },
        "brands_lc": {
          "type": "string",
          "description": "Language code of the last edit for brands"
        },
        "categories_hierarchy": {
          "type": "array",
          "description": "An array of categories tag entries (for display and editing).\n\nThat is the id of categories found in taxonomy + \ncategories not found in taxonomy (as-is, with no normalization).\n\nThis is the field that should be used for display purposes, as it is not lossy.\n",
          "items": {
            "title": "Canonicalized taxonomy tag entry",
            "type": "string",
            "description": "A tag entry, that has been 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\") -> for entries that could be matched to a taxonomy entry\n- a string in a specific language, prefixed by the 2 letter language code (e.g. \"fr:Thés verts\") -> for entries that could not be matched to a taxonomy entry"
          }
        },
        "categories_lc": {
          "type": "string",
          "description": "Language code of the last edit for categories"
        },
        "countries_hierarchy": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "countries_lc": {
          "type": "string",
          "description": "Countries language code"
        },
        "emb_codes_orig": {
          "type": "string"
        },
        "labels_hierarchy": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "labels_lc": {
          "type": "string"
        }
      }
    }
  ]
}