{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe-captivate/json-schema/adobe-captivate-enrollment-create-request-schema.json",
  "title": "EnrollmentCreateRequest",
  "description": "Request body for creating an enrollment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-captivate-enrollments-api-openapi.yml#/components/schemas/EnrollmentCreateRequest",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "enrollment"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "loInstanceId": {
              "type": "string",
              "description": "ID of the learning object instance to enroll in"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "loInstance": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/$defs/ResourceIdentifier"
                }
              }
            },
            "learner": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/$defs/ResourceIdentifier"
                }
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "ResourceIdentifier": {
      "type": "object",
      "description": "JSON:API resource identifier",
      "required": [
        "id",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource identifier"
        },
        "type": {
          "type": "string",
          "description": "Resource type name"
        }
      }
    }
  }
}