{
  "openapi": "3.1.0",
  "info": {
    "title": "Mietflott API",
    "version": "1.0.0",
    "description": "The API of Mietflott for rental companies. Keys are created by an owner under Settings, API access."
  },
  "servers": [
    {
      "url": "/api/public/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/key": {
      "get": {
        "operationId": "getKey",
        "summary": "The key of the request, its scopes and the company",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyInfo"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, demo.not_available, plan.limit_customer_api, plan.no_access, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles": {
      "get": {
        "operationId": "listVehicles",
        "summary": "Vehicles, in the order they were added",
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "retired"
              ]
            }
          },
          {
            "name": "classId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehiclePage"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/availability": {
      "get": {
        "operationId": "getAvailability",
        "summary": "Vehicles free for a period, with the price they would be booked at",
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "name": "classId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vehicles/{id}": {
      "get": {
        "operationId": "getVehicle",
        "summary": "One vehicle",
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Vehicle"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vehicle-classes": {
      "get": {
        "operationId": "listVehicleClasses",
        "summary": "Vehicle classes with prices",
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleClassList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/locations": {
      "get": {
        "operationId": "listLocations",
        "summary": "Locations",
        "x-scope": "vehicles:read",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "operationId": "listBookings",
        "summary": "Bookings, requests or offers: upcoming and running soonest first, then the others latest first",
        "x-scope": "bookings:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "booking",
                "request",
                "offer"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingPage"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createBooking",
        "summary": "Book vehicles for a renter, with the same rules as in the app",
        "x-scope": "bookings:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeating a POST with the same key and body within 24 hours returns the first answer.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBooking"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.idempotency_in_progress, api.idempotency_key_reused, api.key_invalid, api.scope_missing, booking.shorter_than_minimum, booking.time_rules, booking.vehicle_retired, booking.vehicle_unavailable, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, plan.read_only, promotion.code_not_valid, renter.blocked, request.too_large, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "operationId": "getBooking",
        "summary": "One booking, request or offer",
        "x-scope": "bookings:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/cancellation-proposal": {
      "get": {
        "operationId": "getCancellationProposal",
        "summary": "The fee the cancellation terms propose for cancelling today",
        "x-scope": "bookings:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancellationProposal"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, booking.not_booked, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/cancel": {
      "post": {
        "operationId": "cancelBooking",
        "summary": "Cancel a confirmed booking before the pick-up",
        "x-scope": "bookings:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeating a POST with the same key and body within 24 hours returns the first answer.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelBooking"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.idempotency_in_progress, api.idempotency_key_reused, api.key_invalid, api.scope_missing, booking.invoiced, booking.not_changeable, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, plan.read_only, request.not_found, request.too_large, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/handovers": {
      "get": {
        "operationId": "listBookingHandovers",
        "summary": "Pick-ups and returns of a booking",
        "x-scope": "handovers:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HandoverList"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/booking-requests": {
      "post": {
        "operationId": "createBookingRequest",
        "summary": "Record a request the office answers with an offer or a booking",
        "x-scope": "bookings:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeating a POST with the same key and body within 24 hours returns the first answer.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.idempotency_in_progress, api.idempotency_key_reused, api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, plan.read_only, request.too_large, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/renters": {
      "get": {
        "operationId": "listRenters",
        "summary": "People in the records, oldest entry first",
        "x-scope": "renters:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenterPage"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createRenter",
        "summary": "Add a person to the records",
        "x-scope": "renters:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Repeating a POST with the same key and body within 24 hours returns the first answer.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRenter"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Renter"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.idempotency_in_progress, api.idempotency_key_reused, api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, plan.read_only, request.too_large, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/renters/{id}": {
      "get": {
        "operationId": "getRenter",
        "summary": "One person from the records",
        "x-scope": "renters:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Renter"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateRenter",
        "summary": "Change name, address, contact, birth date or note",
        "x-scope": "renters:write",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRenter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Renter"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.idempotency_in_progress, api.idempotency_key_reused, api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, plan.read_only, request.not_found, request.too_large, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "operationId": "listInvoices",
        "summary": "Invoices, newest first",
        "x-scope": "invoices:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "overdue"
              ]
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePage"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.too_many, validation.failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "One invoice",
        "x-scope": "invoices:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}/pdf": {
      "get": {
        "operationId": "getInvoicePdf",
        "summary": "The invoice as PDF",
        "x-scope": "invoices:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/handovers/{id}": {
      "get": {
        "operationId": "getHandover",
        "summary": "One handover",
        "x-scope": "handovers:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "The ETag of an earlier answer; 304 when nothing changed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Handover"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/handovers/{id}/protocol": {
      "get": {
        "operationId": "getHandoverProtocol",
        "summary": "The protocol of a sealed handover as PDF, with its photos and the signature of the renter as an image",
        "x-scope": "handovers:read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Error. Codes: api.key_invalid, api.scope_missing, demo.not_available, feature.not_enabled, plan.limit_customer_api, plan.no_access, request.not_found, request.too_many",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "This description",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "booking.created": {
      "post": {
        "operationId": "webhook_booking_created",
        "summary": "A booking or a request was created. data.bookingId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here booking.created",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "booking.updated": {
      "post": {
        "operationId": "webhook_booking_updated",
        "summary": "A booking changed: period, vehicle, renter, price, items, offer, contract. data.bookingId. Pick-up and return come as handover.sealed",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here booking.updated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "booking.cancelled": {
      "post": {
        "operationId": "webhook_booking_cancelled",
        "summary": "A booking was cancelled or not picked up, or a request was declined, ran out or was removed. data.bookingId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here booking.cancelled",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "handover.sealed": {
      "post": {
        "operationId": "webhook_handover_sealed",
        "summary": "A pick-up or return was sealed. data.handoverId, data.handoverKind, data.bookingId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here handover.sealed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "invoice.issued": {
      "post": {
        "operationId": "webhook_invoice_issued",
        "summary": "An invoice was issued. data.invoiceId, data.bookingId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here invoice.issued",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "invoice.cancelled": {
      "post": {
        "operationId": "webhook_invoice_cancelled",
        "summary": "An invoice was cancelled with a cancellation invoice. data.invoiceId (the cancellation), data.bookingId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here invoice.cancelled",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "operationId": "webhook_webhook_test",
        "summary": "Sent with the button for a test event. data.endpointId",
        "security": [],
        "parameters": [
          {
            "name": "Mietflott-Signature",
            "in": "header",
            "required": true,
            "description": "t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the secret of the endpoint>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Event",
            "in": "header",
            "required": true,
            "description": "The event, here webhook.test",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Mietflott-Delivery",
            "in": "header",
            "required": true,
            "description": "Id of this delivery; the same for every attempt",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, no answer within 10 seconds or a redirect counts as failed and is tried again."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer mf_live_…"
      }
    },
    "schemas": {
      "Money": {
        "type": "object",
        "properties": {
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "currency": {
            "type": "string",
            "enum": [
              "EUR",
              "CHF"
            ]
          }
        },
        "required": [
          "amountCents",
          "currency"
        ]
      },
      "Vehicle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "plate": {
            "type": "string"
          },
          "vin": {
            "type": [
              "string",
              "null"
            ]
          },
          "make": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "fuelType": {
            "type": "string",
            "enum": [
              "petrol",
              "super_e10",
              "super",
              "super_plus",
              "diesel",
              "electric",
              "hybrid"
            ]
          },
          "odometerKm": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "retired"
            ]
          },
          "vehicleClass": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              },
              "vehicleType": {
                "type": "string",
                "enum": [
                  "car",
                  "sports_car",
                  "van",
                  "truck",
                  "motorhome",
                  "motorcycle",
                  "scooter",
                  "e_bike",
                  "bicycle",
                  "trailer",
                  "boat",
                  "machine",
                  "other"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "vehicleType"
            ]
          },
          "location": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "name": {
                "type": "string"
              },
              "timeZone": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "timeZone"
            ]
          },
          "dailyPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "ownDailyPrice": {
            "type": "boolean"
          },
          "tankLitres": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "plate",
          "vin",
          "make",
          "model",
          "fuelType",
          "odometerKm",
          "status",
          "vehicleClass",
          "location",
          "dailyPrice",
          "ownDailyPrice",
          "tankLitres"
        ]
      },
      "VehiclePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Vehicle"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "VehicleClass": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "vehicleType": {
            "type": "string",
            "enum": [
              "car",
              "sports_car",
              "van",
              "truck",
              "motorhome",
              "motorcycle",
              "scooter",
              "e_bike",
              "bicycle",
              "trailer",
              "boat",
              "machine",
              "other"
            ]
          },
          "licenceClass": {
            "type": "string"
          },
          "minDriverAge": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "minLicenceYears": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "prices": {
            "type": "object",
            "properties": {
              "daily": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dailyFrom7Days": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dailyFrom28Days": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "hourly": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "extraKm": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deposit": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "includedKmPerDay": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "daily",
              "dailyFrom7Days",
              "dailyFrom28Days",
              "hourly",
              "extraKm",
              "deposit",
              "includedKmPerDay"
            ]
          },
          "fuel": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string",
                "enum": [
                  "eighth",
                  "litre",
                  "receipt",
                  "none"
                ]
              },
              "perEighth": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "perLitre": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "serviceFee": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Money"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "method",
              "perEighth",
              "perLitre",
              "serviceFee"
            ]
          },
          "minimumRentalMinutes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "vehicleType",
          "licenceClass",
          "minDriverAge",
          "minLicenceYears",
          "prices",
          "fuel",
          "minimumRentalMinutes"
        ]
      },
      "VehicleClassList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VehicleClass"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Location": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "street": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "street",
          "postalCode",
          "city",
          "timeZone"
        ]
      },
      "LocationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Location"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "Availability": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "rentalDays": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "free": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "vehicleId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "plate": {
                  "type": "string"
                },
                "make": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "classId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "className": {
                  "type": "string"
                },
                "locationId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "locationName": {
                  "type": "string"
                },
                "dailyPrice": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hourlyPrice": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "vehicleId",
                "plate",
                "make",
                "model",
                "classId",
                "className",
                "locationId",
                "locationName",
                "dailyPrice",
                "hourlyPrice"
              ]
            }
          }
        },
        "required": [
          "from",
          "to",
          "rentalDays",
          "free"
        ]
      },
      "BookingSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "number": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "confirmed",
              "active",
              "returned",
              "cancelled",
              "request",
              "offer",
              "declined",
              "expired"
            ]
          },
          "renterName": {
            "type": "string"
          },
          "vehicles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "plate": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "plate"
              ]
            }
          },
          "startsAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "endsAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "$ref": "#/components/schemas/Money"
          },
          "source": {
            "type": "string",
            "enum": [
              "office",
              "booking_page"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "renterName",
          "vehicles",
          "startsAt",
          "endsAt",
          "total",
          "source"
        ]
      },
      "BookingPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingSummary"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "number": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string",
            "enum": [
              "confirmed",
              "active",
              "returned",
              "cancelled",
              "request",
              "offer",
              "declined",
              "expired"
            ]
          },
          "renter": {
            "type": "object",
            "properties": {
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "street": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postalCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "phone",
              "email",
              "street",
              "postalCode",
              "city"
            ]
          },
          "vehicles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "assignmentId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "vehicleId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "startsAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "endsAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                "dailyPrice": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hourlyPrice": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "packageName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "packagePrice": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deposit": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fuel": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "enum": [
                        "eighth",
                        "litre",
                        "receipt",
                        "none"
                      ]
                    },
                    "perEighth": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "perLitre": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "serviceFee": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tankLitres": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "receipt": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Money"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "method",
                    "perEighth",
                    "perLitre",
                    "serviceFee",
                    "tankLitres",
                    "receipt"
                  ]
                }
              },
              "required": [
                "assignmentId",
                "vehicleId",
                "startsAt",
                "endsAt",
                "dailyPrice",
                "hourlyPrice",
                "packageName",
                "packagePrice",
                "deposit",
                "fuel"
              ]
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "unitPrice": {
                  "$ref": "#/components/schemas/Money"
                }
              },
              "required": [
                "label",
                "quantity",
                "unitPrice"
              ]
            }
          },
          "rentalPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          },
          "promotion": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "how": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "code",
                      "manual"
                    ]
                  },
                  "dailyPrice": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amountOff": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "percentOff": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "extraKmPrice": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freeKm": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "freeExtras": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "appliedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": [
                  "name",
                  "code",
                  "how",
                  "dailyPrice",
                  "amountOff",
                  "percentOff",
                  "extraKmPrice",
                  "freeKm",
                  "freeExtras",
                  "appliedAt"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "$ref": "#/components/schemas/Money"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "renterHint": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiced": {
            "type": "boolean"
          },
          "billing": {
            "type": "object",
            "properties": {
              "inMietflott": {
                "type": "boolean"
              },
              "externalReference": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "billedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "inMietflott",
              "externalReference",
              "billedOn"
            ]
          },
          "cancellation": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "cancellation",
                      "no_show"
                    ]
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "fee": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/Money"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "kind",
                  "at",
                  "fee"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "contractFixedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "renter",
          "vehicles",
          "items",
          "rentalPrice",
          "promotion",
          "total",
          "note",
          "renterHint",
          "invoiced",
          "billing",
          "cancellation",
          "contractFixedAt"
        ]
      },
      "CreateBooking": {
        "type": "object",
        "properties": {
          "renterId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "renter": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 2,
                "maxLength": 200
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 40
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "street": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "postalCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 12
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "city": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 120
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "addRenterToRecords": {
            "type": "boolean"
          },
          "vehicles": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "vehicleId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "startsAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "endsAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "vehicleId",
                "startsAt",
                "endsAt"
              ]
            }
          },
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "renterHint": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptTimeRules": {
            "type": "boolean"
          },
          "promoCode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "vehicles"
        ]
      },
      "CreateBookingRequest": {
        "type": "object",
        "properties": {
          "renterId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "renter": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 2,
                "maxLength": 200
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 40
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "wantedClassId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "wantedVehicleId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "startsAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "endsAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "startsAt",
          "endsAt"
        ]
      },
      "CancellationProposal": {
        "type": "object",
        "properties": {
          "daysBefore": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "base": {
            "$ref": "#/components/schemas/Money"
          },
          "proposedFee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "daysBefore",
          "base",
          "proposedFee"
        ]
      },
      "CancelBooking": {
        "type": "object",
        "properties": {
          "feeCents": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 100000000
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Renter": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "street": {
            "type": [
              "string",
              "null"
            ]
          },
          "postalCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "birthDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "licence": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "classes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "issuedOn": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "checkedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  }
                },
                "required": [
                  "classes",
                  "issuedOn",
                  "checkedAt"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "block": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "unpaid",
                      "damage",
                      "conduct",
                      "other"
                    ]
                  },
                  "until": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason",
                  "until",
                  "active"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "email",
          "street",
          "postalCode",
          "city",
          "birthDate",
          "note",
          "licence",
          "block"
        ]
      },
      "RenterPage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Renter"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "CreateRenter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "street": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "postalCode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 12
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "birthDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateRenter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200
          },
          "street": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "postalCode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 12
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "birthDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "number": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "invoice",
              "cancellation",
              "credit_note"
            ]
          },
          "bookingId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "bookingNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "recipientName": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "net": {
            "$ref": "#/components/schemas/Money"
          },
          "vat": {
            "$ref": "#/components/schemas/Money"
          },
          "gross": {
            "$ref": "#/components/schemas/Money"
          },
          "paid": {
            "$ref": "#/components/schemas/Money"
          },
          "open": {
            "$ref": "#/components/schemas/Money"
          },
          "paymentStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "open",
                  "partly_paid",
                  "paid"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "dueOn": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "overdue": {
            "type": "boolean"
          },
          "cancelled": {
            "type": "boolean"
          },
          "cancelsNumber": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "kind",
          "bookingId",
          "bookingNumber",
          "recipientName",
          "issuedAt",
          "net",
          "vat",
          "gross",
          "paid",
          "open",
          "paymentStatus",
          "dueOn",
          "overdue",
          "cancelled",
          "cancelsNumber"
        ]
      },
      "InvoicePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "nextCursor"
        ]
      },
      "Handover": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "assignmentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "pickup",
              "return"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "sealed"
            ]
          },
          "sealedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "odometerKm": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fuelEighths": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "batteryPercent": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "damageMarks": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "signerName": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "sha256": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "available",
              "sha256"
            ]
          }
        },
        "required": [
          "id",
          "assignmentId",
          "kind",
          "status",
          "sealedAt",
          "odometerKm",
          "fuelEighths",
          "batteryPercent",
          "damageMarks",
          "signerName",
          "protocol"
        ]
      },
      "HandoverList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Handover"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "KeyInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "vehicles:read",
                "bookings:read",
                "bookings:write",
                "renters:read",
                "renters:write",
                "invoices:read",
                "handovers:read"
              ]
            }
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "company": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "currency": {
                "type": "string",
                "enum": [
                  "EUR",
                  "CHF"
                ]
              },
              "timeZone": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "currency",
              "timeZone"
            ]
          }
        },
        "required": [
          "name",
          "scopes",
          "expiresAt",
          "company"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "validation.failed",
              "request.origin_rejected",
              "request.csrf_rejected",
              "request.not_found",
              "request.too_many",
              "request.too_large",
              "request.form_expired",
              "server.unexpected",
              "auth.not_signed_in",
              "auth.invalid_credentials",
              "auth.email_not_verified",
              "auth.too_many_attempts",
              "auth.link_invalid",
              "auth.permission_denied",
              "auth.no_tenant",
              "auth.two_factor_invalid",
              "auth.two_factor_setup_required",
              "account.password_wrong",
              "account.email_taken",
              "account.email_unchanged",
              "account.two_factor_not_started",
              "account.two_factor_already_on",
              "account.two_factor_off",
              "account.two_factor_kept_for_support",
              "account.last_owner",
              "feature.not_enabled",
              "api.key_invalid",
              "api.scope_missing",
              "api.idempotency_key_reused",
              "api.idempotency_in_progress",
              "api_key.too_many",
              "api_key.expiry_past",
              "webhook.too_many",
              "webhook.url_not_allowed",
              "webhook.not_in_demo",
              "telematics.unavailable",
              "telematics.not_in_demo",
              "telematics.not_connected",
              "telematics.vehicle_taken",
              "accounting.unavailable",
              "accounting.not_in_demo",
              "accounting.not_connected",
              "accounting.texts_pending",
              "accounting.not_covered",
              "online_payment.unavailable",
              "online_payment.not_covered",
              "online_payment.not_connected",
              "online_payment.not_active",
              "online_payment.texts_pending",
              "online_payment.live_key_in_demo",
              "online_payment.nothing_open",
              "online_payment.amount_invalid",
              "online_payment.provider_failed",
              "online_payment.not_refundable",
              "online_payment.refund_too_large",
              "online_payment.no_deposit",
              "online_payment.hold_not_authorized",
              "online_payment.line_not_sent",
              "online_payment.line_disputed",
              "online_payment.above_hold",
              "online_payment.no_invoice",
              "online_payment.link_closed",
              "online_payment.signature_invalid",
              "file_export.not_ready",
              "full_export.not_ready",
              "logbook_export.not_ready",
              "plan.read_only",
              "plan.no_access",
              "plan.billing_unavailable",
              "plan.ordering_soon",
              "plan.limit_vehicles",
              "plan.limit_locations",
              "plan.limit_users",
              "plan.limit_online_booking",
              "plan.limit_customer_api",
              "plan.limit_telematics",
              "plan.limits_exceeded",
              "fleet.location_in_use",
              "fleet.location_retired",
              "registration.closed",
              "registration.terms_required",
              "registration.business_required",
              "registration.terms_changed",
              "registration.terms_unverified",
              "platform_terms.offer_changed",
              "platform_terms.no_offer",
              "platform_terms.acceptance_required",
              "platform_terms.terms_required",
              "platform_terms.business_required",
              "platform_terms.unverified",
              "plan.country_unsupported",
              "tenant.slug_taken",
              "contract.already_signed",
              "contract.sign_link_invalid",
              "contract.sign_changed",
              "contract.sign_not_online",
              "support.not_granted",
              "support.two_factor_required",
              "support.code_required",
              "support.code_invalid",
              "support_request.disabled",
              "support_request.unavailable",
              "support_request.not_found",
              "support_request.rate_limited",
              "support_request.closed",
              "support_request.too_long",
              "assistant.disabled",
              "assistant.rate_limited",
              "assistant.unavailable",
              "assistant.busy",
              "assistant.handbook_missing",
              "assistant.suggestion_not_found",
              "invoice.xrechnung_incomplete",
              "invoice.no_xrechnung",
              "invoice.not_remindable",
              "deposit.not_reversible",
              "deposit.more_than_held",
              "collateral.already_received",
              "collateral.not_received",
              "collateral.already_returned",
              "collateral.locked",
              "logbook.not_started",
              "logbook.already_started",
              "logbook.km_overlap",
              "logbook.km_before_opening",
              "logbook.not_correctable",
              "contract.not_signed",
              "contract.confirmation_missing",
              "mail.company_email_missing",
              "mail.protocol_not_ready",
              "invoice.company_incomplete",
              "invoice.renter_incomplete",
              "invoice.no_price",
              "invoice.amount_too_large",
              "invoice.exists",
              "invoice.already_cancelled",
              "invoice.not_payable",
              "invoice.payment_more_than_open",
              "invoice.payment_not_reversible",
              "invoice.not_open",
              "invoice.renter_email_missing",
              "invoice.unapplied_credit",
              "invoice.no_credit",
              "invoice.refund_more_than_credit",
              "invoice.refund_voucher",
              "voucher.not_usable",
              "voucher.not_a_payment",
              "voucher.in_use",
              "voucher.already_cancelled",
              "invoice.billed_outside",
              "renter.blocked",
              "renter.deletion_refused",
              "retention.below_minimum",
              "team.already_member",
              "team.last_owner",
              "team.two_factor_own_first",
              "team.invitation_invalid",
              "team.email_has_account",
              "team.wrong_account",
              "fleet.plate_taken",
              "fleet.name_taken",
              "fleet.reference_unknown",
              "fleet.odometer_lower",
              "fleet.liability_default_required",
              "booking.vehicle_unavailable",
              "booking.vehicle_retired",
              "booking.not_changeable",
              "booking.no_show_too_early",
              "booking.invoiced",
              "booking.shorter_than_minimum",
              "booking.time_rules",
              "booking.price_differs",
              "promotion.code_taken",
              "promotion.in_use",
              "promotion.code_not_valid",
              "booking.not_booked",
              "booking.stage_closed",
              "booking.test_booking",
              "test_booking.unavailable",
              "test_booking.exists",
              "offer.link_invalid",
              "offer.acceptance_pending_review",
              "offer.changed",
              "offer.not_online",
              "offer.confirmation_missing",
              "handover.sealed",
              "handover.exists",
              "handover.draft_changed",
              "handover.incomplete",
              "handover.not_due",
              "handover.pickup_blocked",
              "handover.odometer_too_low",
              "handover.omission_not_allowed",
              "file.unknown",
              "file.not_an_image",
              "file.type_mismatch",
              "terms.unchanged",
              "terms.incomplete",
              "terms.name_taken",
              "terms.too_many",
              "terms.default_template",
              "terms.import_unreadable",
              "damage_case.charged",
              "damage_case.share_missing",
              "damage_case.no_booking",
              "damage_case.repair_overlaps",
              "damage_case.recourse_texts_pending",
              "damage_case.recourse_gross_pending",
              "damage_case.recourse_incomplete",
              "damage_case.recourse_no_recipient",
              "damage_case.recourse_no_claim",
              "damage_case.recourse_payment_more_than_open",
              "workshop.in_use",
              "workshop.too_many",
              "authority.nobody_found",
              "authority.not_out",
              "authority.texts_pending",
              "authority.form_texts_pending",
              "authority.not_in_booking",
              "authority.no_template",
              "fine_case.no_booking",
              "fine_case.closed",
              "fine_case.not_closable",
              "fine_case.texts_pending",
              "booking_page.slug_taken",
              "accessibility_statement.texts_pending",
              "accessibility_statement.not_for_country",
              "booking_page.not_ready",
              "booking_page.form_expired",
              "booking_page.request_invalid",
              "booking_page.email_code_invalid",
              "booking_page.instant_closed",
              "booking_page.changed",
              "booking_page.confirmation_missing",
              "booking_page.too_young",
              "booking_page.extra_unavailable",
              "company.changed_meanwhile",
              "company.contact_email_needed",
              "company.day_count_texts_pending",
              "demo.busy",
              "demo.form_invalid",
              "demo.not_available",
              "demo.upload_too_large",
              "demo.renter_link_closed",
              "terms.translation_invalid",
              "check_in.link_invalid",
              "check_in.disabled",
              "renter_portal.disabled",
              "renter_portal.link_invalid",
              "renter_portal.action_unavailable",
              "inspection.disabled",
              "inspection.link_invalid",
              "inspection.slot_full",
              "inspection.not_possible",
              "return_fee.settled",
              "return_settlement.texts_pending",
              "bank_statement.unreadable",
              "bank_statement.nothing_new",
              "bank_statement.closed",
              "bank_statement.line_decided",
              "bank_statement.target_unknown",
              "bank_statement.currency_differs",
              "bank_statement.line_not_undoable",
              "company_billing.not_available",
              "company_billing.not_a_company",
              "company_billing.nothing_to_invoice",
              "invoice.collective",
              "monthly_rental.texts_pending",
              "monthly_rental.not_monthly",
              "monthly_rental.period_unknown",
              "monthly_rental.period_not_ended",
              "monthly_rental.payment_term_missing",
              "monthly_rental.consumer_counter_only",
              "monthly_rental.no_notice",
              "monthly_rental.end_not_allowed",
              "monthly_rental.period_invoiced",
              "monthly_rental.readings_not_available",
              "monthly_rental.not_available",
              "monthly_rental.total_missing",
              "monthly_rental.notice_reaches_end",
              "termination.not_for_monthly",
              "calendar_feed.too_many",
              "stay_rule.overlap",
              "booking.extra_stock",
              "follow_up.not_own",
              "booking.copy_renter_removed",
              "renter.possible_duplicate",
              "renter.merge_blocked",
              "renter.merge_restricted",
              "renter.merge_kind_differs",
              "renter.merge_collective_open",
              "message_rule.too_many",
              "duty.texts_pending",
              "duty.not_available",
              "duty.contract_fixed",
              "duty.no_due_in_rental",
              "duty.cost_note_company_only",
              "duty.due_closed",
              "duty.link_invalid",
              "duty.proof_missing",
              "duty.nothing_open",
              "report.range_invalid",
              "report.range_too_long",
              "vehicle_cost.not_available",
              "ai_assistant.request_invalid",
              "ai_assistant.too_many",
              "ai_assistant.action_decided",
              "period.closed",
              "period.already_closed",
              "period.not_closed",
              "period.month_not_ended",
              "invoice.not_correctable",
              "credit_note.lines_invalid",
              "dunning.texts_pending",
              "dunning.country_not_covered",
              "dunning.disabled",
              "dunning.not_due",
              "dunning.base_rate_missing",
              "dunning.costs_not_allowed",
              "dunning.final_not_confirmed",
              "bank_statement.split_mismatch",
              "bank_statement.wrong_direction",
              "bank_statement.payment_not_found",
              "discount.above_limit",
              "discount.nothing_pending"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "rule": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "rule"
              ]
            }
          },
          "retryAfterSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "requestId"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "type": "string",
            "enum": [
              "booking.created",
              "booking.updated",
              "booking.cancelled",
              "handover.sealed",
              "invoice.issued",
              "invoice.cancelled",
              "webhook.test"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "data": {
            "type": "object",
            "properties": {
              "bookingId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "handoverId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "handoverKind": {
                "type": "string",
                "enum": [
                  "pickup",
                  "return"
                ]
              },
              "invoiceId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "endpointId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            }
          }
        },
        "required": [
          "id",
          "type",
          "occurredAt",
          "data"
        ]
      }
    }
  }
}
