{
  "openapi": "3.0.1",
  "info": {
    "title": "KleverKey API",
    "description": "\r\n</p>\r\n<p>The KleverKey API is built as a RESTful web service that also supports the sending of events to configured <a href=\"/documentation/web-events\">web hooks</a>.</p>\r\n<h2>Authentication</h2>\r\n<h3>API key</h3>\r\n<p>Add the following header to the request. <a href=\"/account/api-keys\">Generate an API key</a></p>\r\n<pre>Authorization: ApiKey &lt;APIKEY&gt;</pre>\r\n<h2>Base URL</h2>\r\nThe KleverKey API base URL is <strong>https://dev-api.kleverkey.com</strong><p>",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://dev-api.kleverkey.com"
    }
  ],
  "paths": {
    "/api/v1/event-log": {
      "get": {
        "tags": [
          "/event-log"
        ],
        "summary": "Get events",
        "parameters": [
          {
            "name": "EventTypes",
            "in": "query",
            "description": "Event types (i.e ?eventTypes=PermissionGranted&eventTypes=PermissionRevoked)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EventType"
              }
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "OrganizationId",
            "in": "query",
            "description": "Organization ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "LockId",
            "in": "query",
            "description": "Lock ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GatewayId",
            "in": "query",
            "description": "Gateway ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/EventListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations": {
      "post": {
        "tags": [
          "/organizations"
        ],
        "summary": "Create organization",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}": {
      "get": {
        "tags": [
          "/organizations"
        ],
        "summary": "Get organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations"
        ],
        "summary": "Update organization partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Organization patch operations (paths: /name, /emailBanner)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/access-groups": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Get access groups",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "LockId",
            "in": "query",
            "description": "Lock ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGroupListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Add access group",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Access group object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGroup"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/access-groups/{accessGroupId}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Get access group",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessGroupId",
            "in": "path",
            "description": "Access group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGroup"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Update access group",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessGroupId",
            "in": "path",
            "description": "Access group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Access group object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AccessGroupCreationOrModification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGroup"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Update access group partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessGroupId",
            "in": "path",
            "description": "Access group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock patch operations (paths: /lockIds, /userIds)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessGroup"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/access-groups"
        ],
        "summary": "Delete access group",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "accessGroupId",
            "in": "path",
            "description": "Access group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/bookings/{serviceName}": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/bookings"
        ],
        "summary": "Add, update or delete bookings",
        "description": "This endpoint isn't RESTful, it's intended to provide a simple way to add, update and delete invitations and\r\npermissions while keeping references to origin users, bookings and booked resources.\r\n This endpoint is a\r\ncombination of the permission, invitation and identity mapping endpoints and most things that can be done\r\nwith this endpoint, could also be done with the other endpoints.\r\n The KleverKey Zapier app uses this\r\nendpoint.",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "serviceName",
            "in": "path",
            "description": "Service name (allowed characters are lower case a-z, 0-9 _ and -)",
            "required": true,
            "schema": {
              "pattern": "^[a-z0-9_-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Booking options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/BookingOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BookingOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/{deviceId}/device-permissions/reset-sync-retry-counters": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Reset device permission sync retry counters",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/smart-cards": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Get smart cards",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsAssigned",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/smart-cards/{deviceId}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Get smart card",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Update smart card partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Smart card ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card patch operations (paths: /name)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Delete generic smart card",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Smart card ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/smart-cards/generic": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Add smart card to organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/smart-cards/{uid}/claim": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Claim KleverKey smart card to organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "uid",
            "in": "path",
            "description": "Smart card UID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card claim options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardClaimOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardClaimOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardClaimOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardClaimOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/devices/smart-cards/{deviceId}/release": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/devices/smart-cards"
        ],
        "summary": "Release KleverKey smart card from organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Smart card ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Get gateways",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsConnected",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasLatestFirmare",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeFirmwareUpdateInformation",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayHexId}/claim": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Claim gateway to organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayHexId",
            "in": "path",
            "description": "Gateway HEX ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Gateway claim options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayClaimOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayClaimOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayClaimOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayClaimOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Gateway"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Get gateway",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeFirmwareUpdateInformation",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Gateway"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayInfo"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Update gateway partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Gateway patch operations (paths: /name)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Gateway"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/release": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Release gateway from organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Gateway release options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayReleaseOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayReleaseOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayReleaseOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayReleaseOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Gateway"
                    },
                    {
                      "$ref": "#/components/schemas/GatewayInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/events": {
      "delete": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Delete gateway events",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/restart": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Restart gateway",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/discovered-peripherals": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Get discovered peripherals by the gateway",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveredPeripheralListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/firmware-updates/latest": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Get latest gateway firmware update",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirmwareUpdate"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gateways/{gatewayId}/firmware-updates/{firmwareUpdateId}/start": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/gateways"
        ],
        "summary": "Start gateway firmware update",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "gatewayId",
            "in": "path",
            "description": "Gateway ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "firmwareUpdateId",
            "in": "path",
            "description": "Firmware update ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Get invitations",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "InvitationTypes",
            "in": "query",
            "description": "Invitation types (i.e ?invitationTypes=UserSignUp&invitationTypes=OrganizationJoining)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InvitationType"
              }
            }
          },
          {
            "name": "InvitationStatuses",
            "in": "query",
            "description": "Invitation statuses (i.e ?invitationStatuses=Pending&invitationStatuses=Accepted)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InvitationStatus"
              }
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/{id}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Get invitation",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Invitation ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Update invitation partially",
        "description": "Valid states\r\n\r\nCanceled = 4\r\n\r\n\r\nPatch body example:\r\n\r\n[{\"op\":\"replace\",\"path\":\"/status\",\"value\":\"Canceled\"}]",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Invitation ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Invitation patch operations (paths: /status)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/{id}/resend": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Resend invitation",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Invitation ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/user-invitation": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Invite user to join organization (with permissions, access groups, roles etc.)",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "User invitation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserInvitationOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserInvitationOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserInvitationOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserInvitationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/sign-up-invitation": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "OBSOLETE: Use POST /organizations/{organizationId}/invitations/user-invitation instead",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "User sign up invitation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserSignUpInvitationOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserSignUpInvitationOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserSignUpInvitationOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserSignUpInvitationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/organization-joining-invitation": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "OBSOLETE: Use POST /organizations/{organizationId}/invitations/user-invitation instead",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Organization joining invitation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationJoiningInvitationOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationJoiningInvitationOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationJoiningInvitationOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationJoiningInvitationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/invitations/smart-card-assignment-invitation": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/invitations"
        ],
        "summary": "Invite a user to accept a smart card assignment",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card assignment invitation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentInvitationOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentInvitationOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentInvitationOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentInvitationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/lock-activation-links": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Get lock activation links",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "LockId",
            "in": "query",
            "description": "Lock ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ReceiverEmailOrPhoneNumber",
            "in": "query",
            "description": "Receiver email or phone number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockActivationLinkListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Add lock activation link",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock activation link object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockActivationLink"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/lock-activation-links/{lockActivationLinkId}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Update lock activation link",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockActivationLinkId",
            "in": "path",
            "description": "Lock activation link ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock activation link object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkModification"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkModification"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkModification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationLinkModification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockActivationLink"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Delete lock activation link",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockActivationLinkId",
            "in": "path",
            "description": "Lock activation link ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/lock-activation-links/users": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Get lock activation link users",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockActivationLinkUserListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/lock-activation-links/phone-number-check/{phoneNumber}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/lock-activation-links"
        ],
        "summary": "Check phone number for lock activation link",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "description": "Phone Number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumberCheck"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Get locks",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IsConnected",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsLinked",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasLatestFirmware",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasLocationData",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeFirmwareUpdateInformation",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/LockListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockHexId}/claim": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Claim lock to organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockHexId",
            "in": "path",
            "description": "Lock HEX ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Lock claim options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockClaimOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockClaimOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockClaimOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockClaimOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Get lock",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeFirmwareUpdateInformation",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Update lock partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock patch operations (paths: /name, /locationLatitude, /locationLongitude, /locationAccuracy, /timezone, /timerConfiguration, /properties, /smartCardAuthentication, /openCloseWaitTime, /flags)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/release": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Release lock from organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock release options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockReleaseOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockReleaseOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockReleaseOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockReleaseOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/events": {
      "delete": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Delete lock events",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/restart": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Restart lock",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/link": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Link a lock to a gateway",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock link options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockLinkOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockLinkOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockLinkOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockLinkOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/unlink": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Unlink a lock from a gateway",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Lock"
                    },
                    {
                      "$ref": "#/components/schemas/LockInfo"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/enter-service-mode": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Enter service mode (UZMTK only)",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Enter service mode options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnterServiceModeOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnterServiceModeOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnterServiceModeOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnterServiceModeOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/classify-power-interruption": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Classify power interruption",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Classify power interruption options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyPowerInterruptionOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyPowerInterruptionOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyPowerInterruptionOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClassifyPowerInterruptionOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/firmware-updates/latest": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Get latest lock firmware update",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirmwareUpdate"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/locks/{lockId}/firmware-updates/{firmwareUpdateId}/start": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/locks"
        ],
        "summary": "Start lock firmware update",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "firmwareUpdateId",
            "in": "path",
            "description": "Firmware update ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/permissions": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Get permissions",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "LockIds",
            "in": "query",
            "description": "Lock IDs  (i.e. ?lockIds=1&lockIds=2)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "LockId",
            "in": "query",
            "description": "OBSOLETE: Use property LockIds instead",
            "schema": {
              "type": "integer",
              "format": "int32",
              "deprecated": true
            }
          },
          {
            "name": "UserIds",
            "in": "query",
            "description": "User IDs  (i.e. ?userIds=1&userIds=2)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "OBSOLETE: Use property UserIds instead",
            "schema": {
              "type": "integer",
              "format": "int32",
              "deprecated": true
            }
          },
          {
            "name": "UserTypes",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/UserType"
              }
            }
          },
          {
            "name": "PermissionStatus",
            "in": "query",
            "description": "Permission status (i.e. ?permissionStatus=GrantPending&permissionStatus=RevokePending)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PermissionStatus"
              }
            }
          },
          {
            "name": "IsSynced",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IsNotificationsEnabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/permissions/compatibility": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Get permissions compatibility",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "LockIds",
            "in": "query",
            "description": "Lock IDs  (i.e. ?lockIds=1&lockIds=2)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "UserIds",
            "in": "query",
            "description": "User IDs  (i.e. ?userIds=1&userIds=2)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PermissionsCompatibility"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/permissions/{lockId}/{userId}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Grant permission",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock permission grant options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionGrantOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionGrantOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionGrantOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionGrantOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Revoke permission",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/permissions/{lockId}/{userId}/device-permissions/reset-sync-retry-counters": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Reset device permission sync retry counters",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/permissions/{lockId}/{userId}/notifications/{areEnabled}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/permissions"
        ],
        "summary": "Enable or disable permission notifications",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "areEnabled",
            "in": "path",
            "description": "Notification are enabled",
            "required": true,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Permission"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Add user",
        "description": "This endpoint has to be enabled before it can be used. <a href=\"mailto:support@kleverkey.com\">Contact\r\nsupport</a> for more information.",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "User creation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Get users",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UserTypes",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/UserType"
              }
            }
          },
          {
            "name": "HasRoles",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "HasPermissions",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "$ref": "#/components/schemas/UserListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/{userId}": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Get user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Remove user from organization",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/{userId}/smart-cards/{deviceId}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Assign a smart card to a user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card assignment options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Remove a smart card from a user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/{userId}/devices": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Get devices of a user",
        "description": "Devices that aren't owned by an organization administrated by the requester are redacted",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/managed": {
      "post": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Add managed user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Managed user object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/managed/{userId}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Update managed user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Managed user object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedModification"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedModification"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedModification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserManagedModification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Delete managed user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/users/managed/{userId}/smart-cards/{deviceId}": {
      "put": {
        "tags": [
          "/organizations/{organizationId}/users"
        ],
        "summary": "Assign a smart card to a managed user",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Smart card assignment options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardAssignmentOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/webhooks": {
      "get": {
        "tags": [
          "/organizations/{organizationId}/webhooks"
        ],
        "summary": "Get webhooks",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "/organizations/{organizationId}/webhooks"
        ],
        "summary": "Add webhook",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Webhook object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/webhooks/{webhookId}": {
      "patch": {
        "tags": [
          "/organizations/{organizationId}/webhooks"
        ],
        "summary": "Update webhook partially",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock patch operations (paths: /name, /requestMethod, /requestUrl, /eventTypes, /isDisabled)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/organizations/{organizationId}/webhooks"
        ],
        "summary": "Delete webhook",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users": {
      "post": {
        "tags": [
          "/users"
        ],
        "summary": "OBSOLETE: Use POST organizations/{organizationId}/users instead",
        "requestBody": {
          "description": "User creation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "deprecated": true,
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/find": {
      "get": {
        "tags": [
          "/users"
        ],
        "summary": "Find users",
        "parameters": [
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string (currently only email address allowed)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me": {
      "get": {
        "tags": [
          "/users/me"
        ],
        "summary": "Load the current user",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/users/me"
        ],
        "summary": "Update the current user partially",
        "requestBody": {
          "description": "User patch operations (paths: /firstName, /lastName, /image)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/password": {
      "put": {
        "tags": [
          "/users/me"
        ],
        "summary": "Update password of the current user",
        "requestBody": {
          "description": "User password object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserPassword"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPassword"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPassword"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserPassword"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/email": {
      "put": {
        "tags": [
          "/users/me"
        ],
        "summary": "Change email address of the current user",
        "description": "This request will send an confirmation email to the current user",
        "requestBody": {
          "description": "User email object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserEmail"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserEmail"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserEmail"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/api-keys": {
      "post": {
        "tags": [
          "/users/me"
        ],
        "summary": "Create API key for the current user",
        "requestBody": {
          "description": "User API key object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UserApiKeyCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserApiKeyCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UserApiKeyCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UserApiKeyCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "/users/me"
        ],
        "summary": "Get API keys of the current user",
        "parameters": [
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserApiKeyListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/api-keys/{id}": {
      "delete": {
        "tags": [
          "/users/me"
        ],
        "summary": "Delete API key of the current user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/logins": {
      "get": {
        "tags": [
          "/users/me"
        ],
        "summary": "Get user logins",
        "parameters": [
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserLoginListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/logins/{id}/confirm": {
      "put": {
        "tags": [
          "/users/me"
        ],
        "summary": "Confirm uncommon login",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/support/ticket": {
      "post": {
        "tags": [
          "/users/me"
        ],
        "summary": "Create support ticket by the current user",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/SupportTicket"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportTicket"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportTicket"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SupportTicket"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/app/feedback": {
      "post": {
        "tags": [
          "/users/me"
        ],
        "summary": "Send feedback by the current user",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Feedback"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Feedback"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Feedback"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Feedback"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices": {
      "get": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Get devices of the current user",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/{id}": {
      "get": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Get device of the current user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Delete device of the current user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smartphones": {
      "post": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Add smartphone for the current user",
        "requestBody": {
          "description": "Device object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartphoneCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartphoneCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartphoneCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartphoneCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smartphones/{id}": {
      "patch": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Update smartphone of the current user partially",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Device patch operations (paths: /publicKey, /manufacturer, /model, /name, /appVersion, /operatingSystemVersion, /pushMessagingToken)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smartphones/{id}/latest-update": {
      "get": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Get app update information for specified smartphone",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppUpdateInformation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smartphones/{id}/lock-user-key/{lockId}": {
      "get": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Get smartphone lock user key of the current user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lockId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LockUserKey"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smart-cards/generic": {
      "post": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Add generic smart card for the current user",
        "requestBody": {
          "description": "Smart card object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardGenericCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/devices/smart-cards/swisspass": {
      "post": {
        "tags": [
          "/users/me/devices"
        ],
        "summary": "Add SwissPass for the current user",
        "requestBody": {
          "description": "SwissPass object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardSwissPassCreation"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardSwissPassCreation"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardSwissPassCreation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceSmartCardSwissPassCreation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/invitations": {
      "get": {
        "tags": [
          "/users/me/invitations"
        ],
        "summary": "Get invitations received by the current user",
        "parameters": [
          {
            "name": "InvitationTypes",
            "in": "query",
            "description": "Invitation types (i.e ?invitationTypes=UserSignUp&invitationTypes=OrganizationJoining)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InvitationType"
              }
            }
          },
          {
            "name": "InvitationStatuses",
            "in": "query",
            "description": "Invitation statuses (i.e ?invitationStatuses=Pending&invitationStatuses=Accepted)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/InvitationStatus"
              }
            }
          },
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/invitations/{id}": {
      "get": {
        "tags": [
          "/users/me/invitations"
        ],
        "summary": "Get invitation received by the current user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invitation ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invitation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      },
      "patch": {
        "tags": [
          "/users/me/invitations"
        ],
        "summary": "Update invitation received by the current user partially",
        "description": "Valid states\r\n\r\nAccepted = 2\r\n\r\nRejected = 3\r\n\r\n\r\nPatch body example:\r\n\r\n[{\"op\":\"replace\",\"path\":\"/status\",\"value\":\"Accepted\"}]",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invitation ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Invitation patch operations (paths: /status)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PatchOperation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/permissions": {
      "get": {
        "tags": [
          "/users/me/permissions"
        ],
        "summary": "Get permissions of the current user",
        "description": "Only permissions with status Active will be returned. Active means that the permission has been synced with\r\nthe lock.",
        "parameters": [
          {
            "name": "SearchString",
            "in": "query",
            "description": "Search string",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FromDateTime",
            "in": "query",
            "description": "From date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ToDateTime",
            "in": "query",
            "description": "To date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number of the paged request (default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Page size of the paged request (default 100, max. 100'000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/permissions/{lockId}": {
      "delete": {
        "tags": [
          "/users/me/permissions"
        ],
        "summary": "Delete permission of the current user",
        "parameters": [
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/permissions/{lockId}/activate": {
      "put": {
        "tags": [
          "/users/me/permissions"
        ],
        "summary": "Use permission to activate a lock remotely",
        "parameters": [
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Lock activation options",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationOptions"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationOptions"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationOptions"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LockActivationOptions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    },
    "/api/v1/users/me/permissions/{lockId}/properties": {
      "put": {
        "tags": [
          "/users/me/permissions"
        ],
        "summary": "Update permission properties of the current user",
        "parameters": [
          {
            "name": "lockId",
            "in": "path",
            "description": "Lock ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Permission properties object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionProperties"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionProperties"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionProperties"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionProperties"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not Found"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          },
          {
            "Bearer": [ ]
          },
          {
            "Identity.Application": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AccessGroup": {
        "required": [
          "dateCreated",
          "id",
          "locks",
          "name",
          "organizationId",
          "permissionOptions",
          "permissionType",
          "users"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "locks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Lock"
                },
                {
                  "$ref": "#/components/schemas/LockInfo"
                }
              ]
            }
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionOptions": {
            "$ref": "#/components/schemas/PermissionOptions"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AccessGroupCreationOrModification": {
        "required": [
          "lockIds",
          "name",
          "permissionType",
          "userIds"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "lockIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "userIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionOptions": {
            "$ref": "#/components/schemas/PermissionOptions"
          }
        },
        "additionalProperties": false
      },
      "AccessGroupListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessGroup"
            }
          }
        },
        "additionalProperties": false
      },
      "AppUpdateInformation": {
        "required": [
          "forceUpdate",
          "updateAvailable",
          "version"
        ],
        "type": "object",
        "properties": {
          "version": {
            "minLength": 1,
            "type": "string"
          },
          "updateAvailable": {
            "type": "boolean"
          },
          "forceUpdate": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Booking": {
        "type": "object",
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invitation"
            },
            "nullable": true
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "nullable": true
          },
          "lockActivationLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockActivationLink"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BookingOperationType": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "description": "1 = CreateOrUpdate, 2 = Delete",
        "format": "int32"
      },
      "BookingOptions": {
        "required": [
          "operationType",
          "permission"
        ],
        "type": "object",
        "properties": {
          "useLockActivationLinks": {
            "type": "boolean",
            "description": "Grants or revokes lock activation links (guest access) if true, else standard users with permissions/invitations will be used"
          },
          "user": {
            "$ref": "#/components/schemas/BookingUser"
          },
          "userReferenceId": {
            "type": "string",
            "description": "The user reference ID should be unique - it will be used to map a user when it's email address changes",
            "nullable": true
          },
          "userEmail": {
            "type": "string",
            "nullable": true
          },
          "userName": {
            "type": "string",
            "description": "The user name should be a first name and last name if available - it will only be used for lock activation links (guest access)",
            "nullable": true
          },
          "preventSending": {
            "type": "boolean",
            "description": "Prevents sending of emails or text messages for lock activation links (guest access)",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "The message appears in emails and on the web page that gets displayed for lock activation links (guest access)",
            "nullable": true
          },
          "operationType": {
            "$ref": "#/components/schemas/BookingOperationType"
          },
          "permission": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BookingPermissionAlways"
              },
              {
                "$ref": "#/components/schemas/BookingPermissionTimeSlot"
              },
              {
                "$ref": "#/components/schemas/BookingPermissionWeeklyItems"
              }
            ],
            "description": "The booking permission can be Always, TimeSlot or WeeklyItems"
          }
        },
        "additionalProperties": false,
        "description": "Booking options\r\n\r\n\r\n\r\nExample JSON:\r\n<pre>\r\n{\r\n    \"useLockActivationLinks\": true,\r\n    \"message\": \"Please use the main door to enter the building. Enjoy your stay.\",\r\n    \"userReferenceId\": \"user-reference-123\",\r\n    \"userEmail\": \"user@example.com\",\r\n    \"userName\": \"Test User\",\r\n    \"operationType\": 1,\r\n    \"permission\": {\r\n        \"$type\": \"Swissprime.KleverKey.ApiModels.v1.BookingPermissionTimeSlot, Swissprime.KleverKey.ApiModels\",\r\n        \"lockIds\": \"1,2,3\",\r\n        \"referenceId\": \"booking-reference-123\",\r\n        \"startDate\": \"2023-02-02T10:24:19.358Z\",\r\n        \"endDate\": \"2023-02-02T10:24:19.358Z\",\r\n        \"permissionOptions\": {\r\n            \"isRemoteActivationAllowed\": false,\r\n            \"areAllActivationModesAllowed\": false\r\n        }\r\n    }\r\n}\r\n</pre>"
      },
      "BookingPermission": {
        "required": [
          "lockIds",
          "referenceId"
        ],
        "type": "object",
        "properties": {
          "lockIds": {
            "minLength": 1,
            "type": "string",
            "description": "A comma separated list of lock IDs (e.g. 1,2,3)"
          },
          "referenceId": {
            "minLength": 1,
            "type": "string",
            "description": "The booking reference ID should be unique - it will be used to update or delete existing bookings"
          },
          "permissionOptions": {
            "$ref": "#/components/schemas/PermissionOptions"
          }
        },
        "additionalProperties": false
      },
      "BookingPermissionAlways": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BookingPermission"
          }
        ],
        "additionalProperties": false,
        "description": "Make sure the serialized object contains the property '$type': 'Swissprime.KleverKey.ApiModels.v1.BookingPermissionAlways, Swissprime.KleverKey.ApiModels'\r\n\r\n\r\nThis booking permission type grants a permission with the type Always\r\n\r\n\r\n\r\nExample JSON:\r\n<pre>\r\n{\r\n    \"$type\": \"Swissprime.KleverKey.ApiModels.v1.BookingPermissionAlways, Swissprime.KleverKey.ApiModels\",\r\n    \"lockIds\": \"1,2,3\",\r\n    \"referenceId\": \"booking-reference-123\",\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    }\r\n}\r\n</pre>"
      },
      "BookingPermissionTimeSlot": {
        "required": [
          "endDate",
          "startDate"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BookingPermission"
          }
        ],
        "properties": {
          "startDate": {
            "type": "string",
            "description": "Start date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "description": "End date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Make sure the serialized object contains the property '$type': 'Swissprime.KleverKey.ApiModels.v1.BookingPermissionTimeSlot, Swissprime.KleverKey.ApiModels'\r\n\r\n\r\nThis booking permission type grants a permission with the type TimeProfile and repetition type None\r\n\r\n\r\n\r\nExample JSON:\r\n<pre>\r\n{\r\n    \"$type\": \"Swissprime.KleverKey.ApiModels.v1.BookingPermissionTimeSlot, Swissprime.KleverKey.ApiModels\",\r\n    \"lockIds\": \"1,2,3\",\r\n    \"referenceId\": \"booking-reference-123\",\r\n    \"startDate\": \"2023-02-02T10:24:19.358Z\",\r\n    \"endDate\": \"2023-02-02T10:24:19.358Z\",\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    }\r\n}\r\n</pre>"
      },
      "BookingPermissionWeeklyItems": {
        "required": [
          "weeklyItems"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BookingPermission"
          }
        ],
        "properties": {
          "startDate": {
            "type": "string",
            "description": "Start date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "End date & time (ISO 8601 format in UTC, i.e. 2016-08-16T09:39:06.483Z)",
            "format": "date-time",
            "nullable": true
          },
          "weeklyItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionTimeProfileWeeklyItem"
            }
          }
        },
        "additionalProperties": false,
        "description": "Make sure the serialized object contains the property '$type': 'Swissprime.KleverKey.ApiModels.v1.BookingPermissionWeeklyItems, Swissprime.KleverKey.ApiModels'\r\n\r\n\r\nThis booking permission type grants a permission with the type TimeProfile and repetition type Weekly\r\n\r\n\r\n\r\nExample JSON:\r\n<pre>\r\n{\r\n    \"$type\": \"Swissprime.KleverKey.ApiModels.v1.BookingPermissionWeeklyItems, Swissprime.KleverKey.ApiModels\",\r\n    \"lockIds\": \"1,2,3\",\r\n    \"referenceId\": \"booking-reference-123\",\r\n    \"startDate\": \"2023-02-02T10:24:19.358Z\",\r\n    \"endDate\": \"2023-02-02T10:24:19.358Z\",\r\n    \"weeklyItems\": [{\r\n            \"dayOfWeek\": 2,\r\n            \"startTime\": 420,\r\n            \"endTime\": 840\r\n        }\r\n    ],\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    }\r\n}\r\n</pre>"
      },
      "BookingUser": {
        "required": [
          "email",
          "referenceId"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "OBSOLETE: Use user properties instead"
      },
      "ClassifyPowerInterruptionOptions": {
        "type": "object",
        "properties": {
          "eventId": {
            "type": "integer",
            "format": "int64"
          },
          "powerInterruptionReason": {
            "$ref": "#/components/schemas/PowerInterruptionReason"
          }
        },
        "additionalProperties": false
      },
      "Device": {
        "required": [
          "deviceHexId",
          "displayName",
          "id",
          "manufacturer",
          "model",
          "name",
          "status",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "deviceHexId": {
            "minLength": 1,
            "type": "string"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/DeviceType"
          },
          "status": {
            "$ref": "#/components/schemas/DeviceStatus"
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Device name as specified by the user"
          },
          "manufacturer": {
            "minLength": 1,
            "type": "string",
            "description": "Device manufacturer (e.g. Apple or Samsung)"
          },
          "model": {
            "minLength": 1,
            "type": "string",
            "description": "The technical model name (e.g. iPhone5,2 or SM-G800F)"
          },
          "modelMarketingName": {
            "type": "string",
            "description": "Marketing model name if there is one (e.g. iPhone 5 or Galaxy S5 mini)",
            "nullable": true
          },
          "appVersion": {
            "type": "string",
            "description": "KleverKey app version if Type == Smartphone",
            "nullable": true
          },
          "operatingSystem": {
            "$ref": "#/components/schemas/MobileOperatingSystem"
          },
          "operatingSystemVersion": {
            "type": "string",
            "description": "KleverKey app OS version if Type == Smartphone",
            "nullable": true
          },
          "smartCardType": {
            "$ref": "#/components/schemas/SmartCardType"
          },
          "smartCardAuthentication": {
            "$ref": "#/components/schemas/SmartCardAuthentication"
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "isSynced": {
            "type": "boolean",
            "description": "Device is synchronized with lock for all permissions"
          },
          "dateLastActivity": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeviceListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Device"
            }
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartCardAssignmentInvitationOptions": {
        "required": [
          "deviceId",
          "deviceName",
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int32"
          },
          "deviceId": {
            "type": "integer",
            "format": "int32"
          },
          "deviceName": {
            "minLength": 1,
            "type": "string"
          },
          "message": {
            "maxLength": 8000,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartCardAssignmentOptions": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartCardClaimOptions": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartCardGenericCreation": {
        "required": [
          "name",
          "uid"
        ],
        "type": "object",
        "properties": {
          "uid": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartCardSwissPassCreation": {
        "required": [
          "swissPassId",
          "swissPassZipCode"
        ],
        "type": "object",
        "properties": {
          "swissPassId": {
            "minLength": 1,
            "type": "string"
          },
          "swissPassZipCode": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeviceSmartphoneCreation": {
        "required": [
          "appVersion",
          "manufacturer",
          "model",
          "name",
          "operatingSystem",
          "operatingSystemVersion",
          "publicKey"
        ],
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "Header (1 byte, fixed 0x00), modulus (256 bytes) and exponent (3 bytes)",
            "format": "byte"
          },
          "pushMessagingTokenService": {
            "$ref": "#/components/schemas/PushMessagingService"
          },
          "pushMessagingToken": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "manufacturer": {
            "minLength": 1,
            "type": "string"
          },
          "model": {
            "minLength": 1,
            "type": "string"
          },
          "appVersion": {
            "minLength": 1,
            "type": "string"
          },
          "operatingSystem": {
            "$ref": "#/components/schemas/MobileOperatingSystem"
          },
          "operatingSystemVersion": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "DeviceStatus": {
        "enum": [
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "description": "1 = Unassigned, 2 = AdditionPending, 3 = Added, 4 = RemovalPending, 5 = Removed",
        "format": "int32"
      },
      "DeviceType": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "1 = Browser, 2 = Smartphone, 3 = SmartCard",
        "format": "int32"
      },
      "DiscoveredPeripheral": {
        "required": [
          "bleRssi",
          "hardwareType",
          "numberOfAdvertisements",
          "peripheralHexId"
        ],
        "type": "object",
        "properties": {
          "hardwareType": {
            "$ref": "#/components/schemas/HardwareType"
          },
          "peripheralHexId": {
            "minLength": 1,
            "type": "string"
          },
          "bleRssi": {
            "type": "integer",
            "format": "int32"
          },
          "numberOfAdvertisements": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DiscoveredPeripheralListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveredPeripheral"
            }
          }
        },
        "additionalProperties": false
      },
      "EnterServiceModeOptions": {
        "required": [
          "lockServiceMode"
        ],
        "type": "object",
        "properties": {
          "lockServiceMode": {
            "$ref": "#/components/schemas/LockServiceMode"
          }
        },
        "additionalProperties": false
      },
      "Event": {
        "required": [
          "data",
          "dateCreated",
          "dateRaised",
          "eventType",
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "eventType": {
            "$ref": "#/components/schemas/EventType"
          },
          "data": {
            "$ref": "#/components/schemas/EventLogData"
          },
          "dateCreated": {
            "type": "string",
            "description": "Date when the event was stored",
            "format": "date-time"
          },
          "dateRaised": {
            "type": "string",
            "description": "Date when the event was raised",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EventListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          }
        },
        "additionalProperties": false
      },
      "EventLogData": {
        "type": "object",
        "properties": {
          "dateRaised": {
            "type": "string",
            "format": "date-time"
          },
          "fullSerializationEnabled": {
            "type": "boolean"
          },
          "storingDisabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EventType": {
        "enum": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45,
          46,
          47,
          48,
          49,
          50,
          51,
          52,
          53,
          54,
          55,
          56,
          57,
          58,
          59
        ],
        "type": "integer",
        "description": "1 = LockBatteryLow, 2 = LockClaimed, 3 = LockActivity, 4 = LockConnected, 5 = LockDisconnected, 6 = PermissionGranted, 7 = PermissionRevoked, 8 = GatewayConnected, 9 = GatewayDisconnected, 10 = UserRolesUpdated, 11 = DeviceDeleted, 12 = LockUpdated, 13 = GatewayUpdated, 14 = LockActivationLinkUsage, 15 = DeviceCreated, 16 = SubscriptionBought, 17 = LockProduced, 18 = GatewayProduced, 19 = DeviceProduced, 20 = DeviceClaimed, 21 = SubscriptionPaymentFailed, 22 = PermissionGrantedPending, 23 = DeviceUpdated, 24 = UserPasswordResetRequested, 25 = UserPasswordReset, 26 = UserPasswordUpdated, 27 = PermissionRevokedPending, 28 = UserEmailUpdateRequested, 29 = UserEmailUpdated, 30 = UserEmailConfirmed, 31 = SubscriptionCreditCardExpiring, 32 = GatewayClaimed, 33 = AccessGroupCreated, 34 = AccessGroupUpdated, 35 = DeviceCreatedPending, 36 = DeviceDeletedPending, 37 = UserInvitationAccepted, 38 = LockPowerInterruption, 39 = SubscriptionPaymentDisputeCreated, 40 = SubscriptionPaymentDisputeClosed, 41 = SubscriptionPaymentSucceeded, 42 = GatewayFirmwareUpdateStarted, 43 = GatewayFirmwareUpdateSucceeded, 44 = GatewayFirmwareUpdateFailed, 45 = LockFirmwareUpdateStarted, 46 = LockFirmwareUpdateSucceeded, 47 = LockFirmwareUpdateFailed, 48 = LockServiceModeEntered, 49 = SubscriptionCanceled, 50 = WebhookAutomaticallyDisabled, 51 = UserUncommonLoginDetected, 52 = LockReleased, 53 = GatewayReleased, 54 = DeviceReleased, 55 = UserEmailChanged, 56 = PermissionNotSynced, 57 = AccessGroupUserAdded, 58 = AccessGroupUserRemoved, 59 = BatteryChangeRecommended",
        "format": "int32"
      },
      "Feedback": {
        "required": [
          "context",
          "text"
        ],
        "type": "object",
        "properties": {
          "context": {
            "minLength": 1,
            "type": "string"
          },
          "text": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FirmwareUpdate": {
        "required": [
          "firmwareVersion",
          "id",
          "releaseNotes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "firmwareVersion": {
            "type": "integer",
            "format": "int32"
          },
          "releaseNotes": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "FirmwareUpdateState": {
        "enum": [
          0,
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "0 = Idle, 1 = Scheduled, 2 = Started, 3 = Finished, 4 = Failed",
        "format": "int32"
      },
      "Gateway": {
        "required": [
          "displayName",
          "firmwareVersion",
          "gatewayHexId",
          "id",
          "name",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "gatewayHexId": {
            "minLength": 1,
            "type": "string"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/GatewayType"
          },
          "firmwareVersion": {
            "type": "integer",
            "format": "int32"
          },
          "isFirmwareUpdateAvailable": {
            "type": "boolean",
            "description": "Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "nullable": true
          },
          "hasLatestFirmware": {
            "type": "boolean",
            "description": "Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "nullable": true
          },
          "firmwareUpdateState": {
            "$ref": "#/components/schemas/FirmwareUpdateState"
          },
          "firmwareUpdatePreviousVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateDateScheduled": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateDateStarted": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateProgressInPercent": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateDateFinished": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateDateFailed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateErrorCode": {
            "type": "string",
            "nullable": true
          },
          "restartDateScheduled": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "wifiRssi": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "wifiRssiUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isConnected": {
            "type": "boolean",
            "nullable": true
          },
          "dateConnected": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateDisconnected": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateLastActivity": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GatewayClaimOptions": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "GatewayInfo": {
        "required": [
          "isAdmin",
          "isClaimed"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Gateway"
          }
        ],
        "properties": {
          "firmwareVersion": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "isFirmwareUpdateAvailable": {
            "type": "boolean",
            "description": "Only set, if IsAdmin is true",
            "nullable": true
          },
          "hardwareVersion": {
            "$ref": "#/components/schemas/HardwareVersion"
          },
          "productionLotYear": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "productionLotCalendarWeek": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "isAdmin": {
            "type": "boolean"
          },
          "isClaimed": {
            "type": "boolean",
            "description": "The gateway is claimed by an organization"
          }
        },
        "additionalProperties": false
      },
      "GatewayListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Gateway"
                },
                {
                  "$ref": "#/components/schemas/GatewayInfo"
                }
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "GatewayReleaseOptions": {
        "type": "object",
        "properties": {
          "forceRelease": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GatewayType": {
        "enum": [
          1
        ],
        "type": "integer",
        "description": "1 = Wifi",
        "format": "int32"
      },
      "HardwareType": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "description": "1 = Gateway, 2 = Lock",
        "format": "int32"
      },
      "HardwareVersion": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "1 = V1, 2 = V2, 3 = V3",
        "format": "int32"
      },
      "Invitation": {
        "required": [
          "data",
          "dateCreated",
          "id",
          "organization",
          "status",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "$ref": "#/components/schemas/InvitationType"
          },
          "status": {
            "$ref": "#/components/schemas/InvitationStatus"
          },
          "data": {
            "$ref": "#/components/schemas/InvitationData"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "receiverEmail": {
            "type": "string",
            "nullable": true
          },
          "receiver": {
            "$ref": "#/components/schemas/User"
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          }
        },
        "additionalProperties": false
      },
      "InvitationData": {
        "required": [
          "senderDisplayName",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/InvitationType"
          },
          "senderDisplayName": {
            "minLength": 1,
            "type": "string"
          },
          "senderOrganizationName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "InvitationListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invitation"
            }
          }
        },
        "additionalProperties": false
      },
      "InvitationStatus": {
        "enum": [
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "1 = Pending, 2 = Accepted, 3 = Rejected, 4 = Canceled",
        "format": "int32"
      },
      "InvitationType": {
        "enum": [
          1,
          3
        ],
        "type": "integer",
        "description": "1 = UserOrganizationJoining, 3 = SmartCardAssignment",
        "format": "int32"
      },
      "Location": {
        "required": [
          "accuracy",
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "accuracy": {
            "type": "number",
            "description": "Accuracy in meters",
            "format": "float"
          }
        },
        "additionalProperties": false
      },
      "Lock": {
        "required": [
          "bleInterfaceVersion",
          "displayName",
          "firmwareVersion",
          "hardwareConfigurationOutside",
          "id",
          "imageId",
          "keyVersion",
          "lockHexId",
          "name",
          "openCloseWaitTime",
          "physicalState",
          "properties",
          "smartCardAuthentication",
          "state",
          "timezone",
          "type",
          "wirelessModes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "lockHexId": {
            "minLength": 1,
            "type": "string"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "gatewayId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "imageId": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "$ref": "#/components/schemas/LockType"
          },
          "physicalState": {
            "$ref": "#/components/schemas/LockPhysicalState"
          },
          "properties": {
            "$ref": "#/components/schemas/LockProperties"
          },
          "wirelessModes": {
            "$ref": "#/components/schemas/LockWirelessModes"
          },
          "bleInterfaceVersion": {
            "type": "integer",
            "format": "int32"
          },
          "openCloseWaitTime": {
            "type": "integer",
            "format": "int32"
          },
          "state": {
            "$ref": "#/components/schemas/LockState"
          },
          "keyVersion": {
            "type": "integer",
            "format": "int32"
          },
          "firmwareVersion": {
            "type": "integer",
            "format": "int32"
          },
          "manufacturerFirmwareVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isFirmwareUpdateAvailable": {
            "type": "boolean",
            "description": "Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "nullable": true
          },
          "hasLatestFirmware": {
            "type": "boolean",
            "description": "Only populated if requested with the query string parameter includeFirmwareUpdateInformation=true or for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "nullable": true
          },
          "firmwareUpdateState": {
            "$ref": "#/components/schemas/FirmwareUpdateState"
          },
          "firmwareUpdatePreviousVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateVersion": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateDateScheduled": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateDateStarted": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateProgressInPercent": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "firmwareUpdateDateFinished": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateDateFailed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "firmwareUpdateErrorCode": {
            "type": "string",
            "nullable": true
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "devicePermissionsCount": {
            "type": "integer",
            "description": "Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "format": "int32",
            "nullable": true
          },
          "areDevicePermissionSynced": {
            "type": "boolean",
            "description": "Only populated for requests to the API endpoint /organizations/{organizationId}/hardware/tree",
            "nullable": true
          },
          "accessGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessGroup"
            },
            "description": "Only populated for requests to the API endpoint /organizations/{organizationId}/permissions",
            "nullable": true
          },
          "hasLocationData": {
            "type": "boolean"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "timezone": {
            "minLength": 1,
            "type": "string"
          },
          "timerConfiguration": {
            "$ref": "#/components/schemas/TimerConfiguration"
          },
          "smartCardAuthentication": {
            "$ref": "#/components/schemas/SmartCardAuthentication"
          },
          "hardwareConfigurationOutside": {
            "$ref": "#/components/schemas/LockHardwareConfigurationOutside"
          },
          "hardwareConfigurationSelfLockingPanicLock": {
            "type": "boolean"
          },
          "powerSource": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "powerSourceUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "flashUsage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dieTemperature": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bleRssi": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bleRssiUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isConnected": {
            "type": "boolean",
            "nullable": true
          },
          "dateBatteryChanged": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateConnected": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateDisconnected": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateLastActivity": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "weeklyOpeningCount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "batteryChangeRecommended": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LockActivationLink": {
        "required": [
          "dateCreated",
          "id",
          "locks",
          "message",
          "permissionType",
          "receiverEmailOrPhoneNumber",
          "receiverName",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "referenceId": {
            "type": "string",
            "nullable": true
          },
          "locks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Lock"
                },
                {
                  "$ref": "#/components/schemas/LockInfo"
                }
              ]
            }
          },
          "receiverName": {
            "minLength": 1,
            "type": "string"
          },
          "receiverEmailOrPhoneNumber": {
            "minLength": 1,
            "type": "string"
          },
          "message": {
            "minLength": 1,
            "type": "string"
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "url": {
            "minLength": 1,
            "type": "string"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LockActivationLinkCreation": {
        "required": [
          "lockIds",
          "permissionType",
          "receiverEmailOrPhoneNumber",
          "receiverName"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "maxLength": 256,
            "type": "string",
            "nullable": true
          },
          "lockIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "receiverName": {
            "minLength": 1,
            "type": "string"
          },
          "receiverEmailOrPhoneNumber": {
            "minLength": 1,
            "type": "string"
          },
          "deliveryType": {
            "$ref": "#/components/schemas/LockActivationLinkDeliveryType"
          },
          "sendBeforeInHours": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "message": {
            "maxLength": 8000,
            "type": "string",
            "nullable": true
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          }
        },
        "additionalProperties": false
      },
      "LockActivationLinkDeliveryType": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "0 = None, 1 = Now, 2 = Delayed",
        "format": "int32"
      },
      "LockActivationLinkListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockActivationLink"
            }
          }
        },
        "additionalProperties": false
      },
      "LockActivationLinkModification": {
        "required": [
          "lockIds",
          "message",
          "permissionType"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "maxLength": 256,
            "type": "string",
            "nullable": true
          },
          "lockIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "deliveryType": {
            "$ref": "#/components/schemas/LockActivationLinkDeliveryType"
          },
          "sendBeforeInHours": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "message": {
            "maxLength": 8000,
            "minLength": 1,
            "type": "string"
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          }
        },
        "additionalProperties": false
      },
      "LockActivationLinkUser": {
        "type": "object",
        "properties": {
          "receiverName": {
            "type": "string",
            "nullable": true
          },
          "receiverEmailOrPhoneNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LockActivationLinkUserListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockActivationLinkUser"
            }
          }
        },
        "additionalProperties": false
      },
      "LockActivationMode": {
        "enum": [
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "1 = OpenClose, 2 = Toggle, 3 = Open, 4 = Close",
        "format": "int32"
      },
      "LockActivationOptions": {
        "required": [
          "lockActivationMode"
        ],
        "type": "object",
        "properties": {
          "lockActivationMode": {
            "$ref": "#/components/schemas/LockActivationMode"
          },
          "deviceId": {
            "type": "integer",
            "description": "The ID of the device that activated the lock - if null falls back to the Browser device",
            "format": "int32",
            "nullable": true
          },
          "skipLockConfirmation": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LockClaimOptions": {
        "required": [
          "name",
          "timezone"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "type": "string"
          },
          "timezone": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "LockHardwareConfigurationOutside": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "0 = None, 1 = Knob, 2 = PullBar, 3 = Handle",
        "format": "int32"
      },
      "LockInfo": {
        "required": [
          "arePermissionsSynced",
          "isAdmin",
          "isClaimed"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Lock"
          }
        ],
        "properties": {
          "firmwareVersion": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "isFirmwareUpdateAvailable": {
            "type": "boolean",
            "description": "Only set, if IsAdmin is true",
            "nullable": true
          },
          "hardwareVersion": {
            "$ref": "#/components/schemas/HardwareVersion"
          },
          "productionLotYear": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "productionLotCalendarWeek": {
            "type": "integer",
            "description": "Only set, if IsAdmin is true",
            "format": "int32",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "dateLastActivity": {
            "type": "string",
            "description": "Only set, if IsAdmin is true",
            "format": "date-time",
            "nullable": true
          },
          "arePermissionsSynced": {
            "type": "boolean",
            "description": "Only set, if IsAdmin is true"
          },
          "isAdmin": {
            "type": "boolean"
          },
          "isClaimed": {
            "type": "boolean",
            "description": "The lock is claimed by an organization"
          }
        },
        "additionalProperties": false
      },
      "LockLinkOptions": {
        "required": [
          "gatewayId"
        ],
        "type": "object",
        "properties": {
          "gatewayId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "LockListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Lock"
                },
                {
                  "$ref": "#/components/schemas/LockInfo"
                }
              ]
            }
          }
        },
        "additionalProperties": false
      },
      "LockPermissionGrantOptions": {
        "required": [
          "lockId",
          "permissionType"
        ],
        "type": "object",
        "properties": {
          "lockId": {
            "type": "integer",
            "format": "int32"
          },
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionOptions": {
            "$ref": "#/components/schemas/PermissionOptions"
          }
        },
        "additionalProperties": false
      },
      "LockPhysicalState": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "0 = Unknown, 1 = Open, 2 = Closed, 3 = Locked",
        "format": "int32"
      },
      "LockProperties": {
        "enum": [
          0
        ],
        "type": "integer",
        "description": "0 = None",
        "format": "int32"
      },
      "LockReleaseOptions": {
        "type": "object",
        "properties": {
          "forceRelease": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LockServiceMode": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "1 = BatteryChangePosition, 2 = DisassemblePosition, 3 = ProgrammingMode",
        "format": "int32"
      },
      "LockState": {
        "enum": [
          0,
          1,
          2,
          4,
          8,
          16,
          32
        ],
        "type": "integer",
        "description": "0 = Undefined, 1 = BatteryLow, 2 = Emergency, 4 = Closed, 8 = Open, 16 = RtcUpdateRequired, 32 = EventAvailable",
        "format": "int32"
      },
      "LockType": {
        "enum": [
          1,
          17,
          18,
          19,
          20,
          255
        ],
        "type": "integer",
        "description": "1 = LockB1, 17 = UZEDH, 18 = UZMTK, 19 = UZRDR, 20 = AutecReader, 255 = Development",
        "format": "int32"
      },
      "LockUserKey": {
        "required": [
          "key",
          "keyVersion"
        ],
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "format": "byte"
          },
          "keyVersion": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "LockWirelessModes": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "0 = None, 1 = BLE, 2 = RFID",
        "format": "int32"
      },
      "MobileOperatingSystem": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "0 = None, 1 = Android, 2 = iOS",
        "format": "int32"
      },
      "Organization": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "OrganizationCreation": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "OrganizationJoiningInvitationOptions": {
        "required": [
          "organizationId",
          "roleId",
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int32"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32"
          },
          "roleId": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PatchOp": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "0 = Add, 1 = Remove, 2 = Replace",
        "format": "int32"
      },
      "PatchOperation": {
        "required": [
          "op",
          "path"
        ],
        "type": "object",
        "properties": {
          "op": {
            "$ref": "#/components/schemas/PatchOp"
          },
          "path": {
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Permission": {
        "required": [
          "dateCreated",
          "displayName",
          "id",
          "isNotificationEnabled",
          "lock",
          "permissionStatus",
          "user"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "lock": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Lock"
              },
              {
                "$ref": "#/components/schemas/LockInfo"
              }
            ]
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "permissionTypeSet": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTypeRequested": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfileSet": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionTimeProfileRequested": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionOptionsSet": {
            "$ref": "#/components/schemas/PermissionOptions"
          },
          "permissionOptionsRequested": {
            "$ref": "#/components/schemas/PermissionOptions"
          },
          "permissionStatus": {
            "$ref": "#/components/schemas/PermissionStatus"
          },
          "lockName": {
            "type": "string",
            "description": "User defined custom name of the lock",
            "nullable": true
          },
          "isNotificationEnabled": {
            "type": "boolean",
            "description": "Notifications (e.g. activities) are activated"
          },
          "isSynced": {
            "type": "boolean",
            "description": "Permission is synchronized with lock for all devices"
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateGranted": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PermissionGrantOptions": {
        "required": [
          "permissionType"
        ],
        "type": "object",
        "properties": {
          "permissionType": {
            "$ref": "#/components/schemas/PermissionType"
          },
          "permissionTimeProfile": {
            "$ref": "#/components/schemas/PermissionTimeProfile"
          },
          "permissionOptions": {
            "$ref": "#/components/schemas/PermissionOptions"
          },
          "deferredSynchronizing": {
            "type": "boolean",
            "description": "Defer synchronizing of the permission until the synchronizing job runs (currently every 5th minute)"
          }
        },
        "additionalProperties": false,
        "description": "Permission with type Always or TimeProfile\r\n\r\n\r\n\r\nExample JSON (Always 24/7 permission):\r\n<pre>\r\n{\r\n    \"permissionType\": 1,\r\n    \"permissionTimeProfile\": null,\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    },\r\n    \"deferredSynchronizing\": false\r\n}\r\n</pre>\r\nExample JSON (Non-repeating time profile with list of time slots):\r\n<pre>\r\n{\r\n    \"permissionType\": 2,\r\n    \"permissionTimeProfile\": {\r\n        \"repetitionType\": 0,\r\n        \"items\": [{\r\n                \"startDate\": \"2023-02-08T10:00:00\",\r\n                \"endDate\": \"2023-02-08T16:00:00\",\r\n                \"referenceId\": \"booking-reference-123\" // optional\r\n            },{\r\n                \"startDate\": \"2023-04-02T10:00:00\",\r\n                \"endDate\": \"2023-04-05T16:00:00\",\r\n                \"referenceId\": \"booking-reference-456\" // optional\r\n            }\r\n        ]\r\n    },\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    },\r\n    \"deferredSynchronizing\": false\r\n}\r\n</pre>\r\nExample JSON (Weekly repeating time profile with start and end date):\r\n<pre>\r\n{\r\n    \"permissionType\": 2,\r\n    \"permissionTimeProfile\": {\r\n        \"startDate\": \"2023-02-08T10:00:00\", // optional\r\n        \"endDate\": \"2023-02-08T16:00:00\", // optional\r\n        \"repetitionType\": 1,\r\n        \"weeklyItems\": [{\r\n            \"dayOfWeek\": 1,\r\n                \"startTime\": 420,\r\n                \"endTime\": 840\r\n            },{\r\n            \"dayOfWeek\": 3,\r\n                \"startTime\": 420,\r\n                \"endTime\": 840\r\n            }\r\n        ]\r\n    },\r\n    \"permissionOptions\": {\r\n        \"isRemoteActivationAllowed\": false,\r\n        \"areAllActivationModesAllowed\": false\r\n    },\r\n    \"deferredSynchronizing\": false\r\n}\r\n</pre>"
      },
      "PermissionListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          }
        },
        "additionalProperties": false
      },
      "PermissionOptions": {
        "type": "object",
        "properties": {
          "isRemoteActivationAllowed": {
            "type": "boolean",
            "description": "Allow a user to open and close locks with the web app (the activation doesn't use Bluetooth)"
          },
          "areAllActivationModesAllowed": {
            "type": "boolean",
            "description": "Allow a user to open and close locks also in office mode (locks stay open or closed after activation)"
          },
          "changedBy": {
            "type": "string",
            "description": "Indicate who changed access of user",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PermissionProperties": {
        "required": [
          "lockName"
        ],
        "type": "object",
        "properties": {
          "lockName": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PermissionStatus": {
        "enum": [
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "description": "1 = GrantPending, 2 = Active, 3 = RevokePending, 4 = Expired",
        "format": "int32"
      },
      "PermissionTimeProfile": {
        "required": [
          "repetitionType"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "description": "Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "description": "End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00), unrestricted if not set, applies only if RepetitionType != None",
            "format": "date-time",
            "nullable": true
          },
          "repetitionType": {
            "$ref": "#/components/schemas/RepetitionType"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionTimeProfileItem"
            },
            "description": "List of items, Required if RepetitionType == None",
            "nullable": true,
            "readOnly": true
          },
          "weeklyItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionTimeProfileWeeklyItem"
            },
            "description": "List of weekly items, Required if RepetitionType == Weekly",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PermissionTimeProfileItem": {
        "required": [
          "endDate",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "description": "Start date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "description": "End date in lock time zone, specified without time zone information (e.g. 2020-04-07T14:25:00)",
            "format": "date-time"
          },
          "referenceId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PermissionTimeProfileWeeklyItem": {
        "required": [
          "dayOfWeek",
          "endTime",
          "startTime"
        ],
        "type": "object",
        "properties": {
          "dayOfWeek": {
            "type": "integer",
            "description": "Day of week starting with Sunday\r\n(Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)",
            "format": "int32"
          },
          "startTime": {
            "type": "integer",
            "description": "Start time in minutes passed since midnight (local time in lock time zone)\r\ni.e. 00:00 => 0 or 10:00 => 600",
            "format": "int32"
          },
          "endTime": {
            "type": "integer",
            "description": "End time in minutes passed since midnight (local time in lock time zone)\r\ni.e. 15:00 => 900 or 00:00 => 1440",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PermissionType": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "description": "1 = Always, 2 = TimeProfile",
        "format": "int32"
      },
      "PermissionsCompatibility": {
        "type": "object",
        "properties": {
          "lock": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Lock"
              },
              {
                "$ref": "#/components/schemas/LockInfo"
              }
            ],
            "nullable": true
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "device": {
            "$ref": "#/components/schemas/Device"
          }
        },
        "additionalProperties": false
      },
      "PhoneNumberCheck": {
        "type": "object",
        "properties": {
          "isMobile": {
            "type": "boolean"
          },
          "isValidCountryCode": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PowerInterruptionReason": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "description": "0 = Unknown, 1 = BatteryChanged, 2 = BatteryReinserted",
        "format": "int32"
      },
      "PushMessagingService": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "description": "1 = APNS, 2 = FCM",
        "format": "int32"
      },
      "RepetitionType": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "description": "0 = None, 1 = Weekly",
        "format": "int32"
      },
      "Role": {
        "required": [
          "dateCreated",
          "displayName",
          "id",
          "isDefaultRole",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "isDefaultRole": {
            "type": "boolean"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          },
          "dateUpdated": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SmartCardAuthentication": {
        "enum": [
          0,
          1,
          2,
          32
        ],
        "type": "integer",
        "description": "0 = None, 1 = AuthenticationUid, 2 = AuthenticationSecured, 32 = RfidStandardIso14443A",
        "format": "int32"
      },
      "SmartCardType": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "1 = Generic, 2 = KleverKey, 3 = Swisspass",
        "format": "int32"
      },
      "SupportTicket": {
        "required": [
          "context",
          "text"
        ],
        "type": "object",
        "properties": {
          "context": {
            "minLength": 1,
            "type": "string"
          },
          "text": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "TimerConfiguration": {
        "type": "object",
        "properties": {
          "weeklyItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimerConfigurationWeeklyItem"
            },
            "nullable": true
          },
          "exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimerConfigurationException"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TimerConfigurationActivationType": {
        "enum": [
          3,
          4
        ],
        "type": "integer",
        "description": "3 = Open, 4 = Close",
        "format": "int32"
      },
      "TimerConfigurationException": {
        "required": [
          "numberOfDays",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "numberOfDays": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "TimerConfigurationWeeklyItem": {
        "required": [
          "activationType",
          "dayOfWeek",
          "time"
        ],
        "type": "object",
        "properties": {
          "dayOfWeek": {
            "type": "integer",
            "description": "Day of week starting with Sunday\r\n(Sunday => 0, Monday => 1, Tuesday => 2, Wednesday => 3, Thursday => 4, Friday => 5, Saturday => 6)",
            "format": "int32"
          },
          "time": {
            "type": "integer",
            "description": "Time in minutes passed since midnight (local time in lock time zone)\r\ni.e. 00:00 => 0 or 10:00 => 600",
            "format": "int32"
          },
          "activationType": {
            "$ref": "#/components/schemas/TimerConfigurationActivationType"
          }
        },
        "additionalProperties": false
      },
      "User": {
        "required": [
          "displayName",
          "email",
          "firstName",
          "id",
          "lastName",
          "roles",
          "type"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "organizationId": {
            "type": "integer",
            "description": "OBSOLETE: Returns one of the organizations that the user is member of - use OrganizationIds instead",
            "format": "int32",
            "nullable": true,
            "readOnly": true,
            "deprecated": true
          },
          "organizationIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "email": {
            "minLength": 1,
            "type": "string"
          },
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          },
          "cultureCode": {
            "type": "string",
            "nullable": true
          },
          "imageId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "displayName": {
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/UserType"
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            },
            "description": "Only populated if a single user has been requested"
          },
          "accessGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccessGroup"
            },
            "description": "Only populated for requests to the API endpoint /organizations/{organizationId}/permissions",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserApiKey": {
        "required": [
          "dateCreated",
          "description",
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "apiKey": {
            "type": "string",
            "description": "Only returned once after generation",
            "nullable": true
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UserApiKeyCreation": {
        "required": [
          "description"
        ],
        "type": "object",
        "properties": {
          "description": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UserApiKeyListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserApiKey"
            }
          }
        },
        "additionalProperties": false
      },
      "UserCreation": {
        "required": [
          "cultureCode",
          "email",
          "firstName",
          "lastName",
          "password"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string",
            "format": "email"
          },
          "password": {
            "minLength": 1,
            "pattern": "^((?=.*[A-Z])(?=.*[a-z])(?=.*[!-@[-`{-ž]).{8,})|(.{16})$",
            "type": "string",
            "description": "The password requires at least 8 characters and has to include at least one digit, one uppercase and one lowercase character"
          },
          "cultureCode": {
            "minLength": 1,
            "type": "string",
            "description": "Combination of an ISO 639 two-letter lowercase language code and an ISO 3166 two-letter uppercase country code\r\ni.e. de-CH or en-US"
          },
          "privacyPolicyAndTermsOfServiceAccepted": {
            "type": "boolean"
          },
          "newsletterRequested": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "UserEmail": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UserInvitationOptions": {
        "required": [
          "emailOrUserId"
        ],
        "type": "object",
        "properties": {
          "emailOrUserId": {
            "minLength": 1,
            "type": "string"
          },
          "message": {
            "maxLength": 8000,
            "type": "string",
            "nullable": true
          },
          "deviceSmartCardId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "deviceSmartCardName": {
            "type": "string",
            "nullable": true
          },
          "accessGroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The invited user will be added to the specified access groups",
            "nullable": true
          },
          "lockPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockPermissionGrantOptions"
            },
            "description": "The invited user will get the specified lock permission",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "description": "The invited user will get this role",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        },
        "additionalProperties": false
      },
      "UserLogin": {
        "required": [
          "dateCreated",
          "deviceType",
          "displayResolution",
          "isUncommon",
          "operatingSystem",
          "timezoneOffset"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "ipAddress": {
            "type": "string",
            "nullable": true
          },
          "locationLatitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "locationLongitude": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "locationCity": {
            "type": "string",
            "nullable": true
          },
          "displayResolution": {
            "minLength": 1,
            "type": "string"
          },
          "timezoneOffset": {
            "type": "number",
            "format": "float"
          },
          "operatingSystem": {
            "minLength": 1,
            "type": "string"
          },
          "deviceType": {
            "minLength": 1,
            "type": "string"
          },
          "isUncommon": {
            "type": "boolean"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UserLoginListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserLogin"
            }
          }
        },
        "additionalProperties": false
      },
      "UserManagedCreation": {
        "required": [
          "deviceSmartCardId",
          "deviceSmartCardName",
          "firstName",
          "lastName"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          },
          "deviceSmartCardId": {
            "type": "integer",
            "format": "int32"
          },
          "deviceSmartCardName": {
            "minLength": 1,
            "type": "string"
          },
          "accessGroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "lockPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockPermissionGrantOptions"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserManagedModification": {
        "required": [
          "firstName",
          "lastName"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UserPassword": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "password": {
            "minLength": 1,
            "pattern": "^((?=.*[A-Z])(?=.*[a-z])(?=.*[!-@[-`{-ž]).{8,})|(.{16})$",
            "type": "string",
            "description": "The minimum length of the password has to be 8 characters and it has to have at least one digit, one uppercase and one lowercase character"
          }
        },
        "additionalProperties": false
      },
      "UserSignUpInvitationOptions": {
        "required": [
          "email",
          "firstName",
          "lastName"
        ],
        "type": "object",
        "properties": {
          "email": {
            "minLength": 1,
            "type": "string"
          },
          "firstName": {
            "minLength": 1,
            "type": "string"
          },
          "lastName": {
            "minLength": 1,
            "type": "string"
          },
          "deviceSmartCardId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "deviceSmartCardName": {
            "type": "string",
            "nullable": true
          },
          "accessGroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "The invited user will be added to the specified access groups",
            "nullable": true
          },
          "lockPermissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LockPermissionGrantOptions"
            },
            "description": "The invited user will get the specified lock permission",
            "nullable": true
          },
          "organizationId": {
            "type": "integer",
            "description": "The invited user will join the specified organization",
            "format": "int32",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "description": "The invited user will get this role",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserType": {
        "enum": [
          1,
          2,
          3
        ],
        "type": "integer",
        "description": "1 = Standard, 2 = Managed, 3 = Service",
        "format": "int32"
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": {
          "type": "object",
          "nullable": true
        }
      },
      "Webhook": {
        "required": [
          "dateCreated",
          "eventTypes",
          "id",
          "isDisabled",
          "name",
          "organizationId",
          "requestMethod",
          "requestUrl"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "requestMethod": {
            "minLength": 1,
            "type": "string"
          },
          "requestUrl": {
            "minLength": 1,
            "type": "string"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "isDisabled": {
            "type": "boolean"
          },
          "organizationId": {
            "type": "integer",
            "format": "int32"
          },
          "dateCreated": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "WebhookCreation": {
        "required": [
          "eventTypes",
          "name",
          "requestMethod",
          "requestUrl"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "requestMethod": {
            "minLength": 1,
            "type": "string"
          },
          "requestUrl": {
            "minLength": 1,
            "type": "string"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          }
        },
        "additionalProperties": false
      },
      "WebhookListResponse": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Webhook"
            }
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Please enter your API key below like 'ApiKey &lt;APIKEY&gt;' and make sure that you are not signed into the KleverKey portal in the same browser.",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}