{
  "openapi": "3.1.0",
  "info": {
    "title": "Tournevia Community — planning workspace",
    "description": "Company setup, named sessions, road-based calculation and manual review. Company dispatch requires a current validated READY plan; sample workspaces cannot export operational routes.",
    "version": "0.8.0"
  },
  "paths": {
    "/api/v1/depot": {
      "put": {
        "summary": "Update Depot",
        "operationId": "updateDepot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepotInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepotRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Depot",
        "operationId": "getDepot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepotRecord"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No depot provisioned"
          },
          "503": {
            "description": "Database unavailable"
          }
        }
      }
    },
    "/api/v1/depots": {
      "get": {
        "summary": "Depots",
        "description": "Every depot and place of the company: the main depot first, then depots, then places.",
        "operationId": "listDepots",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DepotRecord"
                  },
                  "type": "array",
                  "title": "Response Listdepots"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      },
      "post": {
        "summary": "Add Depot",
        "description": "Add a depot, or another place a vehicle starts or ends its day at. Its point starts unreviewed.",
        "operationId": "createDepot",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepotInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepotRecord"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/depots/{key}": {
      "put": {
        "summary": "Change Depot",
        "description": "Change a depot or place. Its code cannot change while vehicles or deliveries name it.",
        "operationId": "updateDepotByKey",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepotInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepotRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Depot",
        "description": "Delete a depot or place that is not the main depot and that no vehicle or delivery names.",
        "operationId": "deleteDepot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/depots/{key}/main": {
      "post": {
        "summary": "Main Depot",
        "description": "Make this depot the main one, where vehicles without another start begin and end their day.",
        "operationId": "makeMainDepot",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepotRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/examples": {
      "post": {
        "summary": "Add Example Records",
        "description": "Add ten fictional example deliveries for a day, with an example depot and two example vehicles\nif they are missing. Examples are planned only with other examples (admin).",
        "operationId": "addExamples",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExampleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExamplesAdded"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/examples/remove": {
      "post": {
        "summary": "Remove Example Records",
        "description": "Delete every example depot, vehicle and delivery, with the plans of example vehicles (admin).",
        "operationId": "removeExamples",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExamplesRemoved"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/workspace/address-lookup": {
      "put": {
        "summary": "Set Address Lookup",
        "description": "Turn address lookup with IGN's public service on or off for the company. An installation\nwith its own geocoder always uses that one instead.",
        "operationId": "setAddressLookup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddressLookupSetting"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressLookupSetting"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/workspace/safety-margin": {
      "put": {
        "summary": "Set Safety Margin",
        "description": "Set the company's safety margin for new calculations. Saved plans keep the margin they were\ncalculated with.",
        "operationId": "setSafetyMargin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SafetyMarginSetting"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafetyMarginSetting"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/workspace/numbering": {
      "get": {
        "summary": "Get Numbering",
        "description": "The company's delivery number format, the next number for today and a format that would\ncontinue the existing identifiers.",
        "operationId": "getNumbering",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberingRecord"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      },
      "put": {
        "summary": "Set Numbering",
        "description": "Set or clear the format of new delivery identifiers. Existing identifiers never change.",
        "operationId": "setNumbering",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NumberingSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberingRecord"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/workspace/numbering/preview": {
      "get": {
        "summary": "Preview Numbering",
        "description": "The number the next delivery today would receive with this format, before it is saved.",
        "operationId": "previewNumbering",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ],
              "description": "Identifier format for new deliveries, or null for none. Literal letters, digits and . _ / - with date parts {YYYY} {YY} {MM} {DD} of the service date and one number {N} or {N:4} (zero-padded to 4 digits), e.g. LIV-{YYYY}-{N:4}.",
              "title": "Format"
            },
            "description": "Identifier format for new deliveries, or null for none. Literal letters, digits and . _ / - with date parts {YYYY} {YY} {MM} {DD} of the service date and one number {N} or {N:4} (zero-padded to 4 digits), e.g. LIV-{YYYY}-{N:4}."
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 999999999,
              "minimum": 1,
              "description": "The lowest number to give, e.g. to continue an earlier system.",
              "default": 1,
              "title": "Start"
            },
            "description": "The lowest number to give, e.g. to continue an earlier system."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextIdentifier"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vehicles": {
      "get": {
        "summary": "Vehicles",
        "description": "Vehicles in fleet-number order, filtered and searched across the whole fleet.",
        "operationId": "listVehicles",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 250,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "active",
                "inactive",
                "off_day"
              ],
              "type": "string",
              "default": "all",
              "title": "Status"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the identifier (and a delivery address).",
              "title": "Q"
            },
            "description": "Case-insensitive text in the identifier (and a delivery address)."
          },
          {
            "name": "service_date",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Planning day; required by status=off_day.",
              "title": "Service Date"
            },
            "description": "Planning day; required by status=off_day."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Owned_VehicleSource_"
                  },
                  "title": "Response Listvehicles"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Vehicle",
        "operationId": "createVehicle",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VehicleSource"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_VehicleSource_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vehicles/summary": {
      "get": {
        "summary": "Vehicles Summary",
        "description": "Counts behind the fleet tabs, for the whole fleet (or the search).",
        "operationId": "summarizeVehicles",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the identifier (and a delivery address).",
              "title": "Q"
            },
            "description": "Case-insensitive text in the identifier (and a delivery address)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VehicleSummary"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vehicles/{key}": {
      "get": {
        "summary": "Vehicle",
        "operationId": "getVehicle",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_VehicleSource_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Vehicle",
        "operationId": "updateVehicle",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VehicleSource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_VehicleSource_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers": {
      "get": {
        "summary": "Customers",
        "description": "Saved customers in code order, filtered and searched across all of them.",
        "operationId": "listCustomers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 250,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "active",
                "inactive",
                "review",
                "missing"
              ],
              "type": "string",
              "default": "all",
              "title": "Status"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the code, name or address.",
              "title": "Q"
            },
            "description": "Case-insensitive text in the code, name or address."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Owned_CustomerInput_"
                  },
                  "title": "Response Listcustomers"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Customer",
        "operationId": "createCustomer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_CustomerInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers/summary": {
      "get": {
        "summary": "Customers Summary",
        "operationId": "summarizeCustomers",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the identifier (and a delivery address).",
              "title": "Q"
            },
            "description": "Case-insensitive text in the identifier (and a delivery address)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerSummary"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers/{key}": {
      "get": {
        "summary": "Customer",
        "operationId": "getCustomer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_CustomerInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Customer",
        "description": "Edit a customer. Deliveries already saved keep their own copy of its entrance.",
        "operationId": "updateCustomer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_CustomerInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{key}/customer": {
      "post": {
        "summary": "Save As Customer",
        "description": "Save a delivery's address, entrance and needs as a new customer and link the delivery to it.\nA reviewed entrance stays reviewed: it is the same point a person already checked.",
        "operationId": "saveOrderAsCustomer",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveAsCustomer"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedCustomer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/activation": {
      "post": {
        "summary": "Set Orders Active",
        "description": "Cancel deliveries (inactive: they are not planned) or restore them, each at its current version.",
        "operationId": "setOrdersActive",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderActivation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Owned_OrderInput_"
                  },
                  "type": "array",
                  "title": "Response Setordersactive"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/orders/delete": {
      "post": {
        "summary": "Delete Deliveries",
        "description": "Delete deliveries for good, each at its current version. Saved plans keep their own copy and\nthen ask for a fresh calculation; a delivery in a waiting or running calculation is refused.",
        "operationId": "deleteOrders",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderSelection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "413": {
            "description": "Content Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/orders": {
      "get": {
        "summary": "Orders",
        "description": "Deliveries of one day in identifier order, filtered and searched across the whole day.",
        "operationId": "listOrders",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 250,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "active",
                "inactive",
                "review",
                "missing",
                "ready"
              ],
              "type": "string",
              "default": "all",
              "title": "Status"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the identifier (and a delivery address).",
              "title": "Q"
            },
            "description": "Case-insensitive text in the identifier (and a delivery address)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Owned_OrderInput_"
                  },
                  "title": "Response Listorders"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Order",
        "operationId": "createOrder",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "assign_identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Replace external_id with the company's next delivery number when saving.",
              "default": false,
              "title": "Assign Identifier"
            },
            "description": "Replace external_id with the company's next delivery number when saving."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_OrderInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/summary": {
      "get": {
        "summary": "Orders Summary",
        "description": "Counts behind the delivery tabs, for the whole day (or the search).",
        "operationId": "summarizeOrders",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "Case-insensitive text in the identifier (and a delivery address).",
              "title": "Q"
            },
            "description": "Case-insensitive text in the identifier (and a delivery address)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSummary"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/next-identifier": {
      "get": {
        "summary": "Next Order Identifier",
        "description": "The number a new delivery on `service_date` would receive now. Another user may take it\nfirst: create the delivery with assign_identifier=true to receive the next free one.",
        "operationId": "nextOrderIdentifier",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NextIdentifier"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{key}": {
      "get": {
        "summary": "Order",
        "operationId": "getOrder",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_OrderInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update Order",
        "operationId": "updateOrder",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Owned_OrderInput_"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/imports/{kind}": {
      "post": {
        "summary": "Import Data",
        "operationId": "importCsv",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "vehicles",
                "orders"
              ],
              "type": "string",
              "title": "Kind"
            }
          },
          {
            "name": "dry_run",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Dry Run"
            }
          },
          {
            "name": "update_existing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Let a row for an existing identifier change that record; shown as UPDATE with its changed fields. A delivery row without coordinates keeps the saved point.",
              "default": false,
              "title": "Update Existing"
            },
            "description": "Let a row for an existing identifier change that record; shown as UPDATE with its changed fields. A delivery row without coordinates keeps the saved point."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ImportResult"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "/api/v1/geocode": {
      "get": {
        "summary": "Geocode",
        "description": "Candidate points for an address, best first, from the installation's own geocoder or, when\nthe company turned it on, IGN's public service. They are proposals: save one as the location,\nthen review the vehicle entrance.",
        "operationId": "lookupAddress",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "description": "Address to look up in France.",
              "title": "Q"
            },
            "description": "Address to look up in France."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AddressCandidate"
                  },
                  "title": "Response Lookupaddress"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{key}/access-check": {
      "get": {
        "summary": "Access Check",
        "operationId": "checkOrderAccess",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "vehicle_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Vehicle Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessCheck"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Service Unavailable"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/system-status": {
      "get": {
        "summary": "System Status",
        "description": "Whether calculations can currently run: worker, queue and routing service.",
        "operationId": "systemStatus",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemStatus"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/optimization-jobs": {
      "post": {
        "summary": "Create Job",
        "operationId": "createOptimizationJob",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Idempotency-Key"
            },
            "description": "A 1–128 character printable ASCII key; reuse it only to retry the identical request. Missing: 428 IDEMPOTENCY_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptimizationRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/jobs": {
      "get": {
        "summary": "Jobs",
        "operationId": "listJobs",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 250,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobRecord"
                  },
                  "title": "Response Listjobs"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/jobs/{key}": {
      "get": {
        "summary": "Job",
        "operationId": "getJob",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/jobs/{key}/cancel": {
      "post": {
        "summary": "Cancel",
        "description": "Cancel a waiting or running calculation. No result is saved; an edit releases its plan.",
        "operationId": "cancelJob",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans": {
      "get": {
        "summary": "Plans",
        "description": "Saved plans for a day, newest first, with totals computed from each stored result.",
        "operationId": "listPlans",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "service_date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date",
              "title": "Service Date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 250,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "DRAFT",
                    "READY"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ],
              "description": "A plan ID prefix, or the exact external ID of a delivery the plan includes.",
              "title": "Search"
            },
            "description": "A plan ID prefix, or the exact external ID of a delivery the plan includes."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PlanListItem"
                  },
                  "title": "Response Listplans"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans/{key}": {
      "get": {
        "summary": "Plan",
        "operationId": "getPlan",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans/{key}/edits": {
      "post": {
        "summary": "Edit",
        "operationId": "editPlan",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Idempotency-Key"
            },
            "description": "A 1–128 character printable ASCII key; reuse it only to retry the identical request. Missing: 428 IDEMPOTENCY_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans/{key}/finalize": {
      "post": {
        "summary": "Ready",
        "operationId": "finalizePlan",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinalizeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanRecord"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans/{key}/export.csv": {
      "get": {
        "summary": "Download",
        "operationId": "exportPlan",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "layout",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "standard",
                "spreadsheet"
              ],
              "type": "string",
              "description": "standard: comma-separated UTF-8. spreadsheet: UTF-8 byte-order mark and semicolons, for spreadsheet programs that use a decimal comma (for example French Excel).",
              "default": "standard",
              "title": "Layout"
            },
            "description": "standard: comma-separated UTF-8. spreadsheet: UTF-8 byte-order mark and semicolons, for spreadsheet programs that use a decimal comma (for example French Excel)."
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/plans/{key}/sheets": {
      "get": {
        "summary": "Sheets",
        "description": "Route sheets of the current READY plan: the same checks as the CSV export.",
        "operationId": "planSheets",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          },
          {
            "name": "vehicle",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this vehicle's sheet.",
              "title": "Vehicle"
            },
            "description": "Only this vehicle's sheet."
          },
          {
            "name": "if-match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "title": "If-Match"
            },
            "description": "The current version, quoted, for example \"3\". Missing: 428 VERSION_REQUIRED."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteSheets"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Failed"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Precondition Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SourceProblem"
                    },
                    {
                      "$ref": "#/components/schemas/HTTPValidationError"
                    }
                  ]
                }
              }
            },
            "description": "Unprocessable Content"
          }
        }
      }
    },
    "/api/v1/session": {
      "get": {
        "summary": "Read Session",
        "operationId": "getSession",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRecord"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      },
      "post": {
        "summary": "Sign In",
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRecord"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Logout",
        "operationId": "logout",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "type": "object",
                  "title": "Response Logout"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/preferences": {
      "put": {
        "summary": "Preferences",
        "operationId": "updatePreferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Preferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/session/password": {
      "put": {
        "summary": "Change Password",
        "description": "Change the signed-in user's password; other sessions of this user end.",
        "operationId": "changePassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "type": "object",
                  "title": "Response Changepassword"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "summary": "Users",
        "operationId": "listUsers",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserRecord"
                  },
                  "type": "array",
                  "title": "Response Listusers"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      },
      "post": {
        "summary": "Add User",
        "operationId": "createUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRecord"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    },
    "/api/v1/users/{key}/password": {
      "post": {
        "summary": "Reset User Password",
        "description": "Set a new password for another user of this company; their sessions end.",
        "operationId": "resetUserPassword",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordReset"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Resetuserpassword"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/{key}": {
      "put": {
        "summary": "Change User",
        "operationId": "updateUser",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUser"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRecord"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Conflict"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceProblem"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/setup": {
      "get": {
        "summary": "Status",
        "operationId": "getSetupStatus",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupStatus"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Complete",
        "operationId": "completeSetup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionRecord"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/setup/geocode": {
      "get": {
        "summary": "Setup Geocode",
        "description": "Find the depot's address during first-use setup, with the private setup token. Uses the\ninstallation's own geocoder, or IGN's public service when `public` is chosen.",
        "operationId": "lookupSetupAddress",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "title": "Q"
            }
          },
          {
            "name": "public",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Public"
            }
          },
          {
            "name": "x-setup-token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "X-Setup-Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AddressCandidate"
                  },
                  "title": "Response Lookupsetupaddress"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/metrics": {
      "get": {
        "summary": "Metrics",
        "description": "Prometheus text metrics. Requires `Authorization: Bearer <MONITOR_TOKEN>`.",
        "operationId": "metrics",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or wrong monitor token"
          },
          "404": {
            "description": "Monitoring is not enabled (MONITOR_TOKEN unset)"
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "summary": "Health",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ready": {
      "get": {
        "summary": "Readiness",
        "operationId": "readiness",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/configuration": {
      "get": {
        "summary": "Configuration",
        "operationId": "configuration",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Configuration"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "LocalSessionCookie": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AccessCheck": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "REACHABLE",
              "NO_ROUTE_IN_DATASET"
            ],
            "title": "Status"
          },
          "order_version": {
            "type": "integer",
            "title": "Order Version"
          },
          "vehicle_version": {
            "type": "integer",
            "title": "Vehicle Version"
          },
          "depot_version": {
            "type": "integer",
            "title": "Depot Version"
          },
          "snap_limit_m": {
            "type": "integer",
            "title": "Snap Limit M",
            "default": 50
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "outbound": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Leg"
              },
              {
                "type": "null"
              }
            ]
          },
          "inbound": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Leg"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "order_version",
          "vehicle_version",
          "depot_version",
          "message"
        ],
        "title": "AccessCheck"
      },
      "AddressCandidate": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "latitude": {
            "type": "number",
            "maximum": 90.0,
            "minimum": -90.0,
            "title": "Latitude"
          },
          "longitude": {
            "type": "number",
            "maximum": 180.0,
            "minimum": -180.0,
            "title": "Longitude"
          },
          "score": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Score"
          },
          "kind": {
            "type": "string",
            "enum": [
              "housenumber",
              "street",
              "locality",
              "municipality"
            ],
            "title": "Kind"
          },
          "postcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Postcode"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "label",
          "latitude",
          "longitude",
          "score",
          "kind"
        ],
        "title": "AddressCandidate"
      },
      "AddressLookupSetting": {
        "properties": {
          "public_service": {
            "type": "boolean",
            "title": "Public Service",
            "description": "Look addresses up with IGN's public service; every looked-up address is sent to it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "public_service"
        ],
        "title": "AddressLookupSetting"
      },
      "Capacity": {
        "properties": {
          "weight_kg": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Weight Kg"
          },
          "volume_dm3": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Volume Dm3"
          },
          "pallet_eur_units": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pallet Eur Units"
          },
          "pallet_ind_units": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Pallet Ind Units"
          },
          "loading_length_mm": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Loading Length Mm"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "weight_kg",
          "volume_dm3",
          "pallet_eur_units",
          "pallet_ind_units",
          "loading_length_mm"
        ],
        "title": "Capacity"
      },
      "Configuration": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "local",
              "local_demo",
              "shared"
            ],
            "title": "Mode",
            "default": "local"
          },
          "data_kind": {
            "type": "string",
            "enum": [
              "SYNTHETIC",
              "UNVERIFIED"
            ],
            "title": "Data Kind",
            "default": "SYNTHETIC"
          },
          "map_style_url": {
            "type": "string",
            "title": "Map Style Url"
          },
          "company_name": {
            "type": "string",
            "title": "Company Name"
          },
          "address_lookup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Lookup"
          },
          "address_lookup_source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "installation",
                  "public"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Lookup Source"
          },
          "examples": {
            "type": "boolean",
            "title": "Examples",
            "default": false
          },
          "safety_margin_minutes": {
            "type": "integer",
            "title": "Safety Margin Minutes",
            "default": 15
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "map_style_url",
          "company_name"
        ],
        "title": "Configuration"
      },
      "CreateUser": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.@+-]*$",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 15,
            "format": "password",
            "title": "Password",
            "writeOnly": true
          },
          "display_name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Display Name"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "planner"
            ],
            "title": "Role",
            "default": "planner"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ],
            "title": "Language",
            "description": "Interface language of the new account.",
            "default": "en"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "username",
          "password",
          "display_name"
        ],
        "title": "CreateUser"
      },
      "CustomerInput": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Code"
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": true
          },
          "address": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Address"
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Location"
              },
              {
                "type": "null"
              }
            ]
          },
          "usual_hours": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ],
            "description": "Usual delivery window, Europe/Paris local time."
          },
          "service_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 28800.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Service Seconds"
          },
          "required_skills": {
            "items": {
              "type": "string",
              "pattern": "^[A-Z][A-Z0-9_]{0,39}$"
            },
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "title": "Required Skills"
          },
          "instructions": {
            "type": "string",
            "maxLength": 1000,
            "title": "Instructions",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "name",
          "address"
        ],
        "title": "CustomerInput",
        "description": "A saved customer: its reviewed vehicle entrance and what its deliveries usually need."
      },
      "CustomerSummary": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "active": {
            "type": "integer",
            "title": "Active"
          },
          "inactive": {
            "type": "integer",
            "title": "Inactive"
          },
          "review": {
            "type": "integer",
            "title": "Review",
            "description": "Located, but the entrance is not reviewed yet."
          },
          "missing": {
            "type": "integer",
            "title": "Missing",
            "description": "No entrance yet."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total",
          "active",
          "inactive",
          "review",
          "missing"
        ],
        "title": "CustomerSummary",
        "description": "Customer counts after the optional search."
      },
      "DayException": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "hours": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ],
            "description": "Hours on that date instead of the weekly ones; null for a day off."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "date"
        ],
        "title": "DayException"
      },
      "Deleted": {
        "properties": {
          "deleted": {
            "type": "integer",
            "title": "Deleted"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "deleted"
        ],
        "title": "Deleted"
      },
      "DepotInput": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Code"
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "kind": {
            "type": "string",
            "enum": [
              "DEPOT",
              "PLACE"
            ],
            "title": "Kind",
            "description": "DEPOT: goods are loaded there and deliveries can ship from it. PLACE: another start or end of a vehicle's day, such as a driver's home; a vehicle starting there leaves already loaded.",
            "default": "DEPOT"
          },
          "address": {
            "type": "string",
            "maxLength": 500,
            "title": "Address",
            "description": "Postal address of the depot; empty when unknown.",
            "default": ""
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "timezone": {
            "type": "string",
            "const": "Europe/Paris",
            "title": "Timezone"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "name",
          "location",
          "timezone"
        ],
        "title": "DepotInput",
        "description": "A depot, or another place a vehicle starts or ends its day at, such as a driver's home."
      },
      "DepotRecord": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "main": {
            "type": "boolean",
            "title": "Main",
            "description": "The main depot: where a vehicle without another start begins and ends its day.",
            "default": false
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "An example: fictional, planned only with other examples, and removed with them.",
            "default": false
          },
          "data": {
            "$ref": "#/components/schemas/DepotInput"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "data"
        ],
        "title": "DepotRecord"
      },
      "Draft": {
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "READY"
                }
              }
            },
            "then": {
              "properties": {
                "data_kind": {
                  "const": "ROUTED"
                },
                "validation": {
                  "const": "PASS"
                },
                "blocking_issues": {
                  "maxItems": 0
                },
                "operational_ready": {
                  "const": true
                },
                "routes": {
                  "contains": {
                    "properties": {
                      "stops": {
                        "minItems": 1
                      }
                    }
                  }
                }
              }
            },
            "else": {
              "properties": {
                "operational_ready": {
                  "const": false
                }
              }
            }
          }
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "READY"
            ],
            "title": "Status",
            "default": "DRAFT"
          },
          "data_kind": {
            "type": "string",
            "enum": [
              "SYNTHETIC",
              "ROUTED"
            ],
            "title": "Data Kind",
            "default": "SYNTHETIC"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "objective": {
            "type": "string",
            "enum": [
              "TRAVEL_TIME",
              "MODELED_TRAVEL_COST"
            ],
            "title": "Objective"
          },
          "routing_policy": {
            "type": "string",
            "enum": [
              "TRUCK_STANDARD",
              "TRUCK_PREFER_NO_TOLLS",
              "TRUCK_PREFER_NO_MOTORWAYS"
            ],
            "title": "Routing Policy"
          },
          "dataset": {
            "type": "string",
            "title": "Dataset"
          },
          "routes": {
            "items": {
              "$ref": "#/components/schemas/Route"
            },
            "type": "array",
            "title": "Routes"
          },
          "unassigned": {
            "items": {
              "$ref": "#/components/schemas/Unassigned"
            },
            "type": "array",
            "title": "Unassigned"
          },
          "validation": {
            "type": "string",
            "enum": [
              "PASS",
              "FAIL"
            ],
            "title": "Validation"
          },
          "blocking_issues": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Blocking Issues"
          },
          "toll_cost_minor": {
            "type": "null",
            "title": "Toll Cost Minor"
          },
          "total_cost_minor": {
            "type": "null",
            "title": "Total Cost Minor"
          },
          "operational_ready": {
            "type": "boolean",
            "title": "Operational Ready",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "organization_id",
          "objective",
          "routing_policy",
          "dataset",
          "routes",
          "unassigned",
          "validation",
          "blocking_issues"
        ],
        "title": "Draft"
      },
      "EditRequest": {
        "properties": {
          "routes": {
            "items": {
              "$ref": "#/components/schemas/RouteAssignment"
            },
            "type": "array",
            "maxItems": 25,
            "title": "Routes"
          },
          "unassigned_order_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 250,
            "uniqueItems": true,
            "title": "Unassigned Order Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "routes",
          "unassigned_order_ids"
        ],
        "title": "EditRequest"
      },
      "ExampleRequest": {
        "properties": {
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date",
            "description": "The day the example deliveries are for."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "service_date"
        ],
        "title": "ExampleRequest"
      },
      "ExamplesAdded": {
        "properties": {
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "depot": {
            "type": "string",
            "title": "Depot",
            "description": "Code of the example depot the example vehicles start from."
          },
          "vehicles": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Vehicles",
            "description": "Fleet numbers of the example vehicles added now; empty when they existed."
          },
          "deliveries": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Deliveries"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "service_date",
          "depot",
          "vehicles",
          "deliveries"
        ],
        "title": "ExamplesAdded"
      },
      "ExamplesRemoved": {
        "properties": {
          "removed": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Removed",
            "description": "Example depots, vehicles and deliveries removed, with their plans."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "removed"
        ],
        "title": "ExamplesRemoved"
      },
      "FinalizeRequest": {
        "properties": {
          "accept_unassigned": {
            "type": "boolean",
            "title": "Accept Unassigned",
            "default": false
          },
          "replace_conflicting_ready": {
            "type": "boolean",
            "title": "Replace Conflicting Ready",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "FinalizeRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "Health": {
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "title": "Status",
            "default": "ok"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Health"
      },
      "Hours": {
        "properties": {
          "start": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "title": "Start",
            "description": "Europe/Paris local time, HH:MM."
          },
          "end": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "title": "End",
            "description": "Europe/Paris local time, HH:MM."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "title": "Hours"
      },
      "Identity": {
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "planner"
            ],
            "title": "Role"
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ],
            "title": "Language",
            "default": "en"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "organization_id",
          "user_id",
          "username",
          "display_name",
          "role"
        ],
        "title": "Identity"
      },
      "ImportResult": {
        "properties": {
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run"
          },
          "committed": {
            "type": "boolean",
            "title": "Committed",
            "default": false
          },
          "inserted": {
            "type": "integer",
            "title": "Inserted",
            "default": 0
          },
          "unchanged": {
            "type": "integer",
            "title": "Unchanged",
            "default": 0
          },
          "updated": {
            "type": "integer",
            "title": "Updated",
            "default": 0
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/PreviewRow"
            },
            "type": "array",
            "title": "Rows"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/RowError"
            },
            "type": "array",
            "title": "Errors"
          },
          "address_lookup": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "UNAVAILABLE",
                  "INCOMPLETE"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Lookup"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dry_run"
        ],
        "title": "ImportResult"
      },
      "JobError": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "title": "Request Id"
          },
          "details": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Details"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "title": "JobError"
      },
      "JobRecord": {
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "QUEUED"
                }
              }
            },
            "then": {
              "properties": {
                "stage": {
                  "const": "QUEUED"
                },
                "started_at": {
                  "type": "null"
                },
                "finished_at": {
                  "type": "null"
                },
                "plan_id": {
                  "type": "null"
                },
                "error": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "RUNNING"
                }
              }
            },
            "then": {
              "properties": {
                "stage": {
                  "enum": [
                    "PRECHECK",
                    "MATRIX",
                    "SOLVE",
                    "ROUTE",
                    "VALIDATE",
                    "SAVE"
                  ]
                },
                "started_at": {
                  "type": "string"
                },
                "finished_at": {
                  "type": "null"
                },
                "plan_id": {
                  "type": "null"
                },
                "error": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "SUCCEEDED"
                }
              }
            },
            "then": {
              "properties": {
                "stage": {
                  "const": "DONE"
                },
                "error": {
                  "type": "null"
                },
                "started_at": {
                  "type": "string"
                },
                "finished_at": {
                  "type": "string"
                },
                "plan_id": {
                  "type": "string"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "FAILED"
                }
              }
            },
            "then": {
              "properties": {
                "stage": {
                  "const": "FAILED"
                },
                "finished_at": {
                  "type": "string"
                },
                "plan_id": {
                  "type": "null"
                },
                "error": {
                  "type": "object"
                }
              }
            }
          }
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "kind": {
            "type": "string",
            "enum": [
              "OPTIMIZE",
              "EDIT"
            ],
            "title": "Kind"
          },
          "target_plan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Plan Id"
          },
          "reserved_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Reserved Version"
          },
          "status": {
            "type": "string",
            "enum": [
              "QUEUED",
              "RUNNING",
              "SUCCEEDED",
              "FAILED"
            ],
            "title": "Status"
          },
          "stage": {
            "type": "string",
            "enum": [
              "QUEUED",
              "PRECHECK",
              "MATRIX",
              "SOLVE",
              "ROUTE",
              "VALIDATE",
              "SAVE",
              "DONE",
              "FAILED"
            ],
            "title": "Stage"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "plan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Plan Id"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobError"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "kind",
          "status",
          "stage",
          "created_at",
          "started_at",
          "finished_at",
          "plan_id",
          "error"
        ],
        "title": "JobRecord"
      },
      "Leg": {
        "properties": {
          "from_order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "From Order Id"
          },
          "to_order_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "To Order Id"
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Duration Seconds"
          },
          "distance_m": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Distance M"
          },
          "geometry": {
            "items": {
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array",
              "maxItems": 2,
              "minItems": 2
            },
            "type": "array",
            "minItems": 2,
            "title": "Geometry"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "from_order_id",
          "to_order_id",
          "duration_seconds",
          "distance_m",
          "geometry"
        ],
        "title": "Leg"
      },
      "Location": {
        "properties": {
          "latitude": {
            "type": "number",
            "maximum": 90.0,
            "minimum": -90.0,
            "title": "Latitude"
          },
          "longitude": {
            "type": "number",
            "maximum": 180.0,
            "minimum": -180.0,
            "title": "Longitude"
          },
          "reviewed": {
            "type": "boolean",
            "title": "Reviewed"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "latitude",
          "longitude",
          "reviewed"
        ],
        "title": "Location"
      },
      "LoginRequest": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.@+-]*$",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "format": "password",
            "title": "Password",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "LoginRequest"
      },
      "NextIdentifier": {
        "properties": {
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier",
            "description": "The number a new delivery on that day would receive now; null without a numbering format."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "identifier"
        ],
        "title": "NextIdentifier"
      },
      "NumberingRecord": {
        "properties": {
          "format": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ],
            "title": "Format",
            "description": "Identifier format for new deliveries, or null for none. Literal letters, digits and . _ / - with date parts {YYYY} {YY} {MM} {DD} of the service date and one number {N} or {N:4} (zero-padded to 4 digits), e.g. LIV-{YYYY}-{N:4}."
          },
          "start": {
            "type": "integer",
            "maximum": 999999999.0,
            "minimum": 1.0,
            "title": "Start",
            "description": "The lowest number to give, e.g. to continue an earlier system.",
            "default": 1
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next",
            "description": "The number a delivery saved today would receive."
          },
          "suggestion": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggestion",
            "description": "A format matching most existing delivery identifiers."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "NumberingRecord"
      },
      "NumberingSettings": {
        "properties": {
          "format": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40
              },
              {
                "type": "null"
              }
            ],
            "title": "Format",
            "description": "Identifier format for new deliveries, or null for none. Literal letters, digits and . _ / - with date parts {YYYY} {YY} {MM} {DD} of the service date and one number {N} or {N:4} (zero-padded to 4 digits), e.g. LIV-{YYYY}-{N:4}."
          },
          "start": {
            "type": "integer",
            "maximum": 999999999.0,
            "minimum": 1.0,
            "title": "Start",
            "description": "The lowest number to give, e.g. to continue an earlier system.",
            "default": 1
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "NumberingSettings"
      },
      "OptimizationRequest": {
        "properties": {
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "vehicle_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 25,
            "minItems": 1,
            "uniqueItems": true,
            "title": "Vehicle Ids"
          },
          "order_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 250,
            "minItems": 1,
            "uniqueItems": true,
            "title": "Order Ids"
          },
          "routing_policy": {
            "type": "string",
            "enum": [
              "TRUCK_STANDARD",
              "TRUCK_PREFER_NO_TOLLS",
              "TRUCK_PREFER_NO_MOTORWAYS"
            ],
            "title": "Routing Policy"
          },
          "solver_time_limit_seconds": {
            "type": "integer",
            "maximum": 60.0,
            "minimum": 1.0,
            "title": "Solver Time Limit Seconds"
          },
          "objective": {
            "type": "string",
            "enum": [
              "TRAVEL_TIME",
              "MODELED_TRAVEL_COST"
            ],
            "title": "Objective",
            "default": "TRAVEL_TIME"
          },
          "source_versions": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 1.0
                },
                "propertyNames": {
                  "format": "uuid"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Versions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "service_date",
          "vehicle_ids",
          "order_ids",
          "routing_policy",
          "solver_time_limit_seconds"
        ],
        "title": "OptimizationRequest"
      },
      "OrderActivation": {
        "properties": {
          "orders": {
            "items": {
              "$ref": "#/components/schemas/Versioned"
            },
            "type": "array",
            "maxItems": 250,
            "minItems": 1,
            "title": "Orders"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "orders",
          "active"
        ],
        "title": "OrderActivation"
      },
      "OrderInput": {
        "properties": {
          "external_id": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "External Id"
          },
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "address": {
            "type": "string",
            "maxLength": 500,
            "minLength": 1,
            "title": "Address"
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Location"
              },
              {
                "type": "null"
              }
            ]
          },
          "time_window": {
            "$ref": "#/components/schemas/Window"
          },
          "service_seconds": {
            "type": "integer",
            "maximum": 28800.0,
            "minimum": 0.0,
            "title": "Service Seconds"
          },
          "demand": {
            "$ref": "#/components/schemas/Capacity"
          },
          "required_skills": {
            "items": {
              "type": "string",
              "pattern": "^[A-Z][A-Z0-9_]{0,39}$"
            },
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "title": "Required Skills"
          },
          "instructions": {
            "type": "string",
            "maxLength": 1000,
            "title": "Instructions"
          },
          "priority": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Priority",
            "default": 0
          },
          "customer": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer",
            "description": "Code of the saved customer this delivery is for; a delivery at its reviewed entrance needs no new review."
          },
          "ships_from": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Ships From",
            "description": "Code of the depot this delivery is loaded at: only vehicles starting there carry it. Null: any vehicle."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "external_id",
          "service_date",
          "active",
          "address",
          "location",
          "time_window",
          "service_seconds",
          "demand",
          "required_skills",
          "instructions"
        ],
        "title": "OrderInput"
      },
      "OrderSelection": {
        "properties": {
          "orders": {
            "items": {
              "$ref": "#/components/schemas/Versioned"
            },
            "type": "array",
            "maxItems": 250,
            "minItems": 1,
            "title": "Orders"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "orders"
        ],
        "title": "OrderSelection"
      },
      "OrderSummary": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "active": {
            "type": "integer",
            "title": "Active"
          },
          "inactive": {
            "type": "integer",
            "title": "Inactive"
          },
          "review": {
            "type": "integer",
            "title": "Review",
            "description": "Located, but the location is not reviewed yet."
          },
          "missing": {
            "type": "integer",
            "title": "Missing",
            "description": "No location yet."
          },
          "ready": {
            "type": "integer",
            "title": "Ready",
            "description": "Active with a reviewed location: selectable for a calculation."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total",
          "active",
          "inactive",
          "review",
          "missing",
          "ready"
        ],
        "title": "OrderSummary",
        "description": "Delivery counts for one service day, after the optional search."
      },
      "Owned_CustomerInput_": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "An example: fictional, planned only with other examples, and removed with them.",
            "default": false
          },
          "data": {
            "$ref": "#/components/schemas/CustomerInput"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "data"
        ],
        "title": "Owned[CustomerInput]"
      },
      "Owned_OrderInput_": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "An example: fictional, planned only with other examples, and removed with them.",
            "default": false
          },
          "data": {
            "$ref": "#/components/schemas/OrderInput"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "data"
        ],
        "title": "Owned[OrderInput]"
      },
      "Owned_VehicleInput_": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "An example: fictional, planned only with other examples, and removed with them.",
            "default": false
          },
          "data": {
            "$ref": "#/components/schemas/VehicleInput"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "data"
        ],
        "title": "Owned[VehicleInput]"
      },
      "Owned_VehicleSource_": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "An example: fictional, planned only with other examples, and removed with them.",
            "default": false
          },
          "data": {
            "$ref": "#/components/schemas/VehicleSource"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "data"
        ],
        "title": "Owned[VehicleSource]"
      },
      "PasswordChange": {
        "properties": {
          "current_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "format": "password",
            "title": "Current Password",
            "writeOnly": true
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 15,
            "format": "password",
            "title": "New Password",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "PasswordChange"
      },
      "PasswordReset": {
        "properties": {
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 15,
            "format": "password",
            "title": "New Password",
            "writeOnly": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "new_password"
        ],
        "title": "PasswordReset"
      },
      "PlanListItem": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "READY"
            ],
            "title": "Status",
            "default": "DRAFT"
          },
          "validation": {
            "type": "string",
            "enum": [
              "PENDING",
              "PASS",
              "FAIL"
            ],
            "title": "Validation"
          },
          "result_stale": {
            "type": "boolean",
            "title": "Result Stale"
          },
          "active_job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Job Id"
          },
          "finalized_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finalized At"
          },
          "served_deliveries": {
            "type": "integer",
            "title": "Served Deliveries"
          },
          "unassigned_deliveries": {
            "type": "integer",
            "title": "Unassigned Deliveries"
          },
          "vehicles_used": {
            "type": "integer",
            "title": "Vehicles Used"
          },
          "distance_m": {
            "type": "integer",
            "title": "Distance M"
          },
          "known_cost_minor": {
            "type": "integer",
            "title": "Known Cost Minor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "service_date",
          "created_at",
          "updated_at",
          "validation",
          "result_stale",
          "active_job_id",
          "finalized_at",
          "served_deliveries",
          "unassigned_deliveries",
          "vehicles_used",
          "distance_m",
          "known_cost_minor"
        ],
        "title": "PlanListItem",
        "description": "A saved plan in a list, with totals computed from its stored result."
      },
      "PlanRecord": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          },
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "READY"
            ],
            "title": "Status",
            "default": "DRAFT"
          },
          "validation": {
            "type": "string",
            "enum": [
              "PENDING",
              "PASS",
              "FAIL"
            ],
            "title": "Validation"
          },
          "result_stale": {
            "type": "boolean",
            "title": "Result Stale"
          },
          "active_job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Job Id"
          },
          "finalized_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finalized At"
          },
          "input_data": {
            "$ref": "#/components/schemas/PlanningInput"
          },
          "result": {
            "$ref": "#/components/schemas/Draft"
          },
          "edit_error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobError"
              },
              {
                "type": "null"
              }
            ]
          },
          "sources_current": {
            "type": "boolean",
            "title": "Sources Current"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "version",
          "service_date",
          "created_at",
          "updated_at",
          "validation",
          "result_stale",
          "active_job_id",
          "finalized_at",
          "input_data",
          "result",
          "edit_error",
          "sources_current"
        ],
        "title": "PlanRecord"
      },
      "PlanningInput": {
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "data_kind": {
            "type": "string",
            "enum": [
              "SYNTHETIC",
              "ROUTED"
            ],
            "title": "Data Kind"
          },
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "depot": {
            "$ref": "#/components/schemas/DepotRecord"
          },
          "depots": {
            "items": {
              "$ref": "#/components/schemas/DepotRecord"
            },
            "type": "array",
            "maxItems": 60,
            "title": "Depots"
          },
          "vehicles": {
            "items": {
              "$ref": "#/components/schemas/Owned_VehicleInput_"
            },
            "type": "array",
            "maxItems": 25,
            "minItems": 1,
            "title": "Vehicles"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/Owned_OrderInput_"
            },
            "type": "array",
            "maxItems": 250,
            "minItems": 1,
            "title": "Orders"
          },
          "routing_policy": {
            "type": "string",
            "enum": [
              "TRUCK_STANDARD",
              "TRUCK_PREFER_NO_TOLLS",
              "TRUCK_PREFER_NO_MOTORWAYS"
            ],
            "title": "Routing Policy"
          },
          "objective": {
            "type": "string",
            "enum": [
              "TRAVEL_TIME",
              "MODELED_TRAVEL_COST"
            ],
            "title": "Objective",
            "default": "TRAVEL_TIME"
          },
          "solver_time_limit_seconds": {
            "type": "integer",
            "maximum": 60.0,
            "minimum": 1.0,
            "title": "Solver Time Limit Seconds"
          },
          "safety_margin_seconds": {
            "type": "integer",
            "maximum": 7200.0,
            "minimum": 0.0,
            "title": "Safety Margin Seconds",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "organization_id",
          "data_kind",
          "service_date",
          "depot",
          "vehicles",
          "orders",
          "routing_policy",
          "solver_time_limit_seconds"
        ],
        "title": "PlanningInput"
      },
      "Preferences": {
        "properties": {
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ],
            "title": "Language"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "language"
        ],
        "title": "Preferences"
      },
      "PreviewRow": {
        "properties": {
          "row": {
            "type": "integer",
            "title": "Row"
          },
          "action": {
            "type": "string",
            "enum": [
              "INSERT",
              "UNCHANGED",
              "UPDATE"
            ],
            "title": "Action"
          },
          "changes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Changes"
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VehicleSource"
              },
              {
                "$ref": "#/components/schemas/OrderInput"
              }
            ],
            "title": "Data"
          },
          "address_match": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressCandidate"
              },
              {
                "type": "null"
              }
            ]
          },
          "numbered": {
            "type": "boolean",
            "title": "Numbered",
            "default": false
          },
          "location_source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "FILE",
                  "ADDRESS",
                  "CUSTOMER",
                  "SAVED",
                  "NONE"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Source"
          },
          "customer_match": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "CODE",
                  "ADDRESS"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Match"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/RowWarning"
            },
            "type": "array",
            "title": "Warnings"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "row",
          "action",
          "data"
        ],
        "title": "PreviewRow"
      },
      "Rates": {
        "properties": {
          "currency": {
            "type": "string",
            "const": "EUR",
            "title": "Currency"
          },
          "fixed_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Fixed Minor"
          },
          "per_km_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Per Km Minor"
          },
          "per_hour_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Per Hour Minor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "currency",
          "fixed_minor",
          "per_km_minor",
          "per_hour_minor"
        ],
        "title": "Rates"
      },
      "Readiness": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "unavailable"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status"
        ],
        "title": "Readiness"
      },
      "Route": {
        "properties": {
          "vehicle_id": {
            "type": "string",
            "format": "uuid",
            "title": "Vehicle Id"
          },
          "profile": {
            "$ref": "#/components/schemas/Truck"
          },
          "departure": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Departure"
          },
          "end": {
            "type": "integer",
            "minimum": 0.0,
            "title": "End"
          },
          "stops": {
            "items": {
              "$ref": "#/components/schemas/Stop"
            },
            "type": "array",
            "title": "Stops"
          },
          "legs": {
            "items": {
              "$ref": "#/components/schemas/Leg"
            },
            "type": "array",
            "title": "Legs"
          },
          "distance_m": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Distance M"
          },
          "driving_seconds": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Driving Seconds"
          },
          "waiting_seconds": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Waiting Seconds"
          },
          "service_seconds": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Service Seconds"
          },
          "fixed_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Fixed Minor"
          },
          "distance_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Distance Minor"
          },
          "time_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Time Minor"
          },
          "known_cost_minor": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Known Cost Minor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "vehicle_id",
          "profile",
          "departure",
          "end",
          "stops",
          "legs",
          "distance_m",
          "driving_seconds",
          "waiting_seconds",
          "service_seconds",
          "fixed_minor",
          "distance_minor",
          "time_minor",
          "known_cost_minor"
        ],
        "title": "Route"
      },
      "RouteAssignment": {
        "properties": {
          "vehicle_id": {
            "type": "string",
            "format": "uuid",
            "title": "Vehicle Id"
          },
          "order_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 250,
            "minItems": 1,
            "uniqueItems": true,
            "title": "Order Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "vehicle_id",
          "order_ids"
        ],
        "title": "RouteAssignment"
      },
      "RouteSheet": {
        "properties": {
          "vehicle_id": {
            "type": "string",
            "format": "uuid",
            "title": "Vehicle Id"
          },
          "vehicle": {
            "type": "string",
            "title": "Vehicle",
            "description": "The fleet number."
          },
          "start": {
            "$ref": "#/components/schemas/SheetPlace"
          },
          "end": {
            "$ref": "#/components/schemas/SheetPlace"
          },
          "departure": {
            "type": "string",
            "format": "date-time",
            "title": "Departure"
          },
          "arrival": {
            "type": "string",
            "format": "date-time",
            "title": "Arrival",
            "description": "Back at its end place."
          },
          "distance_m": {
            "type": "integer",
            "title": "Distance M"
          },
          "driving_seconds": {
            "type": "integer",
            "title": "Driving Seconds"
          },
          "service_seconds": {
            "type": "integer",
            "title": "Service Seconds"
          },
          "waiting_seconds": {
            "type": "integer",
            "title": "Waiting Seconds"
          },
          "load": {
            "$ref": "#/components/schemas/Capacity",
            "description": "Everything it carries when it leaves."
          },
          "stops": {
            "items": {
              "$ref": "#/components/schemas/SheetStop"
            },
            "type": "array",
            "title": "Stops"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "vehicle_id",
          "vehicle",
          "start",
          "end",
          "departure",
          "arrival",
          "distance_m",
          "driving_seconds",
          "service_seconds",
          "waiting_seconds",
          "load",
          "stops"
        ],
        "title": "RouteSheet",
        "description": "One vehicle's day: where it leaves from and returns to, and its deliveries in order."
      },
      "RouteSheets": {
        "properties": {
          "plan_id": {
            "type": "string",
            "format": "uuid",
            "title": "Plan Id"
          },
          "plan_version": {
            "type": "integer",
            "title": "Plan Version"
          },
          "service_date": {
            "type": "string",
            "format": "date",
            "title": "Service Date"
          },
          "company": {
            "type": "string",
            "title": "Company"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Generated At"
          },
          "example": {
            "type": "boolean",
            "title": "Example",
            "description": "A plan of example records: fictional deliveries, not routes to drive."
          },
          "sheets": {
            "items": {
              "$ref": "#/components/schemas/RouteSheet"
            },
            "type": "array",
            "title": "Sheets"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "plan_id",
          "plan_version",
          "service_date",
          "company",
          "generated_at",
          "example",
          "sheets"
        ],
        "title": "RouteSheets",
        "description": "Route sheets of a current READY plan: one per vehicle that has deliveries."
      },
      "RowError": {
        "properties": {
          "row": {
            "type": "integer",
            "title": "Row"
          },
          "field": {
            "type": "string",
            "title": "Field"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Values"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "row",
          "field",
          "message"
        ],
        "title": "RowError"
      },
      "RowWarning": {
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "NO_LOCATION",
              "ADDRESS_NOT_FOUND",
              "ADDRESS_VAGUE",
              "ADDRESS_UNCERTAIN",
              "COORDINATES_SWAPPED",
              "FAR_FROM_DEPOT",
              "SAME_ADDRESS_ELSEWHERE",
              "PAST_DATE",
              "CUSTOMER_POINT_DIFFERS"
            ],
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Template"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Values"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "RowWarning",
        "description": "Something in a row to check; unlike an error it does not stop the import."
      },
      "SafetyMarginSetting": {
        "properties": {
          "minutes": {
            "type": "integer",
            "maximum": 120.0,
            "minimum": 0.0,
            "title": "Minutes",
            "description": "Calculations plan every delivery at least this many minutes before its window ends (never before it opens). Validation still checks the real windows."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "minutes"
        ],
        "title": "SafetyMarginSetting"
      },
      "SaveAsCustomer": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Code"
          },
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "title": "SaveAsCustomer"
      },
      "SavedCustomer": {
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/Owned_CustomerInput_"
          },
          "order": {
            "$ref": "#/components/schemas/Owned_OrderInput_"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "customer",
          "order"
        ],
        "title": "SavedCustomer"
      },
      "SessionRecord": {
        "properties": {
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "csrf_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Csrf Token"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "identity",
          "csrf_token",
          "expires_at"
        ],
        "title": "SessionRecord"
      },
      "SetupRequest": {
        "properties": {
          "username": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.@+-]*$",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 15,
            "format": "password",
            "title": "Password",
            "writeOnly": true
          },
          "setup_token": {
            "type": "string",
            "maxLength": 256,
            "minLength": 32,
            "format": "password",
            "title": "Setup Token",
            "writeOnly": true
          },
          "display_name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Display Name"
          },
          "company_name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Company Name"
          },
          "depot": {
            "$ref": "#/components/schemas/DepotInput"
          },
          "public_address_lookup": {
            "type": "boolean",
            "title": "Public Address Lookup",
            "default": false
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "fr"
            ],
            "title": "Language",
            "default": "en"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "username",
          "password",
          "setup_token",
          "display_name",
          "company_name",
          "depot"
        ],
        "title": "SetupRequest"
      },
      "SetupStatus": {
        "properties": {
          "required": {
            "type": "boolean",
            "title": "Required"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "map_style_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Map Style Url"
          },
          "address_lookup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Lookup"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "required",
          "enabled"
        ],
        "title": "SetupStatus"
      },
      "SheetPlace": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "latitude": {
            "type": "number",
            "title": "Latitude"
          },
          "longitude": {
            "type": "number",
            "title": "Longitude"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "name",
          "address",
          "latitude",
          "longitude"
        ],
        "title": "SheetPlace",
        "description": "A depot or place a route leaves from or returns to, at its reviewed vehicle entrance."
      },
      "SheetStop": {
        "properties": {
          "sequence": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Sequence"
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "title": "Order Id"
          },
          "delivery": {
            "type": "string",
            "title": "Delivery",
            "description": "The delivery number (external_id)."
          },
          "customer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer",
            "description": "Code of the saved customer, when the delivery names one."
          },
          "address": {
            "type": "string",
            "title": "Address"
          },
          "latitude": {
            "type": "number",
            "title": "Latitude"
          },
          "longitude": {
            "type": "number",
            "title": "Longitude"
          },
          "time_window": {
            "$ref": "#/components/schemas/Window"
          },
          "arrival": {
            "type": "string",
            "format": "date-time",
            "title": "Arrival"
          },
          "service_start": {
            "type": "string",
            "format": "date-time",
            "title": "Service Start",
            "description": "Later than arrival when the vehicle waits for the time window."
          },
          "departure": {
            "type": "string",
            "format": "date-time",
            "title": "Departure"
          },
          "service_seconds": {
            "type": "integer",
            "title": "Service Seconds"
          },
          "demand": {
            "$ref": "#/components/schemas/Capacity"
          },
          "required_skills": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Required Skills"
          },
          "instructions": {
            "type": "string",
            "title": "Instructions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sequence",
          "order_id",
          "delivery",
          "customer",
          "address",
          "latitude",
          "longitude",
          "time_window",
          "arrival",
          "service_start",
          "departure",
          "service_seconds",
          "demand",
          "required_skills",
          "instructions"
        ],
        "title": "SheetStop",
        "description": "One delivery in driving order. Times are Europe/Paris; the point is the reviewed vehicle entrance."
      },
      "SourceProblem": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "detail": {
            "type": "string",
            "title": "Detail"
          },
          "identifiers": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifiers"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "detail"
        ],
        "title": "SourceProblem"
      },
      "Stop": {
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "title": "Order Id"
          },
          "arrival": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Arrival"
          },
          "service_start": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Service Start"
          },
          "departure": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Departure"
          },
          "load_after": {
            "items": {
              "type": "integer",
              "minimum": 0.0
            },
            "type": "array",
            "title": "Load After"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "order_id",
          "arrival",
          "service_start",
          "departure",
          "load_after"
        ],
        "title": "Stop"
      },
      "SystemStatus": {
        "properties": {
          "worker": {
            "type": "string",
            "enum": [
              "RUNNING",
              "NOT_RUNNING"
            ],
            "title": "Worker"
          },
          "routing": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "UNAVAILABLE"
            ],
            "title": "Routing"
          },
          "dataset": {
            "type": "string",
            "title": "Dataset"
          },
          "queued_jobs": {
            "type": "integer",
            "title": "Queued Jobs"
          },
          "running_jobs": {
            "type": "integer",
            "title": "Running Jobs"
          },
          "oldest_queued_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Oldest Queued Seconds"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "worker",
          "routing",
          "dataset",
          "queued_jobs",
          "running_jobs",
          "oldest_queued_seconds"
        ],
        "title": "SystemStatus"
      },
      "Truck": {
        "properties": {
          "height_mm": {
            "type": "integer",
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Height Mm"
          },
          "width_mm": {
            "type": "integer",
            "maximum": 10000.0,
            "minimum": 1.0,
            "title": "Width Mm"
          },
          "length_mm": {
            "type": "integer",
            "maximum": 50000.0,
            "minimum": 1.0,
            "title": "Length Mm"
          },
          "gross_weight_kg": {
            "type": "integer",
            "maximum": 100000.0,
            "minimum": 1.0,
            "title": "Gross Weight Kg"
          },
          "axle_load_kg": {
            "type": "integer",
            "maximum": 40000.0,
            "minimum": 1.0,
            "title": "Axle Load Kg"
          },
          "axle_count": {
            "type": "integer",
            "maximum": 12.0,
            "minimum": 2.0,
            "title": "Axle Count"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "height_mm",
          "width_mm",
          "length_mm",
          "gross_weight_kg",
          "axle_load_kg",
          "axle_count"
        ],
        "title": "Truck"
      },
      "Unassigned": {
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid",
            "title": "Order Id"
          },
          "reason": {
            "type": "string",
            "enum": [
              "NO_COMPATIBLE_VEHICLE",
              "NO_ROAD_NEAR_PIN",
              "NO_ROUTE_IN_DATASET",
              "SOLVER_UNASSIGNED",
              "MANUALLY_UNASSIGNED"
            ],
            "title": "Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "order_id",
          "reason"
        ],
        "title": "Unassigned"
      },
      "UpdateUser": {
        "properties": {
          "display_name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Display Name"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "planner"
            ],
            "title": "Role"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "display_name",
          "role",
          "active"
        ],
        "title": "UpdateUser"
      },
      "UserRecord": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "planner"
            ],
            "title": "Role"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "username",
          "display_name",
          "role",
          "active"
        ],
        "title": "UserRecord"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VehicleInput": {
        "properties": {
          "fleet_number": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Fleet Number"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "routing": {
            "$ref": "#/components/schemas/Truck"
          },
          "capacity": {
            "$ref": "#/components/schemas/Capacity"
          },
          "skills": {
            "items": {
              "type": "string",
              "pattern": "^[A-Z][A-Z0-9_]{0,39}$"
            },
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "title": "Skills"
          },
          "cost": {
            "$ref": "#/components/schemas/Rates"
          },
          "limits": {
            "$ref": "#/components/schemas/VehicleLimits"
          },
          "start": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Start",
            "description": "Code of the depot or place where the vehicle starts its day and is loaded; null: the main depot."
          },
          "end": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "End",
            "description": "Code of the depot or place where it ends its day; null: where it started."
          },
          "available_window": {
            "$ref": "#/components/schemas/Window"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "fleet_number",
          "active",
          "routing",
          "capacity",
          "skills",
          "cost",
          "available_window"
        ],
        "title": "VehicleInput",
        "description": "A vehicle as one calculation uses it: its window on the planning day."
      },
      "VehicleLimits": {
        "properties": {
          "max_stops": {
            "type": "integer",
            "maximum": 250.0,
            "minimum": 1.0,
            "title": "Max Stops"
          },
          "max_distance_m": {
            "type": "integer",
            "maximum": 2000000.0,
            "minimum": 1.0,
            "title": "Max Distance M"
          },
          "max_driving_seconds": {
            "type": "integer",
            "maximum": 90000.0,
            "minimum": 1.0,
            "title": "Max Driving Seconds"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "VehicleLimits"
      },
      "VehicleSource": {
        "properties": {
          "fleet_number": {
            "type": "string",
            "maxLength": 40,
            "minLength": 1,
            "title": "Fleet Number"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "routing": {
            "$ref": "#/components/schemas/Truck"
          },
          "capacity": {
            "$ref": "#/components/schemas/Capacity"
          },
          "skills": {
            "items": {
              "type": "string",
              "pattern": "^[A-Z][A-Z0-9_]{0,39}$"
            },
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "title": "Skills"
          },
          "cost": {
            "$ref": "#/components/schemas/Rates"
          },
          "limits": {
            "$ref": "#/components/schemas/VehicleLimits"
          },
          "start": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Start",
            "description": "Code of the depot or place where the vehicle starts its day and is loaded; null: the main depot."
          },
          "end": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 40,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "End",
            "description": "Code of the depot or place where it ends its day; null: where it started."
          },
          "hours": {
            "$ref": "#/components/schemas/WeeklyHours"
          },
          "exceptions": {
            "items": {
              "$ref": "#/components/schemas/DayException"
            },
            "type": "array",
            "maxItems": 100,
            "title": "Exceptions",
            "description": "Days off and days with other hours, at most one per date; they replace the weekly hours on that date."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "fleet_number",
          "active",
          "routing",
          "capacity",
          "skills",
          "cost",
          "hours"
        ],
        "title": "VehicleSource",
        "description": "A saved vehicle: weekly working hours and dated exceptions, not one dated window."
      },
      "VehicleSummary": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "active": {
            "type": "integer",
            "title": "Active"
          },
          "inactive": {
            "type": "integer",
            "title": "Inactive"
          },
          "off_day": {
            "type": "integer",
            "title": "Off Day",
            "description": "Active vehicles that do not work on service_date: no weekly hours that weekday, or a day off."
          },
          "active_payload_kg": {
            "type": "number",
            "title": "Active Payload Kg"
          },
          "equipment": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Equipment",
            "description": "Equipment codes held by at least one vehicle."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total",
          "active",
          "inactive",
          "off_day",
          "active_payload_kg",
          "equipment"
        ],
        "title": "VehicleSummary",
        "description": "Fleet counts after the optional search; `off_day` is relative to the planning day."
      },
      "Versioned": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "version"
        ],
        "title": "Versioned"
      },
      "WeeklyHours": {
        "properties": {
          "monday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "tuesday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "wednesday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "thursday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "friday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "saturday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          },
          "sunday": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Hours"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "WeeklyHours",
        "description": "Regular working hours for each day of the week; null for a day the vehicle does not work."
      },
      "Window": {
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "title": "End"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "title": "Window"
      }
    },
    "securitySchemes": {
      "APIKeyCookie": {
        "type": "apiKey",
        "description": "Required in shared mode. Obtain through POST /session; writes also require X-CSRF-Token and the configured Origin.",
        "in": "cookie",
        "name": "__Host-vrp_session"
      },
      "LocalSessionCookie": {
        "type": "apiKey",
        "description": "Authenticated loopback local mode only; shared mode never accepts this cookie.",
        "in": "cookie",
        "name": "vrp_local_session"
      }
    }
  }
}
