{
  "openapi": "3.1.0",
  "info": {
    "title": "Entopizo Pro API",
    "version": "1.0.0",
    "description": "The Entopizo Pro API gives your own systems read-only access to your organization's fleet: vehicles and fleets, their latest positions and sensor readings (temperatures, doors, fuel level and every other named sensor), position history, trips, events, geofences, points of interest, routes, drivers, the reports the app offers, maintenance dues, vehicle inspections, notification rules, live-location sharing links, tachograph files and their analysis, and reverse geocoding.\n\nThe API **only reads**. It cannot change anything in Entopizo Pro, never sends commands to trackers and cannot change their settings. Every endpoint answers `GET` (and `HEAD`); anything else is `405`.\n\n- Base URL: `https://<your Entopizo Pro address>/api/public/v1`\n- JSON, UTF-8. Times are RFC 3339 in UTC, coordinates WGS84 degrees, speeds km/h, distances km, durations seconds, ids UUIDs.\n- Lists are paged with an opaque cursor: each answer is `{ \"data\": [...], \"nextCursor\": \"…\" }`; pass `nextCursor` as `cursor` to get the next page (up to `limit`=500 items a page) until it is `null`.\n- History, trips, events, reports, inspections and tachograph files are asked for over a period `from` (inclusive) – `to` (exclusive) of at most 31 days; a tachograph analysis over at most 31 days (`from` – `to`, both inclusive).\n- API keys are free. «Try it» on this page uses a demo key on a demo organization with made-up vehicles.\n\n```bash\ncurl -H \"Authorization: Bearer $ENTOPIZO_API_KEY\" \\\n  \"https://pro.entopizo.com/api/public/v1/vehicles?limit=50\"\n```",
    "contact": {
      "name": "Entopizo",
      "url": "https://entopizo.com"
    }
  },
  "servers": [
    {
      "url": "https://pro.entopizo.com/api/public/v1",
      "description": "Entopizo Pro"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Vehicles",
      "description": "The organization’s vehicles (only those the key reads)."
    },
    {
      "name": "Positions",
      "description": "The latest known position and state of each vehicle. Units that report sensors only (telematics, properties) never show a location."
    },
    {
      "name": "Sensors",
      "description": "What each named sensor of a vehicle reads now — fridge and engine temperatures, doors, fuel level, voltages, inputs and every other sensor named in the app — for one vehicle or every vehicle. Their set-up is not part of the API, nor are past sensor values."
    },
    {
      "name": "History",
      "description": "A vehicle’s positions over a period (at most 31 days), oldest first."
    },
    {
      "name": "Trips",
      "description": "Trips that started in a period (at most 31 days), newest first."
    },
    {
      "name": "Events",
      "description": "Events in a period (at most 31 days), newest first: geofences, overspeed, ignition, alarms, sensors and more."
    },
    {
      "name": "Places",
      "description": "Geofences, points of interest and routes drawn on the map, and which geofences a point lies in."
    },
    {
      "name": "Drivers",
      "description": "Drivers and which vehicle each one drove when."
    },
    {
      "name": "Reports",
      "description": "The reports of the app, as typed rows over a period of at most 31 days. GET /reports lists them with their columns."
    },
    {
      "name": "Fleets",
      "description": "The organization’s fleets and how many vehicles each has."
    },
    {
      "name": "Maintenance",
      "description": "Each maintenance schedule (services and renewals) on each vehicle: when it was last done, when it is due by date, kilometres or engine hours, and whether it is overdue, due soon or fine. No costs, vendors or work orders."
    },
    {
      "name": "Inspections",
      "description": "The vehicle inspections drivers submit (DVIR): the checklist answers and the defects found, with their state now; one also as a PDF. At most 31 days at once."
    },
    {
      "name": "Rules",
      "description": "The notification rules: their events, vehicles and geofences and which channels they use. Never their recipients, e-mail addresses, phone numbers, webhook addresses or secrets."
    },
    {
      "name": "Geocoding",
      "description": "The address of a point, only when Entopizo already keeps one from the organization’s trips and events (else null): no new lookups. Limited to 20 a minute and 1 000 a day per key (see «Rate limits»)."
    },
    {
      "name": "Sharing",
      "description": "The links that show vehicles live to people without an account, with their address. Only for keys whose creator manages these links; making or ending one is not part of the API."
    },
    {
      "name": "Tachograph",
      "description": "Tachograph files of driver cards and vehicle units (the list over at most 31 days, and each original DDD file), and their analysis: driving and rest times and infringements of a driver or vehicle over at most 31 days. Indicative, not certified."
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ezp_live_…",
        "description": "An API key made in Entopizo Pro (Settings → Integrations / API): `Authorization: Bearer ezp_live_…`."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_key",
              "ip_not_allowed",
              "scope_missing",
              "not_found",
              "method_not_allowed",
              "invalid_request",
              "range_too_large",
              "rate_limited",
              "internal_error"
            ]
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "parameter": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "parameter",
                "message"
              ]
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "description": "RFC 9457 problem details"
      },
      "Vehicle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Vehicle id"
          },
          "name": {
            "type": "string"
          },
          "plate": {
            "type": [
              "string",
              "null"
            ]
          },
          "vin": {
            "type": [
              "string",
              "null"
            ]
          },
          "brand": {
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "year": {
            "type": [
              "integer",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "description": "car, van, truck, bus, motorcycle, boat, …"
          },
          "fuelType": {
            "type": [
              "string",
              "null"
            ]
          },
          "fleetId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "odometerKm": {
            "type": [
              "number",
              "null"
            ],
            "description": "Odometer, km"
          },
          "engineHours": {
            "type": [
              "number",
              "null"
            ]
          },
          "speedLimitKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Own speed limit, km/h"
          },
          "hasTracker": {
            "type": "boolean",
            "description": "A tracker is fitted"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last change (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "plate",
          "vin",
          "brand",
          "model",
          "year",
          "category",
          "fuelType",
          "fleetId",
          "tags",
          "odometerKm",
          "engineHours",
          "speedLimitKmh",
          "hasTracker",
          "updatedAt"
        ]
      },
      "VehiclePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vehicle"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Position": {
        "type": "object",
        "properties": {
          "vehicleId": {
            "type": "string",
            "format": "uuid",
            "description": "Vehicle id"
          },
          "status": {
            "type": "string",
            "enum": [
              "moving",
              "idle",
              "stopped",
              "offline"
            ],
            "description": "moving; idle (ignition on, not moving); stopped; offline"
          },
          "time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the position fix (RFC 3339, UTC)"
          },
          "lastSeen": {
            "type": "string",
            "format": "date-time",
            "description": "Last message from the tracker (RFC 3339, UTC)"
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude, WGS84 degrees"
          },
          "lon": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude, WGS84 degrees"
          },
          "speedKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Speed, km/h"
          },
          "headingDeg": {
            "type": [
              "number",
              "null"
            ],
            "description": "Course, degrees from north"
          },
          "satellites": {
            "type": [
              "integer",
              "null"
            ],
            "description": "0: no GPS fix (the last known position)"
          },
          "ignition": {
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "vehicleId",
          "status",
          "time",
          "lastSeen",
          "lat",
          "lon",
          "speedKmh",
          "headingDeg",
          "satellites",
          "ignition"
        ]
      },
      "PositionPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Position"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "VehiclePosition": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Position"
          },
          {
            "type": "object",
            "properties": {
              "movement": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "externalVoltage": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Vehicle battery, V"
              },
              "batteryVoltage": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Tracker's own battery, V"
              },
              "gsmSignal": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "odometerKm": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "engineHours": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "driver": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "since": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Driving since (RFC 3339, UTC)"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "since"
                ],
                "description": "The current driver (only with the drivers:read scope)"
              }
            },
            "required": [
              "movement",
              "externalVoltage",
              "batteryVoltage",
              "gsmSignal",
              "odometerKm",
              "engineHours",
              "driver"
            ]
          }
        ]
      },
      "Sensor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "description": "state, reading, enum, text"
          },
          "section": {
            "type": "string"
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "states 1/0, readings scaled; null while not reported"
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "As the app shows it"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "section",
          "unit",
          "value",
          "text",
          "severity"
        ]
      },
      "VehicleSensors": {
        "type": "object",
        "properties": {
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "lastSeen": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last message from the tracker (RFC 3339, UTC)"
          },
          "sensors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sensor"
            }
          }
        },
        "required": [
          "vehicleId",
          "lastSeen",
          "sensors"
        ]
      },
      "HistoryPoint": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the fix (RFC 3339, UTC)"
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude, WGS84 degrees"
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude, WGS84 degrees"
          },
          "speedKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Speed, km/h"
          },
          "headingDeg": {
            "type": [
              "number",
              "null"
            ]
          },
          "ignition": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "valid": {
            "type": "boolean",
            "description": "false: no GPS fix at the time"
          }
        },
        "required": [
          "time",
          "lat",
          "lon",
          "speedKmh",
          "headingDeg",
          "ignition",
          "valid"
        ]
      },
      "HistoryPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryPoint"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "incomplete": {
            "type": "boolean",
            "description": "Part of the period could not be read; ask again later"
          }
        },
        "required": [
          "data",
          "nextCursor",
          "incomplete"
        ]
      },
      "Trip": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ],
            "description": "open: still under way"
          },
          "startTime": {
            "type": "string",
            "format": "date-time",
            "description": "Start (RFC 3339, UTC)"
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "End (RFC 3339, UTC)"
          },
          "start": {
            "type": "object",
            "properties": {
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90,
                "description": "Latitude, WGS84 degrees"
              },
              "lon": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180,
                "description": "Longitude, WGS84 degrees"
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lat",
              "lon",
              "address"
            ]
          },
          "end": {
            "type": "object",
            "properties": {
              "lat": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -90,
                "maximum": 90,
                "description": "Latitude, WGS84 degrees"
              },
              "lon": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": -180,
                "maximum": 180,
                "description": "Longitude, WGS84 degrees"
              },
              "address": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lat",
              "lon",
              "address"
            ]
          },
          "distanceKm": {
            "type": [
              "number",
              "null"
            ]
          },
          "maxSpeedKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highest speed, km/h"
          },
          "avgSpeedKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Average speed, km/h"
          },
          "drivingSeconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "idleSeconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "driverName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "vehicleId",
          "status",
          "startTime",
          "endTime",
          "start",
          "end",
          "distanceKm",
          "maxSpeedKmh",
          "avgSpeedKmh",
          "drivingSeconds",
          "idleSeconds",
          "driverName"
        ]
      },
      "TripPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trip"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "geofence_enter",
              "geofence_exit",
              "overspeed",
              "ignition_on",
              "ignition_off",
              "alarm",
              "dvir_critical_defect",
              "dvir_missing",
              "maintenance_due",
              "document_expiring",
              "custom",
              "backup_active",
              "tacho_overdue",
              "road_overspeed",
              "shift_start",
              "shift_end",
              "sensor",
              "towing",
              "device_movement",
              "device_offline",
              "device_online",
              "movement_start",
              "shallow_water",
              "fuel_refuel",
              "fuel_drain",
              "long_stop",
              "battery_low",
              "power_loss"
            ]
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened (RFC 3339, UTC)"
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it ended (overspeed, …) (RFC 3339, UTC)"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "lat": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude, WGS84 degrees"
          },
          "lon": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude, WGS84 degrees"
          },
          "speedKmh": {
            "type": [
              "number",
              "null"
            ],
            "description": "Speed, km/h"
          },
          "geofenceId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "geofenceName": {
            "type": [
              "string",
              "null"
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Some of: maxSpeed, limit, road, geofence, alarm, idleMinutes, title, message, severity, lastSeen, offlineAfterMinutes"
          }
        },
        "required": [
          "id",
          "type",
          "time",
          "endTime",
          "vehicleId",
          "lat",
          "lon",
          "speedKmh",
          "geofenceId",
          "geofenceName",
          "details"
        ]
      },
      "EventPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Geofence": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "shape": {
            "type": "string",
            "enum": [
              "circle",
              "polygon"
            ]
          },
          "center": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "minimum": -90,
                "maximum": 90,
                "description": "Latitude, WGS84 degrees"
              },
              "lon": {
                "type": "number",
                "minimum": -180,
                "maximum": 180,
                "description": "Longitude, WGS84 degrees"
              }
            },
            "required": [
              "lat",
              "lon"
            ],
            "description": "A circle’s centre"
          },
          "radiusM": {
            "type": [
              "number",
              "null"
            ],
            "description": "A circle’s radius, metres"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number",
                  "minimum": -90,
                  "maximum": 90,
                  "description": "Latitude, WGS84 degrees"
                },
                "lon": {
                  "type": "number",
                  "minimum": -180,
                  "maximum": 180,
                  "description": "Longitude, WGS84 degrees"
                }
              },
              "required": [
                "lat",
                "lon"
              ]
            },
            "description": "A polygon’s corners (empty for a circle)"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last change (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "shape",
          "center",
          "radiusM",
          "points",
          "updatedAt"
        ]
      },
      "GeofencePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Geofence"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Poi": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude, WGS84 degrees"
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude, WGS84 degrees"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last change (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "lat",
          "lon",
          "updatedAt"
        ]
      },
      "PoiPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Poi"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Route": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lat": {
                  "type": "number",
                  "minimum": -90,
                  "maximum": 90,
                  "description": "Latitude, WGS84 degrees"
                },
                "lon": {
                  "type": "number",
                  "minimum": -180,
                  "maximum": 180,
                  "description": "Longitude, WGS84 degrees"
                }
              },
              "required": [
                "lat",
                "lon"
              ]
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last change (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "points",
          "updatedAt"
        ]
      },
      "RoutePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Route"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Driver": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "fleetId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "licenseExpiresOn": {
            "type": [
              "string",
              "null"
            ],
            "description": "YYYY-MM-DD"
          },
          "currentVehicle": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "vehicleId": {
                "type": "string",
                "format": "uuid"
              },
              "since": {
                "type": "string",
                "format": "date-time",
                "description": "Driving since (RFC 3339, UTC)"
              }
            },
            "required": [
              "vehicleId",
              "since"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "email",
          "fleetId",
          "licenseExpiresOn",
          "currentVehicle"
        ]
      },
      "DriverPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Driver"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "DriverAssignment": {
        "type": "object",
        "properties": {
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Start (RFC 3339, UTC)"
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "End; null while it lasts (RFC 3339, UTC)"
          },
          "source": {
            "type": "string",
            "description": "manual, card, ble_tag, …"
          }
        },
        "required": [
          "vehicleId",
          "from",
          "to",
          "source"
        ]
      },
      "AssignmentPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DriverAssignment"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "ReportType": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "summary",
              "daily",
              "trips",
              "drivers",
              "stops",
              "overspeed",
              "geofences",
              "events",
              "inspections",
              "haccp",
              "fuel"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "datetime",
                    "date",
                    "duration",
                    "km",
                    "speed",
                    "count",
                    "coords",
                    "event",
                    "decimal"
                  ]
                }
              },
              "required": [
                "key",
                "type"
              ]
            }
          }
        },
        "required": [
          "type",
          "title",
          "description",
          "columns"
        ]
      },
      "ReportTypeList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportType"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Report": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "summary",
              "daily",
              "trips",
              "drivers",
              "stops",
              "overspeed",
              "geofences",
              "events",
              "inspections",
              "haccp",
              "fuel"
            ]
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period (RFC 3339, UTC)"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period (exclusive) (RFC 3339, UTC)"
          },
          "timeZone": {
            "type": "string",
            "description": "Days and dates of the rows are in this zone"
          },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "datetime",
                    "date",
                    "duration",
                    "km",
                    "speed",
                    "count",
                    "coords",
                    "event",
                    "decimal"
                  ],
                  "description": "datetime: RFC 3339; duration: seconds; km; speed: km/h; coords: [lat, lon]; decimal: a measured value (°C, litres, %)"
                },
                "label": {
                  "type": "string"
                },
                "total": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "sum",
                    "max"
                  ]
                }
              },
              "required": [
                "key",
                "type",
                "label",
                "total"
              ]
            }
          },
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "totals": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {}
          },
          "truncated": {
            "type": "boolean",
            "description": "More rows than the 20 000 sent"
          }
        },
        "required": [
          "type",
          "from",
          "to",
          "timeZone",
          "columns",
          "rows",
          "totals",
          "truncated"
        ]
      },
      "VehicleSensorsPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleSensors"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "GeofenceList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Geofence"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Fleet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "vehicleCount": {
            "type": "integer",
            "description": "Vehicles in the fleet (not archived)"
          }
        },
        "required": [
          "id",
          "name",
          "vehicleCount"
        ]
      },
      "FleetPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fleet"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "MaintenanceItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The schedule on this vehicle"
          },
          "scheduleId": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleName": {
            "type": "string"
          },
          "plate": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "service",
              "renewal"
            ]
          },
          "title": {
            "type": "string",
            "description": "The schedule’s name, e.g. «Oil change»"
          },
          "everyKm": {
            "type": [
              "integer",
              "null"
            ]
          },
          "everyHours": {
            "type": [
              "integer",
              "null"
            ]
          },
          "everyMonths": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastDoneOn": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last done (YYYY-MM-DD, the organization’s day)"
          },
          "lastDoneKm": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastDoneHours": {
            "type": [
              "integer",
              "null"
            ]
          },
          "dueOn": {
            "type": [
              "string",
              "null"
            ],
            "description": "Next due by date (YYYY-MM-DD, the organization’s day)"
          },
          "dueKm": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Next due at this odometer, km"
          },
          "dueHours": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Next due at these engine hours"
          },
          "status": {
            "type": "string",
            "enum": [
              "overdue",
              "due_soon",
              "ok",
              "unknown"
            ],
            "description": "overdue: past its due; due_soon: within its margin; ok; unknown: no due, or no meter reading to judge it by"
          },
          "dueBy": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "date",
                "km",
                "hours"
              ]
            },
            "description": "What made it overdue or due soon"
          },
          "remainingDays": {
            "type": [
              "integer",
              "null"
            ]
          },
          "remainingKm": {
            "type": [
              "number",
              "null"
            ]
          },
          "remainingHours": {
            "type": [
              "number",
              "null"
            ]
          },
          "odometerKm": {
            "type": [
              "number",
              "null"
            ],
            "description": "The vehicle’s odometer now, km"
          },
          "engineHours": {
            "type": [
              "number",
              "null"
            ],
            "description": "The vehicle’s engine hours now"
          }
        },
        "required": [
          "id",
          "scheduleId",
          "vehicleId",
          "vehicleName",
          "plate",
          "kind",
          "title",
          "everyKm",
          "everyHours",
          "everyMonths",
          "lastDoneOn",
          "lastDoneKm",
          "lastDoneHours",
          "dueOn",
          "dueKm",
          "dueHours",
          "status",
          "dueBy",
          "remainingDays",
          "remainingKm",
          "remainingHours",
          "odometerKm",
          "engineHours"
        ]
      },
      "MaintenancePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaintenanceItem"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "MaintenanceList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaintenanceItem"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Inspection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleId": {
            "type": "string",
            "format": "uuid"
          },
          "vehicleName": {
            "type": [
              "string",
              "null"
            ]
          },
          "driverId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "driverName": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "pre_trip",
              "post_trip"
            ]
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "When it was submitted (RFC 3339, UTC)"
          },
          "odometerKm": {
            "type": [
              "integer",
              "null"
            ],
            "description": "As the inspector typed it"
          },
          "defectCount": {
            "type": "integer",
            "description": "Checklist lines found not OK"
          },
          "unsafe": {
            "type": "boolean",
            "description": "A critical defect was found: the vehicle should not be driven"
          }
        },
        "required": [
          "id",
          "vehicleId",
          "vehicleName",
          "driverId",
          "driverName",
          "kind",
          "time",
          "odometerKm",
          "defectCount",
          "unsafe"
        ]
      },
      "InspectionPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Inspection"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "InspectionDefect": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "item": {
            "type": "string",
            "description": "The checklist line"
          },
          "critical": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the inspector wrote"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "repaired",
              "not_needed"
            ]
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it was closed (RFC 3339, UTC)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was found (RFC 3339, UTC)"
          },
          "carriedOver": {
            "type": "boolean",
            "description": "Still open from an earlier inspection, found again in this one"
          }
        },
        "required": [
          "id",
          "item",
          "critical",
          "note",
          "status",
          "resolvedAt",
          "createdAt",
          "carriedOver"
        ]
      },
      "InspectionDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Inspection"
          },
          {
            "type": "object",
            "properties": {
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "itemId": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "critical": {
                      "type": "boolean"
                    },
                    "ok": {
                      "type": "boolean"
                    },
                    "note": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "itemId",
                    "label",
                    "critical",
                    "ok",
                    "note"
                  ]
                }
              },
              "defects": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InspectionDefect"
                }
              }
            },
            "required": [
              "notes",
              "items",
              "defects"
            ]
          }
        ]
      },
      "NotificationRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "personal": {
            "type": "boolean",
            "description": "A member’s own rule (sent only to them), not the organization’s"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "geofence_enter",
                "geofence_exit",
                "overspeed",
                "ignition_on",
                "ignition_off",
                "alarm",
                "dvir_critical_defect",
                "dvir_missing",
                "maintenance_due",
                "document_expiring",
                "custom",
                "backup_active",
                "tacho_overdue",
                "road_overspeed",
                "shift_start",
                "shift_end",
                "sensor",
                "towing",
                "device_movement",
                "device_offline",
                "device_online",
                "movement_start",
                "shallow_water",
                "fuel_refuel",
                "fuel_drain",
                "long_stop",
                "battery_low",
                "power_loss"
              ]
            }
          },
          "allVehicles": {
            "type": "boolean",
            "description": "true: every vehicle (vehicleIds is empty)"
          },
          "vehicleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "geofenceIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only these geofences (geofence events); empty for all"
          },
          "channels": {
            "type": "object",
            "properties": {
              "inApp": {
                "type": "boolean"
              },
              "push": {
                "type": "boolean"
              },
              "email": {
                "type": "boolean"
              },
              "webhook": {
                "type": "boolean"
              }
            },
            "required": [
              "inApp",
              "push",
              "email",
              "webhook"
            ],
            "description": "Which channels it uses (never their addresses)"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last change (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "enabled",
          "personal",
          "eventTypes",
          "allVehicles",
          "vehicleIds",
          "geofenceIds",
          "channels",
          "updatedAt"
        ]
      },
      "NotificationRulePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationRule"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "ReverseGeocode": {
        "type": "object",
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "The latitude looked up (rounded to 4 decimals, ~10 m)"
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "The longitude looked up (rounded to 4 decimals, ~10 m)"
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "A short address; null where none is known"
          }
        },
        "required": [
          "lat",
          "lon",
          "address"
        ]
      },
      "ShareLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The public link: whoever has it sees these vehicles live until it ends"
          },
          "vehicleIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "revoked"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Made (RFC 3339, UTC)"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Ends (RFC 3339, UTC)"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Revoked (RFC 3339, UTC)"
          },
          "viewCount": {
            "type": "integer"
          },
          "lastViewedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last opened (RFC 3339, UTC)"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "vehicleIds",
          "status",
          "createdAt",
          "expiresAt",
          "revokedAt",
          "viewCount",
          "lastViewedAt"
        ]
      },
      "ShareLinkPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShareLink"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "TachoFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "driver_card",
              "vu"
            ]
          },
          "vehicleId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "vehicleName": {
            "type": [
              "string",
              "null"
            ]
          },
          "driverName": {
            "type": [
              "string",
              "null"
            ]
          },
          "cardNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The driver card (driver_card files)"
          },
          "plate": {
            "type": [
              "string",
              "null"
            ],
            "description": "As the vehicle unit recorded it"
          },
          "periodStart": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "First day it covers (RFC 3339, UTC)"
          },
          "periodEnd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last day it covers (RFC 3339, UTC)"
          },
          "downloadedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Downloaded from the tachograph (RFC 3339, UTC)"
          },
          "size": {
            "type": "integer",
            "description": "Bytes"
          },
          "parsed": {
            "type": "boolean",
            "description": "Read for Tacho Analytics"
          }
        },
        "required": [
          "id",
          "kind",
          "vehicleId",
          "vehicleName",
          "driverName",
          "cardNumber",
          "plate",
          "periodStart",
          "periodEnd",
          "downloadedAt",
          "size",
          "parsed"
        ]
      },
      "TachoFilePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TachoFile"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; null on the last page"
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "TachoSubjects": {
        "type": "object",
        "properties": {
          "vehicles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "plate"
              ]
            }
          },
          "drivers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cardNumber": {
                  "type": "string"
                },
                "driverName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driverId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "lastDownloadAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Latest card download (RFC 3339, UTC)"
                }
              },
              "required": [
                "cardNumber",
                "driverName",
                "driverId",
                "lastDownloadAt"
              ]
            }
          }
        },
        "required": [
          "vehicles",
          "drivers"
        ]
      },
      "TachoFinding": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The article, e.g. 6.1, 7, 8.2"
          },
          "type": {
            "type": "string"
          },
          "severity": {
            "type": [
              "string",
              "null"
            ],
            "description": "minor, serious, very-serious, most-serious, uncertain, uncategorized"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "The UTC day it concerns (YYYY-MM-DD)"
          },
          "minutes": {
            "type": [
              "number",
              "null"
            ]
          },
          "text": {
            "type": "string",
            "description": "In English"
          }
        },
        "required": [
          "code",
          "type",
          "severity",
          "date",
          "minutes",
          "text"
        ]
      },
      "TachoAnalysis": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "no_files",
              "unreadable",
              "error"
            ]
          },
          "disclaimer": {
            "type": "string",
            "description": "Indicative, not certified"
          },
          "subject": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "driver_card",
                  "vu"
                ]
              },
              "key": {
                "type": "string",
                "description": "The card number or the vehicle id"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind",
              "key",
              "name"
            ]
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "computedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When it was worked out (RFC 3339, UTC)"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "downloadedAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Downloaded (RFC 3339, UTC)"
                },
                "periodStart": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "First day (RFC 3339, UTC)"
                },
                "periodEnd": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Last day (RFC 3339, UTC)"
                }
              },
              "required": [
                "id",
                "downloadedAt",
                "periodStart",
                "periodEnd"
              ]
            }
          },
          "summary": {
            "type": "object",
            "properties": {
              "violations": {
                "type": "integer"
              },
              "bySeverity": {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "byType": {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                }
              },
              "usageErrors": {
                "type": "integer"
              },
              "anomalies": {
                "type": "integer"
              }
            },
            "required": [
              "violations",
              "bySeverity",
              "byType",
              "usageErrors",
              "anomalies"
            ]
          },
          "violations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TachoFinding"
            },
            "description": "Infringements of EU 561/2006 and 165/2014"
          },
          "usageErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TachoFinding"
            }
          },
          "anomalies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TachoFinding"
            }
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "distanceKm": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "totals": {
                  "type": "object",
                  "properties": {
                    "driving": {
                      "type": "number"
                    },
                    "work": {
                      "type": "number"
                    },
                    "availability": {
                      "type": "number"
                    },
                    "rest": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "driving",
                    "work",
                    "availability",
                    "rest"
                  ],
                  "description": "Minutes of each activity"
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "activity": {
                        "type": "string",
                        "enum": [
                          "driving",
                          "work",
                          "availability",
                          "rest"
                        ]
                      },
                      "start": {
                        "type": "number",
                        "description": "Minutes from midnight UTC"
                      },
                      "end": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "description": "null while the day is open"
                      },
                      "cardOut": {
                        "type": "boolean"
                      },
                      "crew": {
                        "type": "boolean"
                      },
                      "coDriver": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "activity",
                      "start",
                      "end",
                      "cardOut",
                      "crew",
                      "coDriver"
                    ]
                  },
                  "description": "The day’s activities"
                }
              },
              "required": [
                "date",
                "distanceKm",
                "totals",
                "segments"
              ]
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "driving": {
                "type": "number"
              },
              "work": {
                "type": "number"
              },
              "availability": {
                "type": "number"
              },
              "rest": {
                "type": "number"
              },
              "distanceKm": {
                "type": "number"
              },
              "days": {
                "type": "integer"
              }
            },
            "required": [
              "driving",
              "work",
              "availability",
              "rest",
              "distanceKm",
              "days"
            ],
            "description": "Minutes of each activity"
          }
        },
        "required": [
          "status",
          "disclaimer",
          "subject",
          "from",
          "to",
          "computedAt",
          "files",
          "summary",
          "violations",
          "usageErrors",
          "anomalies",
          "days",
          "totals"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/vehicles": {
      "get": {
        "operationId": "getVehicles",
        "tags": [
          "Vehicles"
        ],
        "summary": "List vehicles",
        "description": "Scope: `vehicles:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehiclePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}": {
      "get": {
        "operationId": "getVehiclesId",
        "tags": [
          "Vehicles"
        ],
        "summary": "Get a vehicle",
        "description": "Scope: `vehicles:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/positions": {
      "get": {
        "operationId": "getPositions",
        "tags": [
          "Positions"
        ],
        "summary": "Latest position of every vehicle",
        "description": "Vehicles that have never reported are not listed.\n\nScope: `positions:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "positions:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}/position": {
      "get": {
        "operationId": "getVehiclesIdPosition",
        "tags": [
          "Positions"
        ],
        "summary": "A vehicle's latest position and state",
        "description": "Scope: `positions:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "positions:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehiclePosition"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}/sensors": {
      "get": {
        "operationId": "getVehiclesIdSensors",
        "tags": [
          "Sensors"
        ],
        "summary": "A vehicle's sensor readings",
        "description": "Scope: `sensors:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "sensors:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleSensors"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}/history": {
      "get": {
        "operationId": "getVehiclesIdHistory",
        "tags": [
          "History"
        ],
        "summary": "A vehicle's positions over a period",
        "description": "Oldest first, at most 31 days at once.\n\nScope: `history:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "history:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/trips": {
      "get": {
        "operationId": "getTrips",
        "tags": [
          "Trips"
        ],
        "summary": "Trips that started in a period",
        "description": "Newest first, at most 31 days at once.\n\nScope: `trips:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "trips:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Only this vehicle"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TripPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "getEvents",
        "tags": [
          "Events"
        ],
        "summary": "Events in a period",
        "description": "Newest first, at most 31 days at once.\n\nScope: `events:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "events:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Only this vehicle"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only these types, comma-separated (geofence_enter, geofence_exit, overspeed, ignition_on, ignition_off, alarm, dvir_critical_defect, dvir_missing, maintenance_due, document_expiring, custom, backup_active, tacho_overdue, road_overspeed, shift_start, shift_end, sensor, towing, device_movement, device_offline, device_online, movement_start, shallow_water, fuel_refuel, fuel_drain, long_stop, battery_low, power_loss)",
              "example": "overspeed,geofence_enter"
            },
            "required": false,
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/geofences": {
      "get": {
        "operationId": "getGeofences",
        "tags": [
          "Places"
        ],
        "summary": "List geofences",
        "description": "Scope: `places:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "places:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeofencePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/pois": {
      "get": {
        "operationId": "getPois",
        "tags": [
          "Places"
        ],
        "summary": "List points of interest",
        "description": "Scope: `places:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "places:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoiPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/routes": {
      "get": {
        "operationId": "getRoutes",
        "tags": [
          "Places"
        ],
        "summary": "List routes drawn on the map",
        "description": "Scope: `places:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "places:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/drivers": {
      "get": {
        "operationId": "getDrivers",
        "tags": [
          "Drivers"
        ],
        "summary": "List drivers",
        "description": "Scope: `drivers:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "drivers:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriverPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/drivers/{id}/assignments": {
      "get": {
        "operationId": "getDriversIdAssignments",
        "tags": [
          "Drivers"
        ],
        "summary": "A driver's assignments to vehicles",
        "description": "Newest first (the last 50).\n\nScope: `drivers:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "drivers:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The driver id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignmentPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/reports": {
      "get": {
        "operationId": "getReports",
        "tags": [
          "Reports"
        ],
        "summary": "List the reports",
        "description": "Scope: `reports:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "reports:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "el"
              ],
              "default": "en",
              "description": "Language of the column labels and report titles"
            },
            "required": false,
            "name": "lang",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportTypeList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/reports/{type}": {
      "get": {
        "operationId": "getReportsType",
        "tags": [
          "Reports"
        ],
        "summary": "Run a report",
        "description": "Rows over a period of at most 31 days.\n\nScope: `reports:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "reports:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "daily",
                "trips",
                "drivers",
                "stops",
                "overspeed",
                "geofences",
                "events",
                "inspections",
                "haccp",
                "fuel"
              ],
              "description": "The report (see GET /reports)"
            },
            "required": true,
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only these vehicles, comma-separated ids (at most 500)"
            },
            "required": false,
            "name": "vehicleIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "el"
              ],
              "default": "en",
              "description": "Language of the column labels and report titles"
            },
            "required": false,
            "name": "lang",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/sensors": {
      "get": {
        "operationId": "getSensors",
        "tags": [
          "Sensors"
        ],
        "summary": "Sensor readings of every vehicle",
        "description": "What each named sensor reads now (temperatures, doors, fuel level, …), a page of vehicles at a time.\n\nScope: `sensors:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "sensors:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Vehicles per page (1–100)",
              "example": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleSensorsPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/geofences/containing": {
      "get": {
        "operationId": "getGeofencesContaining",
        "tags": [
          "Places"
        ],
        "summary": "Geofences a point lies in",
        "description": "Scope: `places:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "places:read",
        "parameters": [
          {
            "schema": {
              "type": [
                "number",
                "null"
              ],
              "minimum": -90,
              "maximum": 90,
              "description": "Latitude, WGS84 degrees",
              "example": 37.9838
            },
            "required": false,
            "name": "lat",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "number",
                "null"
              ],
              "minimum": -180,
              "maximum": 180,
              "description": "Longitude, WGS84 degrees",
              "example": 23.7275
            },
            "required": false,
            "name": "lon",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeofenceList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/fleets": {
      "get": {
        "operationId": "getFleets",
        "tags": [
          "Fleets"
        ],
        "summary": "List fleets",
        "description": "A key limited to a fleet sees only that fleet; a key limited to some vehicles sees none.\n\nScope: `vehicles:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/maintenance": {
      "get": {
        "operationId": "getMaintenance",
        "tags": [
          "Maintenance"
        ],
        "summary": "What maintenance is due on each vehicle",
        "description": "Every schedule on every vehicle the key reads, the most urgent first.\n\nScope: `maintenance:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "maintenance:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Only this vehicle"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "service",
                "renewal"
              ],
              "description": "service (oil, tyres, …) or renewal (insurance, inspection, …)"
            },
            "required": false,
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenancePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}/maintenance": {
      "get": {
        "operationId": "getVehiclesIdMaintenance",
        "tags": [
          "Maintenance"
        ],
        "summary": "A vehicle's maintenance schedules and dues",
        "description": "Scope: `maintenance:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "maintenance:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/inspections": {
      "get": {
        "operationId": "getInspections",
        "tags": [
          "Inspections"
        ],
        "summary": "Vehicle inspections submitted in a period",
        "description": "Newest first, at most 31 days at once.\n\nScope: `inspections:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "inspections:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Only this vehicle"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/inspections/{id}": {
      "get": {
        "operationId": "getInspectionsId",
        "tags": [
          "Inspections"
        ],
        "summary": "An inspection with its checklist and defects",
        "description": "Scope: `inspections:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "inspections:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The inspection id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionDetail"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/inspections/{id}/pdf": {
      "get": {
        "operationId": "getInspectionsIdPdf",
        "tags": [
          "Inspections"
        ],
        "summary": "An inspection as a PDF",
        "description": "As the app prints it: checklist, defects, their photos and the signature.\n\nScope: `inspections:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "inspections:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The inspection id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "el"
              ],
              "default": "en",
              "description": "Language of the PDF"
            },
            "required": false,
            "name": "lang",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/rules": {
      "get": {
        "operationId": "getRules",
        "tags": [
          "Rules"
        ],
        "summary": "List notification rules",
        "description": "What each rule reacts to and on which vehicles. Never its recipients, addresses, phone numbers or webhook.\n\nScope: `rules:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "rules:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationRulePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/geocode/reverse": {
      "get": {
        "operationId": "getGeocodeReverse",
        "tags": [
          "Geocoding"
        ],
        "summary": "The kept address of a point",
        "description": "Only an address Entopizo already keeps (from the organization's trips and events, ~10 m); otherwise `address` is null. At most 20 a minute and 1000 a day per key, besides the key's own limits.\n\nScope: `geocoding:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "geocoding:read",
        "parameters": [
          {
            "schema": {
              "type": [
                "number",
                "null"
              ],
              "minimum": -90,
              "maximum": 90,
              "description": "Latitude, WGS84 degrees",
              "example": 37.9838
            },
            "required": false,
            "name": "lat",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "number",
                "null"
              ],
              "minimum": -180,
              "maximum": 180,
              "description": "Longitude, WGS84 degrees",
              "example": 23.7275
            },
            "required": false,
            "name": "lon",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReverseGeocode"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/shares": {
      "get": {
        "operationId": "getShares",
        "tags": [
          "Sharing"
        ],
        "summary": "List live-location sharing links",
        "description": "Only for keys whose creator manages sharing links. Ended links stay listed for 30 days.\n\nScope: `sharing:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "sharing:read",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkPage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/tacho/files": {
      "get": {
        "operationId": "getTachoFiles",
        "tags": [
          "Tachograph"
        ],
        "summary": "Tachograph files downloaded in a period",
        "description": "Driver cards and vehicle units, newest first, at most 31 days at once.\n\nScope: `tacho:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "tacho:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Start of the period, inclusive (RFC 3339)",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "End of the period, exclusive (RFC 3339); at most 31 days after `from`",
              "example": "2026-11-02T00:00:00Z"
            },
            "required": true,
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Only this vehicle’s files"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{1,32}$",
              "description": "Only this driver card’s files"
            },
            "required": false,
            "name": "cardNumber",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "driver_card",
                "vu"
              ],
              "description": "driver_card: a driver’s card; vu: the vehicle unit"
            },
            "required": false,
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100,
              "description": "Items per page (1–500)",
              "example": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 512,
              "description": "The `nextCursor` of the previous page; leave out for the first"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TachoFilePage"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/tacho/files/{id}/download": {
      "get": {
        "operationId": "getTachoFilesIdDownload",
        "tags": [
          "Tachograph"
        ],
        "summary": "The original tachograph file (DDD)",
        "description": "Each download is recorded in the organization’s audit log.\n\nScope: `tacho:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "tacho:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The file id"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/tacho/subjects": {
      "get": {
        "operationId": "getTachoSubjects",
        "tags": [
          "Tachograph"
        ],
        "summary": "Drivers and vehicles that can be analysed",
        "description": "Scope: `tacho:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "tacho:read",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TachoSubjects"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/tacho/analysis": {
      "get": {
        "operationId": "getTachoAnalysis",
        "tags": [
          "Tachograph"
        ],
        "summary": "Driving and rest times and infringements",
        "description": "Of a driver card or a vehicle over at most 31 days. Indicative, not certified.\n\nScope: `tacho:read`.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "x-scope": "tacho:read",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The vehicle to analyse (or cardNumber)"
            },
            "required": false,
            "name": "vehicleId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9]{1,32}$",
              "description": "The driver card to analyse (or vehicleId)"
            },
            "required": false,
            "name": "cardNumber",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "First day (YYYY-MM-DD, inclusive)",
              "example": "2026-11-01"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "Last day; at most 31 days with `from` (YYYY-MM-DD, inclusive)",
              "example": "2026-11-01"
            },
            "required": true,
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed a minute",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in this minute (and day)",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the limit resets",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TachoAnalysis"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is not valid; `range_too_large`: The period asked for is too long",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_key`: The API key is missing, unknown, expired or revoked",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "`ip_not_allowed`: The API key is not accepted from this address; `scope_missing`: The API key does not have the scope this needs",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: Not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "notificationRuleEvent": {
      "post": {
        "summary": "An event that matched a notification rule",
        "description": "Sent to the https address of a notification rule. Verify `X-Entopizo-Signature` before trusting the body (see «Webhooks»).",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Seconds since 1970 (UTC) when the call was signed"
            },
            "required": true,
            "name": "X-Entopizo-Timestamp",
            "in": "header"
          },
          {
            "schema": {
              "type": "string",
              "description": "`sha256=` + hex HMAC-SHA256 of `<timestamp>.<body>` with the rule’s secret"
            },
            "required": true,
            "name": "X-Entopizo-Signature",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx within 5 seconds. Timeouts, network errors, 429 and 5xx are retried after 10 s and 1 min."
          }
        }
      }
    }
  },
  "x-scopes": [
    "vehicles:read",
    "positions:read",
    "sensors:read",
    "history:read",
    "trips:read",
    "events:read",
    "places:read",
    "drivers:read",
    "reports:read",
    "maintenance:read",
    "inspections:read",
    "rules:read",
    "geocoding:read",
    "sharing:read",
    "tacho:read"
  ],
  "x-demo-scopes": [
    "vehicles:read",
    "positions:read",
    "sensors:read",
    "history:read",
    "trips:read",
    "events:read",
    "places:read",
    "drivers:read",
    "reports:read",
    "maintenance:read",
    "inspections:read",
    "rules:read",
    "sharing:read",
    "tacho:read"
  ],
  "x-rate-limits": {
    "perMinute": 60,
    "perDay": 10000,
    "demoPerMinute": 20,
    "geocodePerMinute": 20,
    "geocodePerDay": 1000,
    "maxPage": 500,
    "maxRangeDays": 31
  },
  "x-errors": {
    "invalid_key": {
      "status": 401,
      "title": "The API key is missing, unknown, expired or revoked"
    },
    "ip_not_allowed": {
      "status": 403,
      "title": "The API key is not accepted from this address"
    },
    "scope_missing": {
      "status": 403,
      "title": "The API key does not have the scope this needs"
    },
    "not_found": {
      "status": 404,
      "title": "Not found"
    },
    "method_not_allowed": {
      "status": 405,
      "title": "The public API only reads: GET and HEAD"
    },
    "invalid_request": {
      "status": 400,
      "title": "The request is not valid"
    },
    "range_too_large": {
      "status": 400,
      "title": "The period asked for is too long"
    },
    "rate_limited": {
      "status": 429,
      "title": "Too many requests"
    },
    "internal_error": {
      "status": 500,
      "title": "Something went wrong on our side"
    }
  },
  "x-demo-key": "ezp_demo_BFSaQxTl-TmScC2draQsdhdJ6gR9VreB2FmFJex23rE"
}