{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-get-notes-response-schema.json",
  "title": "GetNotesResponse",
  "description": "Response containing a list of notes",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-facility-note-api-openapi.yml#/components/schemas/GetNotesResponse",
  "type": "object",
  "properties": {
    "totalCount": {
      "type": "integer",
      "format": "int64",
      "description": "Total count of notes returned for the workflow"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NoteResponse"
      },
      "description": "Array of note records"
    },
    "links": {
      "$ref": "#/$defs/PageLinks1",
      "type": "object",
      "description": "Optional links envelope retained for compatibility; list query params are not applied"
    }
  },
  "$defs": {
    "Instant": {
      "type": "string",
      "format": "date-time"
    },
    "NoteData": {
      "type": "object",
      "required": [
        "message"
      ],
      "description": "Note data containing message content",
      "properties": {
        "message": {
          "type": "string",
          "description": "The message content of the note"
        }
      }
    },
    "NoteResponse": {
      "type": "object",
      "description": "Response containing note information",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the note"
        },
        "workflowId": {
          "type": "string",
          "description": "ID of the associated credentialing workflow"
        },
        "data": {
          "$ref": "#/$defs/NoteData",
          "type": "object",
          "description": "Note data containing message"
        },
        "createdBy": {
          "type": "string",
          "description": "ID of the user who created the note"
        },
        "createdByName": {
          "type": "string",
          "description": "Full name of the user who created the note"
        },
        "updatedBy": {
          "type": "string",
          "description": "ID of the user who last updated the note"
        },
        "updatedByName": {
          "type": "string",
          "description": "Full name of the user who last updated the note"
        },
        "createdAt": {
          "$ref": "#/$defs/Instant",
          "type": "string",
          "description": "Timestamp when the note was created"
        },
        "updatedAt": {
          "$ref": "#/$defs/Instant",
          "type": "string",
          "description": "Timestamp when the note was last updated"
        }
      }
    },
    "PageLinks1": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "prev": {
          "type": "string"
        }
      }
    }
  }
}