{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/andrewsfreebies-com/json-schema/andrewsfreebies-com-trial-schema.json",
  "title": "Trial",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/andrewsfreebies-com-openapi.json#/components/schemas/Trial",
  "type": "object",
  "required": [
    "id",
    "name",
    "provider",
    "offer_type",
    "trial",
    "activation",
    "status",
    "source",
    "verification_readiness",
    "action_url",
    "official_action"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "offer_type": {
      "type": "string",
      "enum": [
        "free-trial",
        "free-plan",
        "money-back-guarantee",
        "promotional-offer",
        "directory-listing"
      ]
    },
    "summary": {
      "type": "string"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status": {
      "type": "string"
    },
    "last_checked": {
      "type": "string",
      "format": "date"
    },
    "verification_readiness": {
      "$ref": "#/$defs/VerificationReadiness"
    },
    "action_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Measured official-action path; null means the record is inspectable but must not be recommended for action."
    },
    "official_action": {
      "$ref": "#/$defs/OfficialActionState"
    },
    "signup_url": {
      "type": "string",
      "format": "uri"
    },
    "activation": {
      "type": "object",
      "description": "Machine-readable navigation quality, kept separate from evidence verification.",
      "properties": {
        "direct": {
          "type": "boolean"
        },
        "specificity": {
          "type": "string",
          "enum": [
            "verified-offer-page",
            "offer-page",
            "provider-path",
            "provider-homepage",
            "unknown"
          ]
        },
        "terms_found": {
          "type": "boolean"
        },
        "checked_at": {
          "type": "string"
        },
        "http_status": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "source": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "provider",
            "directory"
          ]
        },
        "primary_url": {
          "type": "string",
          "format": "uri"
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "trial": {
      "type": "object",
      "properties": {
        "duration_days": {
          "type": [
            "integer",
            "null"
          ]
        },
        "duration_label": {
          "type": "string"
        },
        "credit_card": {
          "type": "string"
        },
        "auto_renews": {
          "type": "string"
        },
        "post_trial_price": {
          "type": [
            "string",
            "null"
          ]
        },
        "eligibility": {
          "type": "string"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "OfficialActionState": {
      "type": "object",
      "required": [
        "allowed",
        "status",
        "reason"
      ],
      "properties": {
        "allowed": {
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "enum": [
            "ready",
            "source-navigation",
            "withheld"
          ]
        },
        "reason": {
          "type": "string",
          "description": "Instruction for whether an agent may recommend the official action path."
        }
      }
    },
    "VerificationOutcome": {
      "type": "string",
      "enum": [
        "confirmed-exact",
        "confirmed-partial",
        "terms-changed",
        "explicitly-expired",
        "moved",
        "blocked",
        "fetch-error",
        "not-found",
        "unknown"
      ],
      "description": "Conservative field-level audit result. blocked, fetch-error, not-found, and unknown do not establish expiration."
    },
    "VerificationReadiness": {
      "type": "object",
      "required": [
        "status",
        "latest_outcome",
        "latest_checked_at",
        "interpretation"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "audit-confirmed-exact",
            "audit-confirmed-partial",
            "audit-inconclusive",
            "audit-warning",
            "not-audited"
          ]
        },
        "latest_outcome": {
          "oneOf": [
            {
              "$ref": "#/$defs/VerificationOutcome"
            },
            {
              "type": "null"
            }
          ]
        },
        "latest_checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "interpretation": {
          "type": "string",
          "description": "Factual guidance for using the latest audit without treating an inconclusive fetch as expiration."
        }
      }
    }
  }
}