{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetkeep-co-uk/json-schema/fleetkeep-co-uk-toll-operations-schema.json",
  "title": "TollOperations",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetkeep-co-uk-openapi.json#/components/schemas/TollOperations",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "summary",
    "recent",
    "suggestions"
  ],
  "properties": {
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "totalPence",
        "count",
        "needsReview"
      ],
      "properties": {
        "totalPence": {
          "type": "integer"
        },
        "count": {
          "type": "integer",
          "minimum": 0
        },
        "needsReview": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "recent": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vehicleId",
          "registration",
          "vehicleLabel",
          "providerName",
          "chargeType",
          "chargedOn",
          "amountPence",
          "currency",
          "location",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "registration": {
            "type": "string"
          },
          "vehicleLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerName": {
            "type": "string"
          },
          "chargeType": {
            "type": "string"
          },
          "chargedOn": {
            "type": "string",
            "format": "date"
          },
          "amountPence": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "const": "GBP"
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      }
    },
    "suggestions": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vehicleId",
          "registration",
          "vehicleLabel",
          "providerName",
          "locationName",
          "tollType",
          "detectedAt",
          "distanceMetres",
          "estimatedAmountPence",
          "discountedAmountPence",
          "currency",
          "confidence",
          "status",
          "officialUrl"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "registration": {
            "type": "string"
          },
          "vehicleLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerName": {
            "type": "string"
          },
          "locationName": {
            "type": "string"
          },
          "tollType": {
            "type": "string"
          },
          "detectedAt": {
            "type": "string",
            "format": "date-time"
          },
          "distanceMetres": {
            "type": "integer",
            "minimum": 0
          },
          "estimatedAmountPence": {
            "type": [
              "integer",
              "null"
            ]
          },
          "discountedAmountPence": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency": {
            "type": "string",
            "const": "GBP"
          },
          "confidence": {
            "type": "string",
            "const": "likely"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "confirmed",
              "dismissed",
              "matched"
            ]
          },
          "officialUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      }
    }
  }
}