{
  "openapi": "3.0.4",
  "info": {
    "title": "Keatech Public API",
    "description": "<h1><b>This API version has been deprecated.</b></h1>",
    "contact": {
      "name": "Support",
      "email": "support@keatech.com"
    },
    "version": "1.0"
  },
  "paths": {
    "/experimental/vehicles/{vehicleId}/alarm-log": {
      "get": {
        "tags": [
          "AlarmLog"
        ],
        "summary": "EXPERIMENTAL: Get alarm log for a vehicle in a given period",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "description": "Id of the vehicle to retrieve the alarm log for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Id of the vehicle to retrieve the alarm log for"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Period start date/time, UTC",
            "schema": {
              "type": "string",
              "description": "Period start date/time, UTC",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Period end date/time, UTC",
            "schema": {
              "type": "string",
              "description": "Period end date/time, UTC",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlarmLogEntry"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlarmLogEntry"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlarmLogEntry"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "Keatech.PublicApi.Server"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/poi": {
      "get": {
        "tags": [
          "Poi"
        ],
        "summary": "Get list of POI",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "post": {
        "tags": [
          "Poi"
        ],
        "summary": "Create a new POI",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiResponse"
                }
              }
            }
          },
          "409": {
            "description": "A POI with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/poi/{id}": {
      "put": {
        "tags": [
          "Poi"
        ],
        "summary": "Update a POI",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the POI to update",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the POI to update"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A POI with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          },
          "409": {
            "description": "A POI with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "tags": [
          "Poi"
        ],
        "summary": "Delete a POI",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the POI to delete",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the POI to delete"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A POI with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/poi-groups": {
      "get": {
        "tags": [
          "PoiGroups"
        ],
        "summary": "Get list of POI groups",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoiGroup"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoiGroup"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoiGroup"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "post": {
        "tags": [
          "PoiGroups"
        ],
        "summary": "Create a new POI group",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiGroupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiGroupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePoiGroupRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiGroupResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiGroupResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePoiGroupResponse"
                }
              }
            }
          },
          "409": {
            "description": "A POI group with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/poi-groups/{id}": {
      "put": {
        "tags": [
          "PoiGroups"
        ],
        "summary": "Update a POI group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the POI group to update",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the POI group to update"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiGroupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiGroupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePoiGroupRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A POI group with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          },
          "409": {
            "description": "A POI group with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "tags": [
          "PoiGroups"
        ],
        "summary": "Delete a POI group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the POI group to delete",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the POI group to delete"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A POI group with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/poi-groups/{id}/poi": {
      "get": {
        "tags": [
          "PoiGroups"
        ],
        "summary": "Get list of POI by GroupId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Id of the group to retrieve poi's for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Id of the group to retrieve poi's for"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Poi"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicles/{vehicleId}/trips": {
      "get": {
        "tags": [
          "Trips"
        ],
        "summary": "Get list of the trips for given vehicle which start in given timespan",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "description": "Id of the vehicle to retieve the trips for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Id of the vehicle to retieve the trips for"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Timespan start date/time, UTC",
            "schema": {
              "type": "string",
              "description": "Timespan start date/time, UTC",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Timespan end date/time, UTC",
            "schema": {
              "type": "string",
              "description": "Timespan end date/time, UTC",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Trip"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Trip"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Trip"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicles/{vehicleId}/trips/{tripId}/positions": {
      "get": {
        "tags": [
          "Trips"
        ],
        "summary": "Get list of positions for the given trip",
        "parameters": [
          {
            "name": "vehicleId",
            "in": "path",
            "description": "ID of the vehicle to retieve the trip positions for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the vehicle to retieve the trip positions for"
            }
          },
          {
            "name": "tripId",
            "in": "path",
            "description": "ID of the trip to retieve positions for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the trip to retieve positions for"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripPosition"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripPosition"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripPosition"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Trip with given VehicleId or TripId was not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicle-categories": {
      "get": {
        "tags": [
          "VehicleCategories"
        ],
        "summary": "Get list of vehicle categories",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VehicleCategory"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VehicleCategory"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VehicleCategory"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "post": {
        "tags": [
          "VehicleCategories"
        ],
        "summary": "Create a new vehicle category",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVehicleCategoryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVehicleCategoryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVehicleCategoryRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVehicleCategoryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVehicleCategoryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateVehicleCategoryResponse"
                }
              }
            }
          },
          "409": {
            "description": "A vehicle category with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicle-categories/{id}": {
      "put": {
        "tags": [
          "VehicleCategories"
        ],
        "summary": "Update a vehicle category",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the vehicle category to update",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the vehicle category to update"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleCategoryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleCategoryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleCategoryRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A vehicle category with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          },
          "409": {
            "description": "A vehicle category with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "tags": [
          "VehicleCategories"
        ],
        "summary": "Delete a vehicle category",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the vehicle category to delete",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the vehicle category to delete"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A vehicle category with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicles": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Get list of vehicles",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicles/byDeviceId/{deviceId}": {
      "get": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Get vehicle by Device ID (aka Serial Number)",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "description": "ID of the device to find a vehicle by",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the device to find a vehicle by"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vehicle"
                  }
                }
              }
            }
          },
          "404": {
            "description": "A vehicle with given Device ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/v1/vehicles/{id}": {
      "put": {
        "tags": [
          "Vehicles"
        ],
        "summary": "Update a vehicle",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the vehicle to update",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of the vehicle to update"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVehicleRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success"
          },
          "404": {
            "description": "A vehicle with given ID does not exist",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          },
          "409": {
            "description": "A vehicle with specified name already exists",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorInformation"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": "Country code in ISO3166-1 alpha2 standard",
            "nullable": true
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Represents the name of a geographical location, which can be a city, town, village, or other similar entity",
            "nullable": true
          },
          "street": {
            "type": "string",
            "description": "Name of the street",
            "nullable": true
          },
          "houseNumber": {
            "type": "string",
            "description": "House number",
            "nullable": true
          },
          "placeName": {
            "type": "string",
            "description": "Name of the place",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Address information"
      },
      "AlarmLogEntry": {
        "required": [
          "alarmName"
        ],
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Time when the alarm triggered",
            "format": "date-time"
          },
          "alarmName": {
            "type": "string",
            "description": "Name of the alarm"
          }
        },
        "additionalProperties": false,
        "description": "Information about an alarm trigger event"
      },
      "CreatePoiGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters. Must be unique",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to create a POI group"
      },
      "CreatePoiGroupResponse": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the newly created POI group"
          }
        },
        "additionalProperties": false,
        "description": "POI group creation response"
      },
      "CreatePoiRequest": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "ID of the POI Group to create a POI in",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters. Must be unique",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "note": {
            "type": "string",
            "description": "Free-text note. Up to 4000 characters",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to create a POI"
      },
      "CreatePoiResponse": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the newly created POI"
          }
        },
        "additionalProperties": false,
        "description": "POI creation response"
      },
      "CreateVehicleCategoryRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 32 characters. Must be unique",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to create a vehicle category"
      },
      "CreateVehicleCategoryResponse": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the newly created vehicle category"
          }
        },
        "additionalProperties": false,
        "description": "Vehicle category creation response"
      },
      "ErrorInformation": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "parameters": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorInformation"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Location": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Poi": {
        "required": [
          "groupId",
          "id",
          "location",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID"
          },
          "groupId": {
            "type": "string",
            "description": "ID of the POI group the current POI belongs to"
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "note": {
            "type": "string",
            "description": "Free-text note. Up to 4000 characters",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "POI information"
      },
      "PoiGroup": {
        "required": [
          "color",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID"
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters"
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)"
          }
        },
        "additionalProperties": false,
        "description": "POI group information"
      },
      "Trip": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Trip Id"
          },
          "driver": {
            "type": "string",
            "description": "Name of the driver who performed the trip",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "description": "Time the trip started",
            "format": "date-time"
          },
          "startLocation": {
            "$ref": "#/components/schemas/Location"
          },
          "startAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "endedAt": {
            "type": "string",
            "description": "Time the trip ended. Omitted if the trip is still in progress",
            "format": "date-time",
            "nullable": true
          },
          "endLocation": {
            "$ref": "#/components/schemas/Location"
          },
          "endAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "distance": {
            "type": "number",
            "description": "Distance travelled during the trip, kilometers. Omitted if the trip is still in progress or distance is unkown",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Trip information"
      },
      "TripPosition": {
        "required": [
          "location"
        ],
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Position timestamp, UTC",
            "format": "date-time"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "speed": {
            "type": "number",
            "description": "Speed of the vehicle, km/h",
            "format": "double",
            "nullable": true
          },
          "direction": {
            "type": "number",
            "description": "Moving direction of the vehicle, in degrees. Range: 0 through 360. 0 means North, 90 - East etc",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Information about a position during a trip"
      },
      "UpdatePoiGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters. If specified, must be unique",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update a POI group"
      },
      "UpdatePoiRequest": {
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "ID of the POI Group to assign the POI to",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters. Must be unique",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "note": {
            "type": "string",
            "description": "Free-text note. Up to 4000 characters",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update a POI"
      },
      "UpdateVehicleCategoryRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 32 characters. If specified, must be unique",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update a vehicle category"
      },
      "UpdateVehicleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters. Must be unique",
            "nullable": true
          },
          "driver": {
            "type": "string",
            "description": "Name of the driver. Up to 50 characters",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Free-text note. Up to 4000 characters",
            "nullable": true
          },
          "licensePlateCountry": {
            "type": "string",
            "description": "License plate country",
            "nullable": true
          },
          "licensePlateNumber": {
            "type": "string",
            "description": "License plate number",
            "nullable": true
          },
          "mileage": {
            "type": "number",
            "description": "Total distance driven by the vehicle, in kilometers",
            "format": "double",
            "nullable": true
          },
          "input1Time": {
            "type": "number",
            "description": "Total work time while Input1 is high, in seconds",
            "format": "double",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of vehicle categories this vehicle belongs to",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to update a vehicle"
      },
      "Vehicle": {
        "required": [
          "categories",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID"
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 64 characters"
          },
          "driver": {
            "type": "string",
            "description": "Name of the driver. Up to 50 characters",
            "nullable": true
          },
          "deviceSerialNumber": {
            "type": "string",
            "description": "Serial Number (aka Device ID) of the GPS device currently installed in the vehicle. Absent if the vehicle does not have any GPS device installed. May change if another GPS device is installed to the vehicle",
            "nullable": true
          },
          "licensePlateCountry": {
            "type": "string",
            "description": "License Plate Country",
            "nullable": true
          },
          "licensePlateNumber": {
            "type": "string",
            "description": "License Plate Number",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "description": "Vehicle's VIN number, if known. Up to 64 characters",
            "nullable": true
          },
          "make": {
            "type": "string",
            "description": "Vehicle's manufacturer, if known. Up to 64 characters",
            "nullable": true
          },
          "model": {
            "type": "string",
            "description": "Vehicle's model, if known. Up to 64 characters",
            "nullable": true
          },
          "variant": {
            "type": "string",
            "description": "Vehicle's variant, if known. Up to 64 characters",
            "nullable": true
          },
          "firstRegistrationYear": {
            "type": "integer",
            "description": "First year the vehicle was registered with authorities, if known",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Free-text note. Up to 4000 characters",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "description": "Time (UTC) the vehicle's location has been updated. May be absent if the vehicle has never reported its location (or has no GPS device installed)",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "isDriving": {
            "type": "boolean",
            "description": "Shows if the vehicle is currently driving. Absent if the vehicle never reported its location (or has no GPS device installed)",
            "nullable": true
          },
          "speed": {
            "type": "number",
            "description": "Current speed of the vehicle, in kilometers per hour. Only present when driving",
            "format": "double",
            "nullable": true
          },
          "direction": {
            "type": "number",
            "description": "Current moving direction of the vehicle, in degrees. Range: 0 through 360. 0 means North, 90 - East etc. Only present when driving",
            "format": "double",
            "nullable": true
          },
          "mileage": {
            "type": "number",
            "description": "Total distance driven by the vehicle, in kilometers",
            "format": "double"
          },
          "lastInspectionDate": {
            "type": "string",
            "description": "The date the vehicle was inspected last time",
            "format": "date",
            "nullable": true
          },
          "nextInspectionDate": {
            "type": "string",
            "description": "The date the vehicle has to be inspected next time",
            "format": "date",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of vehicle categories this vehicle belongs to",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Vehicle information"
      },
      "VehicleCategory": {
        "required": [
          "color",
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID"
          },
          "name": {
            "type": "string",
            "description": "Human-friendly display name. Up to 32 characters"
          },
          "color": {
            "type": "string",
            "description": "Display color in HEX format which follows '#XXXXXX' pattern, where X is a hex digit (0-9, A-F)"
          }
        },
        "additionalProperties": false,
        "description": "Vehicle category information"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Enter the Bearer Authorization string as following: `Bearer JWT-Token`",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "AlarmLog"
    },
    {
      "name": "Keatech.PublicApi.Server"
    },
    {
      "name": "Poi"
    },
    {
      "name": "PoiGroups"
    },
    {
      "name": "Trips"
    },
    {
      "name": "VehicleCategories"
    },
    {
      "name": "Vehicles"
    }
  ]
}