{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourcetier/json-schema/sourcetier-vendor-schema.json",
  "title": "Vendor",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourcetier-openapi.json#/components/schemas/Vendor",
  "type": "object",
  "required": [
    "slug",
    "name",
    "attributes",
    "products",
    "identifiers"
  ],
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": [
        "string",
        "null"
      ]
    },
    "mark": {},
    "mark_attempt": {},
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Attribute"
      }
    },
    "withdrawn": {
      "type": "object",
      "additionalProperties": true
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Ref"
      }
    },
    "identifiers": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "Attribute": {
      "type": "object",
      "required": [
        "verification_state",
        "confidence",
        "observed_on",
        "sources"
      ],
      "description": "One statement about a product or vendor with its evidence. The value is null when verification_state is unknown.",
      "properties": {
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {},
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "verification_state": {
          "type": "string",
          "enum": [
            "verified",
            "corroborated",
            "vendor_stated",
            "customer_reported",
            "estimated",
            "unknown"
          ]
        },
        "statement_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Stable across new values, withdrawals and merges; its history is under /api/v1/statements/{statement_id}."
        },
        "claim_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The current version; it changes when the value changes."
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ]
        },
        "confidence_parts": {},
        "observed_on": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "last_checked_on": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "later_reads": {},
        "valid_from": {
          "type": [
            "string",
            "null"
          ]
        },
        "extraction": {},
        "reader": {
          "type": [
            "string",
            "null"
          ]
        },
        "parser_version": {},
        "method": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Source"
          }
        }
      },
      "additionalProperties": true
    },
    "Ref": {
      "type": "object",
      "required": [
        "slug",
        "name"
      ],
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "Source": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "tier": {
          "type": [
            "integer",
            "null"
          ],
          "description": "1 is best."
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "retrieved_on": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "role": {
          "type": "string",
          "enum": [
            "evidence",
            "checked_without_finding"
          ]
        }
      },
      "additionalProperties": true
    }
  }
}