{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/easy2257-com/json-schema/easy2257-com-verify-certificate-response-schema.json",
  "title": "VerifyCertificateResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/easy2257-com-productions-api-openapi.yml#/components/schemas/VerifyCertificateResponse",
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean",
      "description": "The only field you should branch on. A 200 response says the check ran, not that the certificate is good."
    },
    "productionId": {
      "type": "string"
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Present when valid is true."
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "Present when valid is true."
    },
    "currentStatus": {
      "type": "string",
      "description": "Current production documentation status. Present when valid is true. `unknown` if the production row has since been removed."
    },
    "reason": {
      "type": "string",
      "enum": [
        "certificate_revoked",
        "certificate_superseded",
        "certificate_expired",
        "certificate_not_found",
        "signature_mismatch",
        "invalid_certificate",
        "no_public_key",
        "public_key_not_configured",
        "production_id_mismatch"
      ],
      "description": "Machine-readable failure reason, present when valid is false. `certificate_superseded` means a newer certificate replaced this one, either at annual renewal or when the producer reissued the sealed package after a correction: swap in the replacement (from the `production.certificate_renewed` webhook, the newer `production.documented` delivery, or `GET /api/v1/productions/{productionId}/certificates`); the content stays up. `certificate_revoked` means the certified record was pulled: take the content down. `production_id_mismatch` arrives with HTTP `400`: the certificate verified, but it belongs to a different production than the one in the URL. `no_public_key` and `public_key_not_configured` are Easy2257-side signing key problems, so retry rather than treating the certificate as bad."
    }
  },
  "required": [
    "valid"
  ]
}