{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pdfbetter-com/json-schema/pdfbetter-com-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pdfbetter-com-openapi.json#/components/schemas/Job",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "const": "job"
    },
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "const": "bulk_fill"
    },
    "documentId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "canceled"
      ]
    },
    "rowCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "doneCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "succeededCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "failedCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "progress": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "0–100"
    },
    "failedRows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "row",
          "error"
        ],
        "additionalProperties": false
      }
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "description": "ISO 8601 timestamp (UTC)"
    },
    "downloads": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "fromRow": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "toRow": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "name",
          "url",
          "size",
          "fromRow",
          "toRow"
        ],
        "additionalProperties": false
      },
      "description": "Zip parts (≤ 500 rows each); links valid 15 minutes"
    }
  },
  "required": [
    "object",
    "id",
    "type",
    "documentId",
    "status",
    "rowCount",
    "doneCount",
    "succeededCount",
    "failedCount",
    "progress",
    "failedRows",
    "error",
    "createdAt",
    "downloads"
  ],
  "additionalProperties": false
}