{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://extractapi.com/assets/downloads/record-schema.json",
  "title": "Illustrative extraction record",
  "description": "An educational contract example; not a live API response specification.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_revision",
    "source_id",
    "observed_at",
    "record",
    "issues"
  ],
  "properties": {
    "schema_revision": {
      "const": "1.0"
    },
    "source_id": {
      "type": "string",
      "minLength": 1
    },
    "observed_at": {
      "type": "string",
      "format": "date-time"
    },
    "record": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "price_amount",
        "currency",
        "availability"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "price_amount": {
          "type": "string",
          "pattern": "^[0-9]+\\.[0-9]{2}$"
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "availability": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
