{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-document-response-dto-schema.json",
  "title": "DocumentResponseDto",
  "description": "Documents response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-documents-api-openapi.yml#/components/schemas/DocumentResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the document.\n* A temporary BILL-generated ID is available for the document when the upload is in progress. The value begins with `0du`.\n* A BILL-generated ID is available for the   document when the upload is complete. The value begins with `00h`."
    },
    "name": {
      "type": "string",
      "description": "Document name"
    },
    "createdTime": {
      "type": "string",
      "description": "Created date and time",
      "format": "date-time"
    },
    "downloadLink": {
      "type": "string",
      "description": "URL for downloading the document. Use the URL in a GET request to download the document."
    },
    "numOfPages": {
      "type": "integer",
      "description": "Number of pages in the document",
      "format": "int32"
    },
    "scanStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/ScanStatus"
        },
        {
          "description": "Document scan status"
        }
      ]
    }
  },
  "$defs": {
    "ScanStatus": {
      "type": "string",
      "description": "Document Scan status.",
      "enum": [
        "NOT_SCANNED",
        "CLEAN",
        "INFECTED",
        "IN_QUEUE",
        "REJECTED",
        "UNDEFINED"
      ]
    }
  }
}