{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://artifacts.apis.io/folio/json-schema/folio-bib-info-response-dto-schema.json",
  "title": "bibInfoResponseDTO",
  "description": "D2IR Bib info response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-bib-info-d2ir-api-openapi.yml#/components/schemas/bibInfoResponseDTO",
  "allOf": [
    {
      "$ref": "#/$defs/innReachResponseDTO"
    }
  ],
  "type": "object",
  "x-implements": "org.folio.innreach.domain.dto.InnReachResponseData",
  "properties": {
    "bibInfo": {
      "description": "D2IR Bib info",
      "$ref": "#/$defs/bibInfo"
    }
  },
  "additionalProperties": false,
  "required": [
    "bibInfo"
  ],
  "$defs": {
    "bibInfo": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "D2IR Bib info",
      "type": "object",
      "properties": {
        "bibId": {
          "type": "string",
          "description": "32-character, alphanumeric id corresponding to a FOLIO instance record HRID",
          "maxLength": 32,
          "minLength": 32
        },
        "marc21BibFormat": {
          "type": "string",
          "description": "Currently supports ISO2709",
          "default": "ISO2709"
        },
        "marc21BibData": {
          "type": "string",
          "description": "Base 64 encoded MARC data"
        },
        "titleHoldCount": {
          "type": "integer",
          "description": "Number of title level holds - 0 (title level holds not currently supported in FOLIO)",
          "default": 0
        },
        "itemCount": {
          "type": "integer",
          "description": "Number of items linked to this bib (max 99, count of items associated with the FOLIO instance record that are contributed)",
          "default": 0
        },
        "suppress": {
          "type": "string",
          "description": "ASCII y, n, or g; g means display the resource in the discovery layer as having been provided by the consortium, not by the individual site.",
          "default": "n"
        }
      },
      "additionalProperties": false,
      "required": [
        "bibId",
        "marc21BibFormat",
        "marc21BibData"
      ]
    },
    "innReachError": {
      "description": "D2IR error",
      "type": "object",
      "properties": {
        "messages": {
          "type": "array",
          "description": "Error messages",
          "items": {
            "type": "string"
          }
        },
        "central": {
          "type": "string",
          "description": "Central code"
        },
        "reason": {
          "type": "string",
          "description": "Reason"
        },
        "type": {
          "type": "string",
          "description": "Error type"
        },
        "rejectedValue": {
          "description": "Rejected value"
        },
        "name": {
          "type": "string",
          "description": "Name of the rejected field"
        }
      },
      "additionalProperties": false,
      "required": [
        "reason"
      ]
    },
    "innReachResponseDTO": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "D2IR response",
      "type": "object",
      "x-implements": "org.folio.innreach.domain.dto.InnReachResponseData",
      "properties": {
        "status": {
          "description": "Status",
          "type": "string"
        },
        "reason": {
          "description": "Reason",
          "type": "string"
        },
        "errors": {
          "description": "Errors",
          "type": "array",
          "items": {
            "$ref": "#/$defs/innReachError"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "status",
        "reason",
        "errors"
      ]
    }
  }
}