Product-Metadata Schema

Schema definition for the Product-Metadata object in product data

Product-Metadata Schema

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

{
  "type": "object",
  "description": "Metadata of a product (author, editors, creation date, etc.)\n",
  "required": [
    "created_t",
    "creator",
    "last_modified_by",
    "last_modified_t",
    "last_updated_t",
    "rev"
  ],
  "properties": {
    "created_t": {
      "type": "integer",
      "description": "Date when the product was added (UNIX timestamp format).\nSee also `entry_dates_tags`\n",
      "example": 1457680652
    },
    "creator": {
      "type": "string",
      "description": "The contributor who added the product first.\n"
    },
    "editors_tags": {
      "description": "List of editors who edited the product.\n",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "informers_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "interface_version_created": {
      "type": "string"
    },
    "interface_version_modified": {
      "type": "string"
    },
    "languages": {
      "type": "object",
      "patternProperties": {
        "en:(?<language_name>\\w\\w)": {
          "type": "integer",
          "description": "**TODO** explain !\n"
        }
      }
    },
    "languages_codes": {
      "type": "object",
      "patternProperties": {
        "(?<language_code>\\w\\w)": {
          "type": "integer"
        }
      },
      "description": "Same as `languages` but by language code, instead of language tags\n"
    },
    "languages_hierarchy": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "languages_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "last_edit_dates_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "last_editor": {
      "type": "string"
    },
    "last_modified_by": {
      "type": "string",
      "description": "The username of the user who last modified the product.\n",
      "example": "sebleouf"
    },
    "last_modified_t": {
      "type": "integer",
      "description": "Date when the product page was last modified.\nThis date is updated only when primary data is modified (data entered by the user or updated by an interface)\n"
    },
    "last_updated_t": {
      "type": "integer",
      "description": "Date when the product page was last modified.\nThis date is updated when primary data or secondary data is modified\n(primary: data entered by a user or read from an interface, secondary: data computed by a utility\nsuch as update_all_products.pl)\n"
    },
    "owner": {
      "description": "Id of the producer in case he provides his own data about a product (producer platform).\n",
      "type": "string"
    },
    "owners_tags": {
      "description": "Tagyfied version of owner\n",
      "type": "string"
    },
    "photographers_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "rev": {
      "description": "revision number of this product version (each edit adds a revision)",
      "type": "integer"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "product_meta_source",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "import_t": {
            "type": "integer"
          },
          "manufacturer": {
            "type": [
              "integer",
              "string"
            ]
          },
          "name": {
            "type": "string"
          },
          "source_licence": {
            "type": "string"
          },
          "source_licence_url": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    },
    "sources_fields": {
      "type": "object",
      "title": "product_meta_source_fields",
      "properties": {
        "org-gs1": {
          "type": "object",
          "properties": {
            "gln": {
              "type": "string"
            },
            "gpcCategoryCode": {
              "type": "string"
            },
            "gpcCategoryName": {
              "type": "string"
            },
            "isAllergenRelevantDataProvided": {
              "type": "string"
            },
            "lastChangeDateTime": {
              "type": "string"
            },
            "partyName": {
              "type": "string"
            },
            "productionVariantDescription": {
              "type": "string"
            },
            "publicationDateTime": {
              "type": "string"
            }
          }
        }
      }
    },
    "teams": {
      "type": "string"
    },
    "teams_tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "update_key": {
      "type": "string"
    }
  }
}