{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chartercaptain-com/json-schema/chartercaptain-com-boat-profile-schema.json",
  "title": "BoatProfile",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chartercaptain-com-openapi.json#/components/schemas/BoatProfile",
  "type": "object",
  "required": [
    "id",
    "name",
    "type",
    "photos",
    "capacity",
    "harbor",
    "ownerName",
    "rating",
    "reviewCount"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "capacity": {
      "type": "integer"
    },
    "pricingTiers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BoatPricingTier"
      }
    },
    "durations": {
      "type": "array",
      "description": "Bookable trip lengths for the boat's owner tenant. `id` is the durationId required when creating a rental.",
      "items": {
        "type": "object",
        "required": [
          "id",
          "hours",
          "label",
          "sortOrder"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "hours": {
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer"
          }
        }
      }
    },
    "harbor": {
      "type": "string"
    },
    "ownerName": {
      "type": "string"
    },
    "rating": {
      "type": "number"
    },
    "reviewCount": {
      "type": "integer"
    },
    "features": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "rules": {
      "type": [
        "string",
        "null"
      ]
    },
    "depositType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "FIXED",
        "PERCENTAGE"
      ]
    },
    "depositValue": {
      "type": [
        "integer",
        "null"
      ]
    },
    "cancellationWindowDays": {
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "$defs": {
    "BoatPricingTier": {
      "type": "object",
      "required": [
        "id",
        "name",
        "ratePerHour",
        "daysOfWeek",
        "isSpecialRate"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "ratePerHour": {
          "type": "number"
        },
        "daysOfWeek": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          }
        },
        "isSpecialRate": {
          "type": "boolean"
        }
      }
    }
  }
}