{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://autoagentprotocol.org/v1.3/schemas/vehicle-detail-request.schema.json",
  "title": "VehicleDetailRequest",
  "description": "Typed AAP request for the `inventory.vehicle` skill. The request MUST identify a specific listing via at least one of `vin`, `stock`, or `vehicle_id`. Carried inside an A2A `Message.parts[].data` DataPart via the A2A `SendMessage` operation.",
  "type": "object",
  "examples": [
    {
      "type": "inventory.vehicle.request",
      "vin": "1HGCV1F30NA123456"
    }
  ],
  "properties": {
    "type": { "const": "inventory.vehicle.request" },
    "vin": {
      "type": "string",
      "pattern": "^[A-HJ-NPR-Z0-9]{17}$",
      "description": "Vehicle Identification Number. Preferred identifier when known.",
      "examples": ["1HGCV1F30NA123456"]
    },
    "stock": {
      "type": "string",
      "description": "Dealer's stock number, used when VIN is not yet assigned (e.g. in-transit units).",
      "examples": ["H12345"]
    },
    "vehicle_id": {
      "type": "string",
      "description": "Dealer-internal vehicle identifier.",
      "examples": ["veh_8f3c1a"]
    }
  },
  "required": ["type"],
  "anyOf": [
    { "required": ["vin"] },
    { "required": ["stock"] },
    { "required": ["vehicle_id"] }
  ],
  "additionalProperties": false
}
