{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-policies-response-schema.json",
  "title": "PoliciesResponse",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-licenses-openapi.yml#/components/schemas/PoliciesResponse",
  "type": "object",
  "properties": {
    "readPolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    },
    "updatePolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    },
    "createPolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    },
    "deletePolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    },
    "claimPolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    },
    "applyPolicies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupedExternalPolicies"
      }
    }
  },
  "$defs": {
    "AccessPolicyType": {
      "type": "string",
      "description": "The mechanism used to enforce this access policy",
      "enum": [
        "ACQ_UNIT"
      ]
    },
    "BasicPolicy": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of the policy in the external system that owns it (e.g. an acquisition unit id)"
        }
      }
    },
    "GroupedExternalPolicies": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/AccessPolicyType"
        },
        "policies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BasicPolicy"
          }
        },
        "name": {
          "type": "string",
          "description": "A descriptive name for this group of policies"
        }
      }
    }
  }
}