{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-list-document-response-dto-schema.json",
  "title": "ListDocumentResponseDto",
  "description": "Get list of 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/ListDocumentResponseDto",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/ListResponseDto_DocumentResponseDto_"
    }
  ],
  "$defs": {
    "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"
            }
          ]
        }
      },
      "description": "Documents response."
    },
    "ListResponseDto_DocumentResponseDto_": {
      "type": "object",
      "properties": {
        "nextPage": {
          "type": "string"
        },
        "prevPage": {
          "type": "string"
        },
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DocumentResponseDto"
          }
        }
      },
      "description": "Response from a list API request with paging references."
    },
    "ScanStatus": {
      "type": "string",
      "description": "Document Scan status.",
      "enum": [
        "NOT_SCANNED",
        "CLEAN",
        "INFECTED",
        "IN_QUEUE",
        "REJECTED",
        "UNDEFINED"
      ]
    }
  }
}