{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-import-job-schema.json",
  "title": "importJob",
  "description": "Report on the execution of an import job.",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-inventory-update-inventory-import-1-0-openapi.yml#/components/schemas/importJob",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the import job report."
    },
    "channelName": {
      "type": "string",
      "description": "The name of the channel at the time of logging the import job."
    },
    "channelId": {
      "type": "string",
      "format": "uuid",
      "description": "UUID referencing the channel configuration that governed the import job run."
    },
    "importType": {
      "type": "string",
      "description": "Type of import job (obsolete, always bulk XML)."
    },
    "transformation": {
      "type": "string",
      "description": "Then name for the transformation pipeline used for the job."
    },
    "status": {
      "type": "string",
      "description": "The intermittent state or final outcome of the job.",
      "enum": [
        "RUNNING",
        "PAUSED",
        "DONE"
      ]
    },
    "started": {
      "type": "string",
      "description": "Timestamp when the job started."
    },
    "finished": {
      "type": "string",
      "description": "Timestamp when the job ended."
    },
    "amountImported": {
      "type": "integer",
      "description": "The number of incoming records processed."
    },
    "message": {
      "type": "string",
      "description": "A description of the outcome of the import."
    },
    "metadata": {
      "$ref": "#/$defs/metadata"
    }
  },
  "$defs": {
    "metadata": {
      "type": "object",
      "description": "For tagging records with current time and user ID on create or update.",
      "properties": {
        "createdDate": {
          "type": "string",
          "description": "Time stamp for the records creation.",
          "readOnly": true
        },
        "createdByUserId": {
          "type": "string",
          "format": "uuid",
          "description": "ID of the user creating the record.",
          "readOnly": true
        },
        "updatedDate": {
          "type": "string",
          "description": "Time stamp for the most recent update of the record.",
          "readOnly": true
        },
        "updatedByUserId": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the user who most recently updated the record.",
          "readOnly": true
        }
      }
    }
  }
}