{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-facility-sanction-update-request-schema.json",
  "title": "FacilitySanctionUpdateRequest",
  "description": "Facility sanction data for PUT operations that replace the entire sanctions 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/FacilitySanctionUpdateRequest",
  "type": "object",
  "required": [
    "dateOfReport",
    "sanctionType",
    "typeOfAction",
    "flaggedDate",
    "source"
  ],
  "properties": {
    "dateOfReport": {
      "type": "string",
      "description": "Date of the sanction report"
    },
    "sanctionType": {
      "type": "string",
      "pattern": "\\S",
      "description": "Type of sanction"
    },
    "typeOfAction": {
      "type": "string",
      "pattern": "\\S",
      "description": "Type of action taken"
    },
    "data": {
      "type": "string",
      "description": "Additional data about the sanction"
    },
    "flaggedDate": {
      "type": "string",
      "description": "The date the sanction was flagged"
    },
    "source": {
      "type": "string",
      "pattern": "\\S",
      "description": "The source of the sanction"
    },
    "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 sanction"
    },
    "verifiedDate": {
      "type": "string",
      "description": "The date the sanction was verified"
    },
    "verifiedBy": {
      "type": "string",
      "description": "The user who verified the sanction"
    }
  },
  "$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"
        }
      }
    }
  }
}