{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-batch-holdings-response-schema.json",
  "title": "BatchHoldingsResponse",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-edge-rtac-openapi.yml#/components/schemas/BatchHoldingsResponse",
  "type": "object",
  "required": [
    "holdings"
  ],
  "properties": {
    "holdings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InstanceHoldings"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HoldingsError"
      }
    }
  },
  "$defs": {
    "Holding": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the holding"
        },
        "callNumber": {
          "type": "string",
          "description": "Call number for the item"
        },
        "location": {
          "type": "string",
          "description": "Location name"
        },
        "locationCode": {
          "type": "string",
          "description": "Location code"
        },
        "locationId": {
          "type": "string",
          "description": "Location identifier"
        },
        "status": {
          "type": "string",
          "description": "Item status"
        },
        "dueDate": {
          "type": "string",
          "description": "Due date if item is checked out"
        },
        "tempLocation": {
          "type": "string",
          "description": "Temporary location"
        },
        "volume": {
          "type": "string",
          "description": "Volume information"
        },
        "temporaryLoanType": {
          "type": "string",
          "description": "Temporary loan type"
        },
        "permanentLoanType": {
          "type": "string",
          "description": "Permanent loan type"
        },
        "holdingsCopyNumber": {
          "type": "string",
          "description": "Holdings copy number"
        },
        "itemCopyNumber": {
          "type": "string",
          "description": "Item copy number"
        },
        "itemDisplayOrder": {
          "type": "integer",
          "format": "int32",
          "description": "Display order for the item"
        },
        "barcode": {
          "type": "string",
          "description": "Item barcode"
        },
        "suppressFromDiscovery": {
          "type": "boolean",
          "description": "Whether item is suppressed from discovery"
        },
        "totalHoldRequests": {
          "type": "integer",
          "format": "int32",
          "description": "Total number of hold requests"
        },
        "materialType": {
          "$ref": "#/$defs/MaterialType"
        },
        "library": {
          "$ref": "#/$defs/Library"
        },
        "notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HoldingsNote"
          }
        },
        "holdingsStatements": {
          "default": [],
          "type": "array",
          "items": {
            "$ref": "#/$defs/HoldingsStatement"
          }
        },
        "holdingsStatementsForIndexes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HoldingsStatement"
          }
        },
        "holdingsStatementsForSupplements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HoldingsStatement"
          }
        }
      }
    },
    "HoldingsError": {
      "type": "object",
      "properties": {
        "message": {
          "description": "Error message text",
          "type": "string"
        },
        "code": {
          "description": "Error code",
          "type": "string"
        }
      }
    },
    "HoldingsNote": {
      "type": "object",
      "properties": {
        "note": {
          "type": "string",
          "description": "Text content of the note"
        },
        "holdingsNoteTypeName": {
          "type": "string",
          "description": "Name of the holdings note type"
        }
      }
    },
    "HoldingsStatement": {
      "type": "object",
      "properties": {
        "statement": {
          "type": "string",
          "description": "Statement text"
        },
        "note": {
          "type": "string",
          "description": "Note for the statement"
        }
      }
    },
    "InstanceHoldings": {
      "type": "object",
      "properties": {
        "instanceId": {
          "type": "string",
          "description": "The instance identifier"
        },
        "holdings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Holding"
          }
        }
      }
    },
    "Library": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Library name"
        },
        "code": {
          "type": "string",
          "description": "Library code"
        }
      }
    },
    "MaterialType": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Material type identifier"
        },
        "name": {
          "type": "string",
          "description": "Material type name"
        }
      }
    }
  }
}