{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hmcts/json-schema/hmcts-application-list-create-dto-schema.json",
  "title": "application-list-create-dto",
  "description": "Request payload to create an Application List. Blank fields will be rejected, nulls should be used instead.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hmcts-application-lists-api-openapi.yml#/components/schemas/application-list-create-dto",
  "additionalProperties": false,
  "properties": {
    "date": {
      "description": "The calendar date on which the Application List is scheduled.",
      "format": "date",
      "type": "string"
    },
    "time": {
      "description": "The time of day at which the Application List is scheduled, seconds are optional.",
      "format": "time",
      "type": "string"
    },
    "description": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/application-list-status"
    },
    "courtLocationCode": {
      "description": "Code that identifies the Court Location.",
      "maxLength": 10,
      "minLength": 1,
      "type": "string"
    },
    "otherLocationDescription": {
      "description": "Free-text location if not using a standard court.",
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "cjaCode": {
      "description": "Criminal Justice Area code.",
      "maxLength": 2,
      "minLength": 1,
      "type": "string"
    },
    "durationHours": {
      "format": "int32",
      "maximum": 99,
      "minimum": 0,
      "type": "integer"
    },
    "durationMinutes": {
      "format": "int32",
      "maximum": 59,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "date",
    "description",
    "status",
    "time"
  ],
  "type": "object",
  "$defs": {
    "application-list-status": {
      "description": "Status of the Application List.",
      "enum": [
        "OPEN",
        "CLOSED"
      ],
      "type": "string"
    }
  }
}