{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/silvercar/json-schema/silvercar-admin-availability-group-intervals-response-schema.json",
  "title": "AdminAvailabilityGroupIntervalsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/silvercar-availability-2-0-api-openapi.yml#/components/schemas/AdminAvailabilityGroupIntervalsResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Origin group id"
    },
    "name": {
      "type": "string",
      "description": "Group name generated from model description, or existing group name"
    },
    "intervals": {
      "type": "array",
      "description": "An array of intervals with availability over start_at to end_at",
      "items": {
        "$ref": "#/$defs/AdminAvailabilityIntervals"
      }
    }
  },
  "$defs": {
    "AdminAvailabilityGroups": {
      "type": "object",
      "properties": {
        "make": {
          "type": "string",
          "description": "Vehicle make for the group"
        },
        "model": {
          "type": "string",
          "description": "Vehicle model for the group"
        },
        "trim": {
          "type": "string",
          "description": "Vehicle trim for the group"
        },
        "body_type": {
          "type": "string",
          "description": "Vehicle body type for the group"
        },
        "power_train": {
          "type": "string",
          "description": "Vehicle power train for the group"
        },
        "available_vehicles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdminAvailabilityVehicles"
          }
        }
      }
    },
    "AdminAvailabilityIntervals": {
      "type": "object",
      "properties": {
        "start_at": {
          "type": "string",
          "description": "date and time for the start of the interval"
        },
        "end_at": {
          "type": "string",
          "description": "date and time for the end of the interval"
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdminAvailabilityGroups"
          }
        }
      }
    },
    "AdminAvailabilityVehicles": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Origin vehicle id"
        },
        "vin": {
          "type": "string",
          "description": "Vehicle VIN"
        },
        "base_msrp": {
          "type": "string",
          "description": "Base MSRP"
        }
      }
    }
  }
}