{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetkeep-co-uk/json-schema/fleetkeep-co-uk-equipment-input-schema.json",
  "title": "EquipmentInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetkeep-co-uk-equipment-api-openapi.yml#/components/schemas/EquipmentInput",
  "type": "object",
  "required": [
    "name",
    "category",
    "status"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "presetKey": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "tunnel_account",
        "bridge_crossing",
        "gps_tracker",
        "ghost_immobiliser",
        "fuel_card",
        "breakdown_cover",
        "warranty",
        "ownership_hire",
        "service_due",
        null
      ]
    },
    "category": {
      "type": "string",
      "enum": [
        "tracking",
        "security",
        "fuel",
        "other"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "in_place",
        "needs_attention",
        "not_applicable",
        "removed"
      ]
    },
    "provider": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 120
    },
    "reference": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 160
    },
    "portalUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "maxLength": 500
    },
    "startedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "endedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "reviewDueDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "reminderEnabled": {
      "type": "boolean"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1200
    },
    "details": {
      "type": [
        "array",
        "null"
      ],
      "maxItems": 8,
      "items": {
        "$ref": "#/$defs/EquipmentDetail"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "EquipmentDetail": {
      "type": "object",
      "required": [
        "label",
        "value"
      ],
      "properties": {
        "label": {
          "type": "string",
          "maxLength": 60
        },
        "value": {
          "type": "string",
          "maxLength": 240
        }
      },
      "additionalProperties": false
    }
  }
}