{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/schemas/3.1.0-rc.4/content-standards/validate-content-delivery-request.json",
  "title": "Validate Content Delivery Request",
  "description": "Request parameters for batch validating delivery records against content safety policies",
  "type": "object",
  "allOf": [
    {
      "$ref": "/schemas/3.1.0-rc.4/core/version-envelope.json"
    }
  ],
  "properties": {
    "standards_id": {
      "type": "string",
      "description": "Standards configuration to validate against"
    },
    "records": {
      "type": "array",
      "description": "Delivery records to validate (max 10,000)",
      "minItems": 1,
      "maxItems": 10000,
      "items": {
        "type": "object",
        "properties": {
          "record_id": {
            "type": "string",
            "description": "Unique identifier for this delivery record"
          },
          "media_buy_id": {
            "type": "string",
            "description": "Media buy this record belongs to (when batching across multiple buys)"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the delivery occurred"
          },
          "artifact": {
            "$ref": "/schemas/3.1.0-rc.4/content-standards/artifact.json",
            "description": "Artifact where ad was delivered"
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code where delivery occurred"
          },
          "channel": {
            "type": "string",
            "description": "Channel type (e.g., display, video, audio, social)"
          },
          "brand_context": {
            "type": "object",
            "description": "Brand information for policy evaluation. Schema TBD - placeholder for brand identifiers.",
            "properties": {
              "brand_id": {
                "type": "string",
                "description": "Brand identifier"
              },
              "sku_id": {
                "type": "string",
                "description": "Product/SKU identifier if applicable"
              }
            }
          }
        },
        "required": [
          "record_id",
          "artifact"
        ]
      }
    },
    "feature_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "description": "Specific features to evaluate (defaults to all)"
    },
    "include_passed": {
      "type": "boolean",
      "default": true,
      "description": "Include passed records in results"
    },
    "context": {
      "$ref": "/schemas/3.1.0-rc.4/core/context.json"
    },
    "ext": {
      "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
    }
  },
  "required": [
    "standards_id",
    "records"
  ]
}
