{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetkeep-co-uk/json-schema/fleetkeep-co-uk-toll-forwarding-setup-schema.json",
  "title": "TollForwardingSetup",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetkeep-co-uk-openapi.json#/components/schemas/TollForwardingSetup",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "available",
    "enabled",
    "address",
    "pollIntervalMinutes",
    "supportedFormats",
    "limits",
    "recentImports",
    "recentDeliveries"
  ],
  "properties": {
    "available": {
      "type": "boolean"
    },
    "enabled": {
      "type": "boolean"
    },
    "address": {
      "type": [
        "string",
        "null"
      ],
      "description": "Private write-only delivery address for the authenticated account. Share only within its team.",
      "x-sensitive": true
    },
    "pollIntervalMinutes": {
      "type": "integer",
      "enum": [
        60
      ]
    },
    "supportedFormats": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "pdf",
          "csv"
        ]
      }
    },
    "limits": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxAttachments",
        "maxAttachmentBytes"
      ],
      "properties": {
        "maxAttachments": {
          "type": "integer",
          "enum": [
            5
          ]
        },
        "maxAttachmentBytes": {
          "type": "integer",
          "enum": [
            524288
          ]
        }
      }
    },
    "recentImports": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "fileName",
          "source",
          "importedCount",
          "unmatchedCount",
          "duplicateCount",
          "status",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "importedCount": {
            "type": "integer",
            "minimum": 0
          },
          "unmatchedCount": {
            "type": "integer",
            "minimum": 0
          },
          "duplicateCount": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      }
    },
    "recentDeliveries": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "createdAt",
          "status",
          "message"
        ],
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "processed",
              "needs_attention"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}