{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-circulation-item-schema.json",
  "title": "circulationItem",
  "description": "Circulation Item",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-circulation-item-openapi.yml#/components/schemas/circulationItem",
  "type": "object",
  "properties": {
    "id": {
      "description": "item id",
      "$ref": "#/$defs/uuid"
    },
    "holdingsRecordId": {
      "description": "holding record id",
      "$ref": "#/$defs/uuid"
    },
    "status": {
      "description": "status",
      "type": "object",
      "properties": {
        "name": {
          "description": "Enum name of status",
          "type": "string"
        },
        "date": {
          "description": "Date status",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "materialTypeId": {
      "description": "material type id",
      "type": "string"
    },
    "permanentLoanTypeId": {
      "description": "permanent loan type id",
      "type": "string"
    },
    "instanceTitle": {
      "description": "instance title",
      "type": "string"
    },
    "barcode": {
      "description": "item barcode",
      "type": "string"
    },
    "pickupLocation": {
      "description": "pickup location",
      "type": "string"
    },
    "lendingLibraryCode": {
      "description": "5 digit agency code which identifies the lending library",
      "type": "string"
    },
    "metadata": {
      "description": "Entity metadata",
      "type": "object",
      "$ref": "#/$defs/metadata"
    }
  },
  "additionalProperties": false,
  "required": [],
  "$defs": {
    "metadata": {
      "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"
      ]
    },
    "uuid": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "Regexp pattern for UUID validation",
      "type": "string",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
    }
  }
}