{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetkeep-co-uk/json-schema/fleetkeep-co-uk-vehicle-import-result-schema.json",
  "title": "VehicleImportResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetkeep-co-uk-imports-api-openapi.yml#/components/schemas/VehicleImportResult",
  "type": "object",
  "required": [
    "summary",
    "outcomes"
  ],
  "properties": {
    "replayed": {
      "type": "boolean"
    },
    "summary": {
      "type": "object"
    },
    "outcomes": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "batch": {
      "type": "object",
      "description": "Present for bounded requests. Every requested sourceLine has exactly one outcome; stop if the envelope or summary is incomplete.",
      "required": [
        "batchSize",
        "totalRows",
        "sourceRows",
        "sourceLines",
        "offset",
        "selectionDigest",
        "nextOffset"
      ],
      "properties": {
        "batchSize": {
          "type": "integer",
          "const": 5
        },
        "totalRows": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "sourceRows": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 999
          }
        },
        "sourceLines": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {
            "type": "integer",
            "minimum": 1
          }
        },
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999
        },
        "selectionDigest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "nextOffset": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "maximum": 999
        }
      }
    }
  }
}