{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nothumansearch-ai/json-schema/nothumansearch-ai-provider-commercial-acceptance-request-schema.json",
  "title": "ProviderCommercialAcceptanceRequest",
  "description": "Exact provider-authenticated acceptance shapes. Unknown fields and shape-inappropriate fields are rejected.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nothumansearch-ai-openapi.yaml#/components/schemas/ProviderCommercialAcceptanceRequest",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event_type",
        "provider_acceptance_reference"
      ],
      "properties": {
        "event_type": {
          "type": "string",
          "enum": [
            "pilot_company"
          ]
        },
        "provider_acceptance_reference": {
          "type": "string",
          "minLength": 8,
          "maxLength": 200,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{7,199}$",
          "description": "Non-secret provider evidence reference"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event_type",
        "offer_id",
        "offer_version",
        "exact_terms_sha256",
        "provider_acceptance_reference"
      ],
      "properties": {
        "event_type": {
          "type": "string",
          "enum": [
            "terms_acceptance"
          ]
        },
        "offer_id": {
          "type": "string",
          "format": "uuid"
        },
        "offer_version": {
          "type": "integer",
          "minimum": 1,
          "description": "Exact version reviewed by the provider; rejected if the current draft differs"
        },
        "exact_terms_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "description": "Exact commercial terms hash reviewed by the provider; rejected if the current draft differs"
        },
        "provider_acceptance_reference": {
          "type": "string",
          "minLength": 8,
          "maxLength": 200,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{7,199}$",
          "description": "Non-secret provider evidence reference"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "event_type",
        "offer_id",
        "related_acceptance_event_id",
        "offer_version",
        "exact_terms_sha256",
        "provider_acceptance_reference"
      ],
      "properties": {
        "event_type": {
          "type": "string",
          "enum": [
            "terms_renewal"
          ]
        },
        "offer_id": {
          "type": "string",
          "format": "uuid"
        },
        "related_acceptance_event_id": {
          "type": "string",
          "format": "uuid",
          "description": "Prior terms_acceptance or terms_renewal in the same exact-terms chain"
        },
        "offer_version": {
          "type": "integer",
          "minimum": 1,
          "description": "Exact version reviewed by the provider; rejected if the current draft differs"
        },
        "exact_terms_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "description": "Exact commercial terms hash reviewed by the provider; rejected if the current draft differs"
        },
        "provider_acceptance_reference": {
          "type": "string",
          "minLength": 8,
          "maxLength": 200,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]{7,199}$",
          "description": "Non-secret provider evidence reference"
        }
      }
    }
  ]
}