{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "brand": {
      "type": ["string", "null"]
    },
    "variant": {
      "type": ["string", "null"]
    },
    "category": {
      "type": ["string", "null"]
    },
    "gtin": {
      "type": ["string", "null"]
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "versus": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "verdict": {
              "type": ["string", "null"]
            },
            "meta": {
              "type": "object",
              "properties": {
                "created_at": {
                  "type": ["string", "null"]
                },
                "updated_at": {
                  "type": ["string", "null"]
                },
                "deleted_at": {
                  "type": ["string", "null"]
                },
                "legacy_ref": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "table": {
                          "type": "string"
                        },
                        "key": {
                          "type": ["string", "number"]
                        },
                        "row": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": ["table", "key", "row"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dataset": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["versus", "verdict"],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "pros": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "cons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "grocery": {
      "type": "boolean"
    },
    "evidence": {
      "type": "object",
      "properties": {
        "quote": {
          "type": "string",
          "minLength": 1
        },
        "intent": {
          "type": "string",
          "enum": ["recommended", "compared", "shopping_list", "product_page", "incidental"]
        },
        "specific": {
          "type": "boolean"
        },
        "meta": {
          "type": "object",
          "properties": {
            "created_at": {
              "type": ["string", "null"]
            },
            "updated_at": {
              "type": ["string", "null"]
            },
            "deleted_at": {
              "type": ["string", "null"]
            },
            "legacy_ref": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "table": {
                      "type": "string"
                    },
                    "key": {
                      "type": ["string", "number"]
                    },
                    "row": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": ["table", "key", "row"],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "dataset": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "required": ["quote", "intent", "specific"],
      "additionalProperties": false
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 5000
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "amount_decimal": {
              "type": "string",
              "pattern": "^\\d+(?:\\.\\d{1,4})?$"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "meta": {
              "type": "object",
              "properties": {
                "created_at": {
                  "type": ["string", "null"]
                },
                "updated_at": {
                  "type": ["string", "null"]
                },
                "deleted_at": {
                  "type": ["string", "null"]
                },
                "legacy_ref": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "table": {
                          "type": "string"
                        },
                        "key": {
                          "type": ["string", "number"]
                        },
                        "row": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": ["table", "key", "row"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dataset": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["amount_decimal", "currency"],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_image": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "resolution": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": ["matched", "unresolved", "disabled", "ambiguous", "unavailable"]
            },
            "confidence": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "attribution": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "license": {
                    "type": "string"
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                  },
                  "meta": {
                    "type": "object",
                    "properties": {
                      "created_at": {
                        "type": ["string", "null"]
                      },
                      "updated_at": {
                        "type": ["string", "null"]
                      },
                      "deleted_at": {
                        "type": ["string", "null"]
                      },
                      "legacy_ref": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string"
                              },
                              "key": {
                                "type": ["string", "number"]
                              },
                              "row": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": ["table", "key", "row"],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataset": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["provider", "url", "license", "observed_at", "id"],
                "additionalProperties": false
              }
            },
            "candidates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                  },
                  "title": {
                    "type": "string"
                  },
                  "creators": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "year": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "confidence": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "meta": {
                    "type": "object",
                    "properties": {
                      "created_at": {
                        "type": ["string", "null"]
                      },
                      "updated_at": {
                        "type": ["string", "null"]
                      },
                      "deleted_at": {
                        "type": ["string", "null"]
                      },
                      "legacy_ref": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string"
                              },
                              "key": {
                                "type": ["string", "number"]
                              },
                              "row": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": ["table", "key", "row"],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataset": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["id", "title", "creators", "year", "confidence"],
                "additionalProperties": false
              }
            },
            "meta": {
              "type": "object",
              "properties": {
                "created_at": {
                  "type": ["string", "null"]
                },
                "updated_at": {
                  "type": ["string", "null"]
                },
                "deleted_at": {
                  "type": ["string", "null"]
                },
                "legacy_ref": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "table": {
                          "type": "string"
                        },
                        "key": {
                          "type": ["string", "number"]
                        },
                        "row": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": ["table", "key", "row"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dataset": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": ["status", "confidence", "attribution", "candidates"],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "seller_links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "merchant": {
            "type": "string"
          },
          "affiliate": {
            "type": "boolean"
          },
          "kind": {
            "type": "string",
            "enum": ["search", "exact"]
          },
          "listing_id": {
            "type": ["string", "null"]
          },
          "title": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["url", "merchant", "affiliate", "kind", "title", "id"],
        "additionalProperties": false
      }
    },
    "purchase_link": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "merchant": {
          "type": "string"
        },
        "affiliate": {
          "type": "boolean"
        },
        "meta": {
          "type": "object",
          "properties": {
            "created_at": {
              "type": ["string", "null"]
            },
            "updated_at": {
              "type": ["string", "null"]
            },
            "deleted_at": {
              "type": ["string", "null"]
            },
            "legacy_ref": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "table": {
                      "type": "string"
                    },
                    "key": {
                      "type": ["string", "number"]
                    },
                    "row": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": ["table", "key", "row"],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "dataset": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "required": ["url", "merchant", "affiliate"],
      "additionalProperties": false
    },
    "model": {
      "type": ["string", "null"]
    },
    "mpn": {
      "type": ["string", "null"]
    },
    "gtin14": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\d{14}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "item_level": {
      "type": "string",
      "enum": ["brand", "product"]
    },
    "identity_status": {
      "type": "string",
      "enum": ["source_only", "confirmed", "candidate", "conflict"]
    },
    "variant_key": {
      "type": "string"
    },
    "family_ref": {
      "type": ["string", "null"]
    },
    "attributes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "value": {
            "type": "string",
            "maxLength": 1000
          },
          "unit": {
            "type": ["string", "null"]
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["key", "label", "value", "unit", "id"],
        "additionalProperties": false
      }
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "maxLength": 100
                },
                "label": {
                  "type": "string",
                  "maxLength": 200
                },
                "value": {
                  "type": "string",
                  "maxLength": 1000
                },
                "unit": {
                  "type": ["string", "null"]
                },
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
                },
                "meta": {
                  "type": "object",
                  "properties": {
                    "created_at": {
                      "type": ["string", "null"]
                    },
                    "updated_at": {
                      "type": ["string", "null"]
                    },
                    "deleted_at": {
                      "type": ["string", "null"]
                    },
                    "legacy_ref": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "table": {
                              "type": "string"
                            },
                            "key": {
                              "type": ["string", "number"]
                            },
                            "row": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": ["table", "key", "row"],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dataset": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": ["key", "label", "value", "unit", "id"],
              "additionalProperties": false
            }
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["key", "name", "attributes", "url", "id"],
        "additionalProperties": false
      }
    },
    "specs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "maxLength": 100
          },
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "value": {
            "type": "string",
            "maxLength": 1000
          },
          "unit": {
            "type": ["string", "null"]
          },
          "evidence": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "observed_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terms_url": {
                "type": "string",
                "format": "uri"
              },
              "license": {
                "type": "string"
              },
              "attribution": {
                "type": "string"
              },
              "export_policy": {
                "type": "string",
                "enum": ["allow", "attributed", "omit"]
              },
              "meta": {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": ["string", "null"]
                  },
                  "updated_at": {
                    "type": ["string", "null"]
                  },
                  "deleted_at": {
                    "type": ["string", "null"]
                  },
                  "legacy_ref": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "table": {
                            "type": "string"
                          },
                          "key": {
                            "type": ["string", "number"]
                          },
                          "row": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["table", "key", "row"],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dataset": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "source",
              "source_url",
              "observed_at",
              "expires_at",
              "terms_url",
              "license",
              "attribution",
              "export_policy"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["key", "label", "value", "unit", "evidence", "id"],
        "additionalProperties": false
      }
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": ["product", "source"]
          },
          "variant_key": {
            "type": "string"
          },
          "storage_policy": {
            "type": "string",
            "const": "remote_only"
          },
          "display_permitted": {
            "type": "boolean"
          },
          "evidence": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "observed_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terms_url": {
                "type": "string",
                "format": "uri"
              },
              "license": {
                "type": "string"
              },
              "attribution": {
                "type": "string"
              },
              "export_policy": {
                "type": "string",
                "enum": ["allow", "attributed", "omit"]
              },
              "meta": {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": ["string", "null"]
                  },
                  "updated_at": {
                    "type": ["string", "null"]
                  },
                  "deleted_at": {
                    "type": ["string", "null"]
                  },
                  "legacy_ref": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "table": {
                            "type": "string"
                          },
                          "key": {
                            "type": ["string", "number"]
                          },
                          "row": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["table", "key", "row"],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dataset": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "source",
              "source_url",
              "observed_at",
              "expires_at",
              "terms_url",
              "license",
              "attribution",
              "export_policy"
            ],
            "additionalProperties": false
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["url", "alt", "role", "variant_key", "storage_policy", "display_permitted", "evidence", "id"],
        "additionalProperties": false
      }
    },
    "offers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "merchant": {
            "type": "string"
          },
          "seller": {
            "type": ["string", "null"]
          },
          "provider": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "canonical_url": {
            "type": "string",
            "format": "uri"
          },
          "link_kind": {
            "type": "string",
            "const": "direct"
          },
          "affiliate": {
            "type": "boolean"
          },
          "price": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount_decimal": {
                    "type": "string",
                    "pattern": "^\\d+(?:\\.\\d{1,4})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "meta": {
                    "type": "object",
                    "properties": {
                      "created_at": {
                        "type": ["string", "null"]
                      },
                      "updated_at": {
                        "type": ["string", "null"]
                      },
                      "deleted_at": {
                        "type": ["string", "null"]
                      },
                      "legacy_ref": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string"
                              },
                              "key": {
                                "type": ["string", "number"]
                              },
                              "row": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": ["table", "key", "row"],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataset": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["amount_decimal", "currency"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "shipping": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount_decimal": {
                    "type": "string",
                    "pattern": "^\\d+(?:\\.\\d{1,4})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "meta": {
                    "type": "object",
                    "properties": {
                      "created_at": {
                        "type": ["string", "null"]
                      },
                      "updated_at": {
                        "type": ["string", "null"]
                      },
                      "deleted_at": {
                        "type": ["string", "null"]
                      },
                      "legacy_ref": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string"
                              },
                              "key": {
                                "type": ["string", "number"]
                              },
                              "row": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": ["table", "key", "row"],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataset": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["amount_decimal", "currency"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "tax": {
            "type": "string",
            "enum": ["included", "excluded", "unknown"]
          },
          "region": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_key": {
            "type": "string"
          },
          "variant_label": {
            "type": ["string", "null"]
          },
          "availability": {
            "type": "string",
            "enum": ["in_stock", "out_of_stock", "preorder", "backorder", "unknown"]
          },
          "condition": {
            "type": "string",
            "enum": ["new", "refurbished", "used", "unknown"]
          },
          "eligibility": {
            "type": "string",
            "enum": ["public", "member", "coupon", "unknown"]
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "evidence": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "source_url": {
                "type": "string",
                "format": "uri"
              },
              "observed_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "terms_url": {
                "type": "string",
                "format": "uri"
              },
              "license": {
                "type": "string"
              },
              "attribution": {
                "type": "string"
              },
              "export_policy": {
                "type": "string",
                "enum": ["allow", "attributed", "omit"]
              },
              "meta": {
                "type": "object",
                "properties": {
                  "created_at": {
                    "type": ["string", "null"]
                  },
                  "updated_at": {
                    "type": ["string", "null"]
                  },
                  "deleted_at": {
                    "type": ["string", "null"]
                  },
                  "legacy_ref": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "table": {
                            "type": "string"
                          },
                          "key": {
                            "type": ["string", "number"]
                          },
                          "row": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": ["table", "key", "row"],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dataset": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "source",
              "source_url",
              "observed_at",
              "expires_at",
              "terms_url",
              "license",
              "attribution",
              "export_policy"
            ],
            "additionalProperties": false
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "merchant",
          "seller",
          "provider",
          "url",
          "canonical_url",
          "link_kind",
          "affiliate",
          "price",
          "shipping",
          "tax",
          "region",
          "variant_key",
          "variant_label",
          "availability",
          "condition",
          "eligibility",
          "observed_at",
          "evidence"
        ],
        "additionalProperties": false
      }
    },
    "offer_checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "region": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["ok", "empty", "unavailable", "disabled"]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "complete": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": ["region", "source", "status", "checked_at", "expires_at", "complete", "id"],
        "additionalProperties": false
      }
    },
    "field_evidence": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "source_url": {
            "type": "string",
            "format": "uri"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "terms_url": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "export_policy": {
            "type": "string",
            "enum": ["allow", "attributed", "omit"]
          }
        },
        "required": [
          "source",
          "source_url",
          "observed_at",
          "expires_at",
          "terms_url",
          "license",
          "attribution",
          "export_policy"
        ],
        "additionalProperties": false
      }
    },
    "history_permitted": {
      "type": "boolean"
    },
    "price_observations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
          },
          "merchant": {
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount_decimal": {
                    "type": "string",
                    "pattern": "^\\d+(?:\\.\\d{1,4})?$"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "meta": {
                    "type": "object",
                    "properties": {
                      "created_at": {
                        "type": ["string", "null"]
                      },
                      "updated_at": {
                        "type": ["string", "null"]
                      },
                      "deleted_at": {
                        "type": ["string", "null"]
                      },
                      "legacy_ref": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string"
                              },
                              "key": {
                                "type": ["string", "number"]
                              },
                              "row": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": ["table", "key", "row"],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataset": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": ["amount_decimal", "currency"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_key": {
            "type": "string"
          },
          "availability": {
            "type": "string",
            "enum": ["in_stock", "out_of_stock", "preorder", "backorder", "unknown"]
          },
          "condition": {
            "type": "string",
            "enum": ["new", "refurbished", "used", "unknown"]
          },
          "eligibility": {
            "type": "string",
            "enum": ["public", "member", "coupon", "unknown"]
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "basis": {
            "type": "string",
            "const": "item_price"
          },
          "meta": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": ["string", "null"]
              },
              "updated_at": {
                "type": ["string", "null"]
              },
              "deleted_at": {
                "type": ["string", "null"]
              },
              "legacy_ref": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "table": {
                        "type": "string"
                      },
                      "key": {
                        "type": ["string", "number"]
                      },
                      "row": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": ["table", "key", "row"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dataset": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "merchant",
          "price",
          "region",
          "variant_key",
          "availability",
          "condition",
          "eligibility",
          "observed_at",
          "basis"
        ],
        "additionalProperties": false
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": ["string", "null"]
        },
        "updated_at": {
          "type": ["string", "null"]
        },
        "deleted_at": {
          "type": ["string", "null"]
        },
        "legacy_ref": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "table": {
                  "type": "string"
                },
                "key": {
                  "type": ["string", "number"]
                },
                "row": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": ["table", "key", "row"],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "dataset": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "name",
    "brand",
    "variant",
    "category",
    "gtin",
    "url",
    "comparison",
    "pros",
    "cons",
    "grocery",
    "evidence",
    "resolution",
    "offers"
  ],
  "additionalProperties": false,
  "$id": "https://sendtopigeon.com/schemas/product@1.schema.json",
  "title": "Pigeon Open Data: product@1",
  "$comment": "Apache-2.0. Structural schema; use Zod/parseRecord for semantic invariants. This published schema URL is immutable.",
  "examples": [
    {
      "name": "demo",
      "brand": null,
      "variant": null,
      "category": null,
      "gtin": null,
      "url": "https://example.invalid/item",
      "comparison": {
        "versus": [],
        "verdict": null
      },
      "pros": [],
      "cons": [],
      "grocery": false,
      "evidence": {
        "quote": "demo",
        "intent": "recommended",
        "specific": false
      },
      "resolution": {
        "status": "matched",
        "confidence": 0,
        "attribution": [],
        "candidates": []
      },
      "offers": []
    }
  ]
}
