{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coveragecat-com/json-schema/coveragecat-com-consumer-policy-service-request-schema.json",
  "title": "ConsumerPolicyServiceRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coveragecat-com-consumer-openapi.yml#/components/schemas/ConsumerPolicyServiceRequest",
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "request_type": {
          "const": "policy_cancellation",
          "type": "string"
        }
      },
      "required": [
        "request_type",
        "reason",
        "requested_effective_date"
      ]
    },
    {
      "properties": {
        "request_type": {
          "const": "refund_request",
          "type": "string"
        }
      },
      "required": [
        "request_type",
        "reason"
      ]
    },
    {
      "properties": {
        "request_type": {
          "const": "support_case",
          "type": "string"
        }
      },
      "required": [
        "request_type",
        "reason"
      ]
    }
  ],
  "properties": {
    "confirm_request": {
      "description": "Whether to open the request now. false, the default, returns a preview of the consequences without opening anything; send true only after the shopper approves that preview.",
      "type": "boolean"
    },
    "details": {
      "description": "Shopper-approved context beyond the short reason, such as the specifics of a billing dispute, recorded on the request and its preview.",
      "type": "string"
    },
    "reason": {
      "description": "Short shopper-approved reason for the request.",
      "type": "string"
    },
    "request_type": {
      "description": "What the shopper wants done after purchase. `policy_cancellation` asks the carrier to end the policy on requested_effective_date; `refund_request` asks the carrier or billing provider to review a refund or outstanding balance without changing coverage; `support_case` opens a general support case for anything else.",
      "enum": [
        "policy_cancellation",
        "refund_request",
        "support_case"
      ],
      "type": "string"
    },
    "requested_effective_date": {
      "description": "Day the shopper wants a cancellation to take effect; used only for policy_cancellation. It is a request: the carrier reviews it and may set a different date.",
      "format": "date",
      "type": "string"
    }
  },
  "required": [
    "request_type",
    "reason"
  ],
  "type": "object"
}