{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medsender/json-schema/medsender-v3-sent-fax-detail-schema.json",
  "title": "V3SentFaxDetail",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medsender-openapi.json#/components/schemas/V3SentFaxDetail",
  "type": "object",
  "required": [
    "sendToken",
    "fromNumber",
    "toNumber",
    "recipientName",
    "recordStatus",
    "patientName",
    "patientDob",
    "documentTitle",
    "senderName",
    "expiry",
    "viewCount",
    "note",
    "sentAt",
    "completedAt",
    "sentStatus",
    "documentType",
    "errorDetails",
    "numPages",
    "isTest",
    "secureLink"
  ],
  "properties": {
    "sendToken": {
      "type": "string"
    },
    "fromNumber": {
      "type": [
        "string",
        "null"
      ]
    },
    "toNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "E.164 for fax deliveries; can be null for an email delivery."
    },
    "recipientName": {
      "type": [
        "string",
        "null"
      ]
    },
    "recordStatus": {
      "type": "string",
      "const": "activated"
    },
    "patientName": {
      "type": [
        "string",
        "null"
      ]
    },
    "patientDob": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "documentTitle": {
      "type": [
        "string",
        "null"
      ]
    },
    "senderName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Retained for compatibility; not the cover-sheet display name."
    },
    "expiry": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "viewCount": {
      "type": [
        "integer",
        "null"
      ]
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "sentAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "sentStatus": {
      "type": [
        "string",
        "null"
      ],
      "description": "Delivery status, for example inprogress, success, failure, scheduled or resent; can be null for an email delivery."
    },
    "documentType": {
      "type": "string",
      "const": "both",
      "description": "Always both, even for a document-only send."
    },
    "errorDetails": {
      "$ref": "#/$defs/V3FaxErrorDetails"
    },
    "numPages": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Transmitted pages, including any cover sheet."
    },
    "isTest": {
      "type": "boolean"
    },
    "secureLink": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Signed link to the sent PDF; expires after five minutes."
    }
  },
  "$defs": {
    "V3FaxErrorDetails": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "errorMessage"
      ],
      "description": "Set only when sentStatus is failure.",
      "properties": {
        "errorMessage": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}