{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alert-camp/json-schema/alert-camp-itinerary-create-schema.json",
  "title": "ItineraryCreate",
  "description": "Create a multi-night route alert.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alert-camp-itineraries-api-openapi.yml#/components/schemas/ItineraryCreate",
  "properties": {
    "park_id": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "title": "Park Id"
    },
    "nights": {
      "items": {
        "$ref": "#/$defs/ItineraryNightCreate"
      },
      "type": "array",
      "maxItems": 14,
      "minItems": 1,
      "title": "Nights"
    },
    "window_start": {
      "type": "string",
      "format": "date",
      "title": "Window Start"
    },
    "window_end": {
      "type": "string",
      "format": "date",
      "title": "Window End"
    },
    "route_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Route Id"
    },
    "party_size": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 99.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Party Size"
    },
    "tent_pads": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 50.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Tent Pads"
    },
    "notify_push": {
      "type": "boolean",
      "title": "Notify Push",
      "default": true
    },
    "notify_email": {
      "type": "boolean",
      "title": "Notify Email",
      "default": true
    },
    "notify_sms": {
      "type": "boolean",
      "title": "Notify Sms",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "park_id",
    "nights",
    "window_start",
    "window_end"
  ],
  "$defs": {
    "ItineraryNightCreate": {
      "properties": {
        "campground_id": {
          "type": "string",
          "maxLength": 128,
          "minLength": 1,
          "title": "Campground Id"
        },
        "site_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 50,
          "minItems": 1,
          "title": "Site Ids"
        }
      },
      "type": "object",
      "required": [
        "campground_id",
        "site_ids"
      ],
      "title": "ItineraryNightCreate",
      "description": "One night: the OR-set of zones that would satisfy it.\n\n``site_ids`` are zone-resource site ids.  The set is an OR: the night is\nsatisfied when ANY of them is open, which is what lets a user say \"night 2\ncan be Numa Creek or Tumbling Creek\" and get one alert instead of two."
    }
  }
}