{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-quick-export-request-schema.json",
  "title": "quickExportRequest",
  "description": "Necessary data to start export process from inventory",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-data-export-openapi.yml#/components/schemas/quickExportRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "jobProfileId": {
      "description": "Job profile id to be used for export",
      "type": "string",
      "format": "uuid"
    },
    "criteria": {
      "description": "CQL query for records search",
      "type": "string"
    },
    "uuids": {
      "description": "List of UUIDs of records to export",
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "type": {
      "description": "Defines a type of searching the records: by UUIDs or CQL query",
      "type": "string",
      "enum": [
        "cql",
        "uuid"
      ]
    },
    "recordType": {
      "description": "Defines a type of records to search by criteria or UUIDs",
      "type": "string",
      "enum": [
        "INSTANCE",
        "HOLDINGS",
        "ITEM",
        "AUTHORITY"
      ]
    },
    "fileName": {
      "description": "Name of the generated marc file",
      "type": "string"
    },
    "metadata": {
      "description": "Meta information ",
      "type": "object",
      "$ref": "#/$defs/metadata"
    }
  },
  "required": [
    "type",
    "recordType"
  ],
  "$defs": {
    "metadata": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  }
}