{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-board-certification-update-request-schema.json",
  "title": "Board Certification",
  "description": "Board certification data for PUT operations that replace the entire certifications array",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-credentialingworkflow-api-openapi.yml#/components/schemas/BoardCertificationUpdateRequest",
  "type": "object",
  "required": [
    "speciality",
    "status",
    "source"
  ],
  "properties": {
    "createdAt": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "The date the record was created"
    },
    "createdBy": {
      "type": "string",
      "description": "The user who created the record"
    },
    "updatedAt": {
      "$ref": "#/$defs/Date",
      "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/CredentialingWorkflowAttachment"
      },
      "description": "Array of attachment metadata for this record"
    },
    "verifiedBy": {
      "type": "string",
      "description": "Person who verified this record"
    },
    "verifiedDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Date when this record was verified"
    },
    "certificateId": {
      "type": "string",
      "description": "Unique identifier for the board certification"
    },
    "certificateType": {
      "type": "string",
      "description": "Type of board certification"
    },
    "durationType": {
      "type": "string",
      "description": "Duration type of the certification"
    },
    "expirationDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "The date the board certification expires"
    },
    "issueDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Issue date of the board certification"
    },
    "reverificationDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "The date the board certification was reverified"
    },
    "speciality": {
      "type": "string",
      "pattern": "\\S",
      "description": "Medical specialty"
    },
    "subspeciality": {
      "type": "string",
      "description": "Medical subspecialty"
    },
    "moc": {
      "type": "string",
      "description": "Maintenance of Certification status"
    },
    "status": {
      "type": "string",
      "pattern": "\\S",
      "description": "Status of the board certification"
    },
    "occuranceType": {
      "type": "string",
      "description": "Occurrence type of the certification"
    },
    "recordType": {
      "type": "string",
      "description": "Type of record"
    },
    "source": {
      "type": "string",
      "pattern": "\\S",
      "description": "Source of the board certification information"
    },
    "flaggedDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Date when the board certification was flagged"
    },
    "reportDate": {
      "$ref": "#/$defs/Date",
      "type": "string",
      "description": "Date when the board certification was reported"
    }
  },
  "$defs": {
    "CredentialingWorkflowAttachment": {
      "type": "object",
      "required": [
        "fileType",
        "fileUrl",
        "originalFileName"
      ],
      "description": "Attachment metadata for credentialing workflow row",
      "properties": {
        "createdAt": {
          "type": "string",
          "description": "Creation timestamp"
        },
        "fileType": {
          "type": "string",
          "description": "Document file type"
        },
        "fileUrl": {
          "type": "string",
          "description": "GCS file URL for file retrieval"
        },
        "originalFileName": {
          "type": "string",
          "description": "Original file name"
        },
        "expirationDate": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "Expiration date",
          "default": "9999-12-31"
        },
        "createdBy": {
          "type": "string",
          "description": "User who created the record"
        },
        "artifactLinkId": {
          "type": "string",
          "description": "Shared identifier linking this attachment to its corresponding supportingDocuments entry"
        }
      }
    },
    "Date": {
      "type": "string",
      "format": "date"
    }
  }
}