{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-transaction-hold-dto-schema.json",
  "title": "transactionHoldDTO",
  "description": "INN-Reach Transaction hold record",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-inn-reach-circulation-openapi.yml#/components/schemas/transactionHoldDTO",
  "type": "object",
  "properties": {
    "id": {
      "description": "Transaction Hold id",
      "type": "string",
      "format": "UUID"
    },
    "transactionTime": {
      "description": "Transaction time",
      "type": "integer"
    },
    "pickupLocation": {
      "description": "Pickup location",
      "type": "string"
    },
    "patronId": {
      "description": "Base32-encoded FOLIO user UUID (lowercase, no padding). The caller obtains this value from the patron verification response. Decoded server-side to resolve the FOLIO patron.",
      "type": "string",
      "pattern": "[a-z,0-9]{1,32}"
    },
    "patronAgencyCode": {
      "description": "Patron agency code",
      "type": "string",
      "minLength": 5,
      "maxLength": 5
    },
    "itemAgencyCode": {
      "description": "Item agency code",
      "type": "string",
      "minLength": 5,
      "maxLength": 5
    },
    "itemId": {
      "description": "FOLIO inventory item HRID (Human-Readable ID). Used to look up the item in FOLIO inventory.",
      "type": "string",
      "pattern": "[a-z,0-9]{1,32}"
    },
    "needBefore": {
      "description": "Need before time",
      "type": "integer"
    },
    "dueDateTime": {
      "description": "Due date time",
      "type": "integer"
    },
    "centralItemType": {
      "description": "Central item type",
      "type": "integer",
      "minimum": 0,
      "maximum": 255
    },
    "centralPatronType": {
      "description": "Central patron type",
      "type": "integer",
      "minimum": 0,
      "maximum": 255
    },
    "patronName": {
      "description": "Patron name",
      "type": "string"
    },
    "patronHomeLibrary": {
      "description": "Patron home library",
      "type": "string"
    },
    "patronPhone": {
      "description": "Patron phone",
      "type": "string"
    },
    "title": {
      "description": "Bibliographic title of the requested item. For item holds, this value is overwritten from inventory; the caller-supplied value is not used.",
      "type": "string"
    },
    "author": {
      "description": "Patron hold author",
      "type": "string"
    },
    "callNumber": {
      "description": "Patron hold call number",
      "type": "string"
    },
    "shippedItemBarcode": {
      "description": "Shipped item barcode",
      "type": "string"
    },
    "folioInstanceId": {
      "description": "Folio instance id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioHoldingId": {
      "description": "Folio holding id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioPatronId": {
      "description": "Folio patron id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioItemId": {
      "description": "Folio item id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioRequestId": {
      "description": "Folio request id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioLoanId": {
      "description": "Folio loan id",
      "type": "string",
      "format": "UUID",
      "readOnly": true
    },
    "folioPatronBarcode": {
      "description": "Folio patron barcode",
      "type": "string",
      "readOnly": true
    },
    "folioItemBarcode": {
      "description": "Folio item barcode",
      "type": "string",
      "readOnly": true
    },
    "metadata": {
      "description": "Entity metadata",
      "type": "object",
      "$ref": "#/$defs/metadata"
    }
  },
  "additionalProperties": false,
  "required": [
    "transactionTime",
    "pickupLocation",
    "patronId",
    "patronAgencyCode",
    "itemAgencyCode",
    "itemId"
  ],
  "$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"
      ]
    }
  }
}