{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-facility-liability-insurance-update-request-schema.json",
  "title": "FacilityLiabilityInsuranceUpdateRequest",
  "description": "Facility liability insurance data for PUT operations that replace the entire insurances array",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-facilitycredentialingworkflow-api-openapi.yml#/components/schemas/FacilityLiabilityInsuranceUpdateRequest",
  "type": "object",
  "required": [
    "source",
    "status",
    "policyNumber"
  ],
  "properties": {
    "carrierName": {
      "type": "string",
      "description": "Name of the insurance carrier"
    },
    "expirationDate": {
      "type": "string",
      "description": "Expiration date of the insurance policy"
    },
    "effectiveDate": {
      "type": "string",
      "description": "Effective date of the insurance policy"
    },
    "source": {
      "type": "string",
      "pattern": "\\S",
      "description": "Source of the insurance information"
    },
    "status": {
      "type": "string",
      "pattern": "\\S",
      "description": "Status of the insurance policy"
    },
    "policyNumber": {
      "type": "string",
      "pattern": "\\S",
      "description": "Policy number"
    },
    "aggregateCoverageAmount": {
      "type": "string",
      "description": "Aggregate coverage amount"
    },
    "occurrenceCoverageAmount": {
      "type": "string",
      "description": "Occurrence coverage amount"
    },
    "type": {
      "type": "string",
      "description": "The type of insurance"
    },
    "unlimitedCoverage": {
      "type": "boolean",
      "description": "Whether the policy has unlimited coverage"
    },
    "createdAt": {
      "type": "string",
      "description": "The date the record was created"
    },
    "createdBy": {
      "type": "string",
      "description": "The user who created the record"
    },
    "updatedAt": {
      "type": "string",
      "description": "The date the record was last updated"
    },
    "updatedBy": {
      "type": "string",
      "description": "The user who last updated the record"
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FacilityCredentialingWorkflowAttachment"
      },
      "description": "Supporting documents for the insurance"
    },
    "verifiedDate": {
      "type": "string",
      "description": "The date the insurance was verified"
    },
    "verifiedBy": {
      "type": "string",
      "description": "The user who verified the insurance"
    }
  },
  "$defs": {
    "FacilityCredentialingWorkflowAttachment": {
      "type": "object",
      "required": [
        "fileType",
        "fileUrl",
        "originalFileName"
      ],
      "description": "Attachment metadata for facility credentialing workflow sections",
      "properties": {
        "createdAt": {
          "type": "string",
          "description": "The date the attachment was created"
        },
        "fileType": {
          "type": "string",
          "description": "Supporting Document File Type (i.e. Malpractice Insurance Policy, License, etc.)"
        },
        "fileUrl": {
          "type": "string",
          "description": "Supporting Document File URI in GCS"
        },
        "originalFileName": {
          "type": "string",
          "description": "Supporting Document Original File Name"
        },
        "state": {
          "type": "string",
          "description": "The state associated with the supporting document"
        },
        "expirationDate": {
          "type": "string",
          "description": "The expiration date of the supporting document"
        },
        "source": {
          "type": "string",
          "description": "The source of the supporting document"
        },
        "createdBy": {
          "type": "string",
          "description": "The user who created the record"
        },
        "updatedAt": {
          "type": "string",
          "description": "The date the attachment was last updated"
        },
        "updatedBy": {
          "type": "string",
          "description": "The user who last updated the record"
        }
      }
    }
  }
}