{
  "openapi": "3.0.4",
  "info": {
    "title": "Wemply API",
    "description": "### Authentication\nEvery request must have an **apiKey** header. Sending the key as an `apiKey` query parameter still works for\nkeys that allow it, but is deprecated: URLs end up in logs.\n\n**Errors.** A request that cannot be done is answered with 400 and an `ErrorResult`. Its `TraceId` identifies\nthe request in Wemply's logs. A missing or invalid API key is answered with 401 and the reason as plain text,\nand an unexpected error with 500 and a plain-text message holding a code for support.\n\n**Items and references.** Other items are referred to as `{ Id, Name, ExternalCode }`. `ExternalCode` is the\nitem's code in your own system, and many endpoints accept it in place of the ID.\n\n**Adding and editing.** `add` endpoints that create an item answer with the new item's ID. `edit` endpoints\nchange only the fields present in the request body: a field left out keeps its value. Sending `null` clears a\nfield that can be empty, and a field that cannot be empty keeps its value, unless the field's description says\notherwise. The item to edit is found by `Id`. Employees, working times and objects can instead be found by\n`ExternalCode` when `Id` is not given; with `Id`, their `ExternalCode` sets the item's new external code.\n\n**Reading by period or by modification.** `get` endpoints with `startDate` and `endDate` return the items in\nthat period, both dates included; the period may be at most 6 months long. `get` endpoints with `modifiedSince`\nreturn the items changed on or after that date, which must be within the last 3 months unless the endpoint says\notherwise; those with a period accept it in place of the period.\n\n**Following changes.** `changes` endpoints return what was added, changed or deleted since `modifiedSince`, a\ntimestamp within the last 3 months, in the order of `LastChangeTime`. A deleted item has `IsDeleted` true and no\n`Data`. Items that can be made inactive in Wemply, such as employees and objects, come with `IsInactive` true\nonce made inactive. Pass the last `LastChangeTime` you received as the next `modifiedSince`: items changed at\nthat exact moment come again.\n\n**Extra data.** `ExtraData` holds the company's own fields, keyed by each field's API ID as\n`v3/extraData/fields` lists them. A choice is given as the choice's ID or external code, and a file as the\nreference `v3/files/upload` returns. Like other fields, only the extra fields present in a request change.",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://api.wemply.com"
    }
  ],
  "paths": {
    "/v3/absences/get": {
      "get": {
        "tags": [
          "Absences"
        ],
        "description": "Lists the absences that overlap the period from `startDate` to `endDate`, or that changed since `modifiedSince`. With `modifiedSince`, the dates are optional and either one alone narrows the result. Declined absences are left out unless `modifiedSince` is the only filter given.",
        "operationId": "absences_get",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Absence"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/changes": {
      "get": {
        "tags": [
          "Absences"
        ],
        "description": "Lists the absences that changed or were deleted since `modifiedSince`.",
        "operationId": "absences_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbsenceChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/types": {
      "get": {
        "tags": [
          "Absences"
        ],
        "description": "Lists the active absence types, whose IDs are the `TypeId` values of absences.",
        "operationId": "absences_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AbsenceType"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/add": {
      "post": {
        "tags": [
          "Absences"
        ],
        "description": "Adds an absence and returns its ID.",
        "operationId": "absences_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewAbsence"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewAbsence"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/edit": {
      "post": {
        "tags": [
          "Absences"
        ],
        "description": "Changes an absence.",
        "operationId": "absences_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingAbsence"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingAbsence"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/delete": {
      "get": {
        "tags": [
          "Absences"
        ],
        "description": "Deletes an absence.",
        "operationId": "absences_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/absences/balances": {
      "get": {
        "tags": [
          "Absences"
        ],
        "description": "Lists vacation balances as of the given date: for each employee, one per absence type that counts a balance and that the employee is entitled to in that date's balance year. Without `employeeId`, covers the active employees whose balances the API key may view.",
        "operationId": "absences_balances",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "description": "The balances are as of the end of this day, and the annual entitlement is that of the balance year this day\nfalls in.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VacationBalance"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/compensations/get": {
      "get": {
        "tags": [
          "Compensations"
        ],
        "description": "Lists the compensations dated from `startDate` to `endDate`. Both dates are required; there is no `modifiedSince`. Declined compensations are left out.",
        "operationId": "compensations_get",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "objectId",
            "in": "query",
            "description": "Returns only the compensations of this object, from `v3/objects/get`.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Compensation"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/compensations/add": {
      "post": {
        "tags": [
          "Compensations"
        ],
        "description": "Adds a compensation and returns its ID. The compensation type's calculation method can override `Amount` and `Sum`: a type with a fixed rate keeps its own rate, a fixed-sum type its own sum, a calculated type computes the sum, and every sum-based type has `Amount` 1.",
        "operationId": "compensations_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompensation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewCompensation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/compensations/types": {
      "get": {
        "tags": [
          "Compensations"
        ],
        "description": "Lists the active compensation types, whose IDs are the `TypeId` values of compensations.",
        "operationId": "compensations_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CompensationType"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/decreasedWorkCapabilities/get": {
      "get": {
        "tags": [
          "Decreased Work Capabilities"
        ],
        "description": "Lists the decreased work capabilities of all employees, or of one employee.",
        "operationId": "decreasedWorkCapabilities_get",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DecreasedWorkCapability"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/get": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists employees, inactive ones included, with their groups, employment contracts and amendments. Without filters it returns every employee; filters given together must all match.",
        "operationId": "employees_get",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "identityCode",
            "in": "query",
            "description": "Exact match on the employee's personal identification code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalCode",
            "in": "query",
            "description": "Exact match on the employee's external code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "description": "Returns employees changed on or after the start of this day. Unlike other get endpoints, not limited to the\nlast 3 months.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeExtended"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/changes": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists employees changed or deleted since `modifiedSince`, inactive ones included, without the groups and contracts that `v3/employees/get` adds.",
        "operationId": "employees_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/add": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Adds an employee and returns its ID. When `DirectManagers` is given, the new employee is added as a direct subordinate of each of them.",
        "operationId": "employees_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmployee"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmployee"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/edit": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Changes an employee. `DirectSubordinates` and `DirectManagers` replace the current lists; see the fields for what is kept.",
        "operationId": "employees_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmployee"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmployee"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/delete": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Deletes an employee.",
        "operationId": "employees_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/employmentContracts": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists employment contracts, without their amendments (`v3/employees/get` includes them). Without filters it returns every contract; there is no period limit.",
        "operationId": "employees_employmentContracts",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "startFrom",
            "in": "query",
            "description": "Only contracts that start on or after this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "startUntil",
            "in": "query",
            "description": "Only contracts that start on or before this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmploymentContract"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/employmentContractsChanges": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists employment contracts changed or deleted since `modifiedSince`.",
        "operationId": "employees_employmentContractsChanges",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmploymentContractChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/addEmploymentContract": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Adds an employment contract and returns its ID. A job title that doesn't exist yet is created, which needs permission to edit job titles.",
        "operationId": "employees_addEmploymentContract",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmploymentContract"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmploymentContract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/editEmploymentContract": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Changes an employment contract. The contract is identified by `Id` only, not by external code. If both `HourlyRate` and `MonthlySalary` have a value, only `HourlyRate` is used. The contract type can't be changed.",
        "operationId": "employees_editEmploymentContract",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmploymentContract"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmploymentContract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/deleteEmploymentContract": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Deletes an employment contract.",
        "operationId": "employees_deleteEmploymentContract",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/employmentContractAmendmentsChanges": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists employment contract amendments changed or deleted since `modifiedSince`.",
        "operationId": "employees_employmentContractAmendmentsChanges",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmploymentContractAmendmentChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/addEmploymentContractAmendment": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Adds an amendment to an employment contract, in effect from `StartDate`. Fields left null keep the value in effect before the amendment. This endpoint can't change the contract's end date. Unlike other add endpoints, it returns no ID.",
        "operationId": "employees_addEmploymentContractAmendment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmploymentContractAmendment"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmploymentContractAmendment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/editEmploymentContractAmendment": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Changes an employment contract amendment. The amendment is identified by `ContractId` and `CurrentStartDate`, not by its ID or external code.",
        "operationId": "employees_editEmploymentContractAmendment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmploymentContractAmendment"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEmploymentContractAmendment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/deleteEmploymentContractAmendment": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Deletes an employment contract amendment.",
        "operationId": "employees_deleteEmploymentContractAmendment",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/groups": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists the active employee groups with their members.",
        "operationId": "employees_groups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeesGroup"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/addGroup": {
      "post": {
        "tags": [
          "Employees"
        ],
        "description": "Adds an employee group without members and returns its ID.",
        "operationId": "employees_addGroup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmployeesGroup"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewEmployeesGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/addEmployeeToGroup": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Adds an employee to a group as a direct member. Fails if the employee already is a direct member.",
        "operationId": "employees_addEmployeeToGroup",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/removeEmployeeFromGroup": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Removes an employee's direct membership of a group. Fails if the employee isn't a direct member; membership through a nested group or a subordinates rule can't be removed here.",
        "operationId": "employees_removeEmployeeFromGroup",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/permissionGroups": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists the permission groups, whose IDs are the values for an employee's `PermissionGroup`. `ExternalCode` is always null.",
        "operationId": "employees_permissionGroups",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/incomeTaxFreeMinimums": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Lists the employees' income tax-free minimum applications, all of them, without filters.",
        "operationId": "employees_incomeTaxFreeMinimums",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IncomeTaxFreeMinimum"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/employees/workInfo": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "Returns worked, expected and overtime hours per employee for the period. Both dates are required. Without `employeeId`, covers all active employees. Employees whose working times or absences the API key can't view are left out.",
        "operationId": "employees_workInfo",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeWorkInfo"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/get": {
      "get": {
        "tags": [
          "Events"
        ],
        "description": "Lists the events that overlap the period from the start of `startDate` to the end of `endDate`. Both dates are required; there is no `modifiedSince`.",
        "operationId": "events_get",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "description": "Returns only the events this employee owns or takes part in.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Returns only the events whose name contains this text, ignoring case.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Event"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/changes": {
      "get": {
        "tags": [
          "Events"
        ],
        "description": "Lists the events that changed or were deleted since `modifiedSince`.",
        "operationId": "events_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/add": {
      "post": {
        "tags": [
          "Events"
        ],
        "description": "Adds an event with a start and end time and returns its ID. All-day events cannot be added.",
        "operationId": "events_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEvent"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/edit": {
      "post": {
        "tags": [
          "Events"
        ],
        "description": "Changes an event.",
        "operationId": "events_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEvent"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/delete": {
      "get": {
        "tags": [
          "Events"
        ],
        "description": "Deletes an event.",
        "operationId": "events_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/resources": {
      "get": {
        "tags": [
          "Events"
        ],
        "description": "Lists the active resources that events can book.",
        "operationId": "events_resources",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/addResource": {
      "post": {
        "tags": [
          "Events"
        ],
        "description": "Adds a resource that events can book and returns its ID.",
        "operationId": "events_addResource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewResource"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/editResource": {
      "post": {
        "tags": [
          "Events"
        ],
        "description": "Changes a resource. A null or empty `Name` keeps the current name.",
        "operationId": "events_editResource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingResource"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingResource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/events/deleteResource": {
      "get": {
        "tags": [
          "Events"
        ],
        "description": "Deletes a resource.",
        "operationId": "events_deleteResource",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/get": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Returns the rows of an extra data table, the least recently modified first and at most 10,000 of them. Unlike other `get` endpoints this takes no period: without `employeeId` and `modifiedSince` it returns the whole table up to that limit, and `modifiedSince` may be any date. Inactive rows are left out.",
        "operationId": "extraData_get",
        "parameters": [
          {
            "name": "tableId",
            "in": "query",
            "description": "A table from `v3/extraData/tables`.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "description": "Only the rows of this employee.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "description": "Only the rows changed on or after this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtraData"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/changes": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Returns the rows of a table added, changed or deleted since `modifiedSince`. Inactive rows are left out, unless the table's rows can be made inactive in Wemply: then they come with `IsInactive` true.",
        "operationId": "extraData_changes",
        "parameters": [
          {
            "name": "tableId",
            "in": "query",
            "description": "A table from `v3/extraData/tables`.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtraDataChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/add": {
      "post": {
        "tags": [
          "Extra Data"
        ],
        "description": "Adds a row to a table.",
        "operationId": "extraData_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewExtraData"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewExtraData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/edit": {
      "post": {
        "tags": [
          "Extra Data"
        ],
        "description": "Changes a row of a table, found by `Id`.",
        "operationId": "extraData_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingExtraData"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingExtraData"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/delete": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Deletes a row of a table.",
        "operationId": "extraData_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/tables": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Lists the active extra data tables. An extra data table holds the company's own data, with extra fields as its columns: `v3/extraData/fields` lists them with the table's ID as `PlaceOfUse`. Depending on the table, a row belongs to an employee, to an object, to both or to neither.",
        "operationId": "extraData_tables",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/fields": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Lists the active extra fields that have an API ID and can be read through the API: those of employees, employment contracts and their amendments, employee groups, absences, compensations, working times, objects, events and extra data tables.",
        "operationId": "extraData_fields",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExtraField"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/choices": {
      "get": {
        "tags": [
          "Extra Data"
        ],
        "description": "Lists the choices of a choice or multiple choice field, inactive ones included.",
        "operationId": "extraData_choices",
        "parameters": [
          {
            "name": "field",
            "in": "query",
            "description": "The field's API ID, as `v3/extraData/fields` lists it.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Choice"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/addChoice": {
      "post": {
        "tags": [
          "Extra Data"
        ],
        "description": "Adds a choice to a choice or multiple choice field.",
        "operationId": "extraData_addChoice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewChoice"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewChoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/extraData/editChoice": {
      "post": {
        "tags": [
          "Extra Data"
        ],
        "description": "Changes a choice, found by `Id`. Choices cannot be deleted; make one inactive instead.",
        "operationId": "extraData_editChoice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingChoice"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingChoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/files/upload": {
      "post": {
        "tags": [
          "Files"
        ],
        "description": "Stores a file and returns its reference, which is the value to give a file field in `ExtraData` and the reference for `v3/files/download`.",
        "operationId": "files_upload",
        "parameters": [
          {
            "name": "fileName",
            "in": "query",
            "description": "The file's name with its extension. A download gets the file under this name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The file's bytes as the raw request body, with a Content-Length header. Any content type but multipart/form-data and application/x-www-form-urlencoded, which curl's --data-binary sends unless given another Content-Type header.",
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/files/download": {
      "get": {
        "tags": [
          "Files"
        ],
        "description": "Redirects to a link that downloads the file under its name. The link is valid for 3 minutes, so follow the redirect rather than store it.",
        "operationId": "files_download",
        "parameters": [
          {
            "name": "reference",
            "in": "query",
            "description": "A file reference from `v3/files/upload` or from a file value in `ExtraData`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "302": {
            "description": "Found"
          }
        }
      }
    },
    "/v3/healthChecks/get": {
      "get": {
        "tags": [
          "Health Checks"
        ],
        "description": "Lists the health checks of all employees, or of one employee.",
        "operationId": "healthChecks_get",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/HealthCheck"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/healthChecks/add": {
      "post": {
        "tags": [
          "Health Checks"
        ],
        "description": "Adds a health check and returns its ID.",
        "operationId": "healthChecks_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewHealthCheck"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewHealthCheck"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/healthChecks/edit": {
      "post": {
        "tags": [
          "Health Checks"
        ],
        "description": "Changes a health check.",
        "operationId": "healthChecks_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingHealthCheck"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingHealthCheck"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/healthChecks/delete": {
      "get": {
        "tags": [
          "Health Checks"
        ],
        "description": "Deletes a health check.",
        "operationId": "healthChecks_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/instructions/get": {
      "get": {
        "tags": [
          "Instructions"
        ],
        "description": "Lists all instructions, inactive ones included.",
        "operationId": "instructions_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Instruction"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/instructions/approvals": {
      "get": {
        "tags": [
          "Instructions"
        ],
        "description": "Lists the instructions assigned to all employees, or to one employee, and whether each employee has confirmed them.",
        "operationId": "instructions_approvals",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InstructionApproval"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/get": {
      "get": {
        "tags": [
          "Objects"
        ],
        "description": "Returns objects (projects or work sites); all of them when no parameter is given.",
        "operationId": "objects_get",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Returns only the object with this ID.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "description": "Returns only objects changed on or after this date. Unlike other endpoints, it has no 3-month limit.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/changes": {
      "get": {
        "tags": [
          "Objects"
        ],
        "description": "Returns objects that have changed or been deleted since `modifiedSince`.",
        "operationId": "objects_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/add": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Adds an object.",
        "operationId": "objects_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewObject"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/edit": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Changes an object. Its customer cannot be changed.",
        "operationId": "objects_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingObject"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingObject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/delete": {
      "get": {
        "tags": [
          "Objects"
        ],
        "description": "Deletes an object.",
        "operationId": "objects_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/objectRoles": {
      "get": {
        "tags": [
          "Objects"
        ],
        "description": "Returns every object role with the employees and groups who hold it on the object, over past, current and future periods.",
        "operationId": "objects_objectRoles",
        "parameters": [
          {
            "name": "objectId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ObjectRole"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/addObjectRole": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Gives an employee or a group an object role from `ValidFrom` to `ValidUntil`. The period is merged with the holder's periods of the same role on the object that overlap or adjoin it, so adding never takes days away and repeating a call changes nothing. `ValidUntil` cannot be in the past.",
        "operationId": "objects_addObjectRole",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ObjectRoleAssignment"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ObjectRoleAssignment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/deleteObjectRole": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Takes an object role away from an employee or a group from `ValidFrom` to `ValidUntil`, or altogether when neither is given. A period reaching past both ends is split in two. Past days can be taken away too. Nothing to take away is not an error.",
        "operationId": "objects_deleteObjectRole",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ObjectRoleAssignment"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ObjectRoleAssignment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/customers": {
      "get": {
        "tags": [
          "Objects"
        ],
        "description": "Returns the customers that objects can belong to.",
        "operationId": "objects_customers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/addCustomer": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Adds a customer.",
        "operationId": "objects_addCustomer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewCustomer"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewCustomer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/objects/editCustomer": {
      "post": {
        "tags": [
          "Objects"
        ],
        "description": "Changes a customer. The customer is identified by `Id` only; `ExternalCode` sets a new external code.",
        "operationId": "objects_editCustomer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingCustomer"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingCustomer"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/reports/dataTypes": {
      "get": {
        "tags": [
          "Reports"
        ],
        "description": "Lists the data types `v3/reports/query` can calculate: the company's report data types that have an external code.",
        "operationId": "reports_dataTypes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataType"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/reports/query": {
      "post": {
        "tags": [
          "Reports"
        ],
        "description": "Calculates the data types for the period, grouped by the dimensions: one row for each combination of dimension values that has data, sorted by the dimensions in the order given. Work is placed by its date and a compensation by its start date. The request fails instead of returning partial values when the API key cannot see all the data a data type is calculated from, for the employees or objects asked for, or for everyone when neither is given. A response may hold at most 200,000 values (rows × data types).",
        "operationId": "reports_query",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportQuery"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportRow"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/get": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Returns the wages whose `Date` is in the period, both approved ones and ones waiting for confirmation. Declined wages are left out. Both dates are required.",
        "operationId": "wages_get",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Wage"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/changes": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Returns the wages added, changed or deleted since `modifiedSince`, declined wages included.",
        "operationId": "wages_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WageChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/addRate": {
      "post": {
        "tags": [
          "Wages"
        ],
        "description": "Adds a wage rate. A rate without an employee applies to all employees, one without an object to work on any object, and one without a work type to any work type.",
        "operationId": "wages_addRate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWageRate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewWageRate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/editRate": {
      "post": {
        "tags": [
          "Wages"
        ],
        "description": "Changes a wage rate, found by `Id`.",
        "operationId": "wages_editRate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWageRate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWageRate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/deleteRate": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Deletes a wage rate.",
        "operationId": "wages_deleteRate",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/types": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Lists the wage types, for `WageTypeId` of wage rates.",
        "operationId": "wages_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/report": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Calculates the month's wages from the work done and the wage rates and contract salaries, as the wages report does, without saving anything. Without `employeeId` it covers the active employees and the inactive ones employed during the month. Needs an API key with administrator permissions or full access to the wages report.",
        "operationId": "wages_report",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "description": "Year of the calendar month to calculate.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "query",
            "description": "Month of the year, 1 to 12.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WagesReportData"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/accountingEntries": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Returns the accounting entries of the month: those of the approved wages dated in it and of their taxes, dated with each wage's date. When an accruals account is set up for a tax, the tax of a wage paid in a later month is booked to it, and the entry moving it out is returned for the month of payment, dated its last day. Entries with the same date, dimensions and recalculation flag are merged per account. Needs an API key with administrator permissions.",
        "operationId": "wages_accountingEntries",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "description": "Year of the calendar month.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "month",
            "in": "query",
            "description": "Month of the year, 1 to 12.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountingEntry"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/wages/vacationReserveAccountingEntries": {
      "get": {
        "tags": [
          "Wages"
        ],
        "description": "Returns the accounting entries of the vacation reserve: the pay for the unused vacation days of the vacation types counted in the reserve, at each employee's average pay, and the employer's social tax and unemployment insurance on it. Needs an API key with administrator permissions.",
        "operationId": "wages_vacationReserveAccountingEntries",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "description": "The date the reserve is calculated on. The entries are dated with it and hold the whole reserve on that\ndate, not its change since an earlier date.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AccountingEntry"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workEquipment/get": {
      "get": {
        "tags": [
          "Work Equipment"
        ],
        "description": "Lists the active work equipment of one employee or, without `employeeId`, all of it, including equipment not assigned to anyone.",
        "operationId": "workEquipment_get",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkEquipment"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workEquipment/types": {
      "get": {
        "tags": [
          "Work Equipment"
        ],
        "description": "Lists the active work equipment types.",
        "operationId": "workEquipment_types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkEquipmentType"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/get": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Lists the working times that overlap the period from `startDate` to `endDate`, or that changed since `modifiedSince`. With `modifiedSince`, the dates are optional and either one alone narrows the result. Declined working times are left out unless `modifiedSince` is the only filter given.",
        "operationId": "workingTimes_get",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "modifiedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "description": "Returns only this employee's working times.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "objectId",
            "in": "query",
            "description": "Returns only working times on this object.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkingTime"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/changes": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns working times that have changed or been deleted since `modifiedSince`.",
        "operationId": "workingTimes_changes",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkingTimeChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/add": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Adds a working time. The employee is given by `EmployeeId` or `EmployeeExternalCode`; if both are given, they must match.",
        "operationId": "workingTimes_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWorkingTime"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewWorkingTime"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/addBulk": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Adds up to 100 working times at once and returns their IDs in the order they were sent. If one of them fails, none is added.",
        "operationId": "workingTimes_addBulk",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewWorkingTime"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewWorkingTime"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Result"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/edit": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Changes a working time. A new start time makes `MethodOfStart` `Common` when it was `Timer`, `BiometricDevice` or `Telephone`. A new end time makes `MethodOfEnd` `Common`, or `Automatic` for a working time added by an automatic shift.",
        "operationId": "workingTimes_edit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWorkingTime"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWorkingTime"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/delete": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Deletes the working time with the given `id` or `externalCode`; if both are given, they must match.",
        "operationId": "workingTimes_delete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "externalCode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/schedules": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns scheduled working times that overlap the period from `startDate` to `endDate`. Both dates are required; there is no `modifiedSince`, use `v3/workingTimes/schedulesChanges` for that. Declined ones are left out.",
        "operationId": "workingTimes_schedules",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "description": "Returns only this employee's scheduled working times.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "objectId",
            "in": "query",
            "description": "Returns only scheduled working times on this object.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledWorkingTime"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/schedulesChanges": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns scheduled working times that have changed or been deleted since `modifiedSince`.",
        "operationId": "workingTimes_schedulesChanges",
        "parameters": [
          {
            "name": "modifiedSince",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScheduledWorkingTimeChange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/shiftTemplates": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns the shift templates that scheduled working times can be made from.",
        "operationId": "workingTimes_shiftTemplates",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShiftTemplate"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/workTypes": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns the work types.",
        "operationId": "workingTimes_workTypes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/addWorkType": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Adds a work type.",
        "operationId": "workingTimes_addWorkType",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWorkType"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/NewWorkType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/editWorkType": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Changes a work type. The work type is identified by `Id` only.",
        "operationId": "workingTimes_editWorkType",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWorkType"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExistingWorkType"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/deleteWorkType": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Deletes a work type.",
        "operationId": "workingTimes_deleteWorkType",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/automaticShiftTypes": {
      "get": {
        "tags": [
          "Working Times"
        ],
        "description": "Returns the automatic shift types, which `v3/workingTimes/setAutomaticShift` gives to employees.",
        "operationId": "workingTimes_automaticShiftTypes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Item"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v3/workingTimes/setAutomaticShift": {
      "post": {
        "tags": [
          "Working Times"
        ],
        "description": "Gives an employee an automatic shift type from `StartDate` to `EndDate`. The employee's automatic shifts that reach into the period are shortened, split or removed to make room, so days outside the period keep what they had. Without `AutomaticShiftTypeId` the period is only cleared of automatic shifts. Repeating a call changes nothing.",
        "operationId": "workingTimes_setAutomaticShift",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomaticShift"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AutomaticShift"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Absence": {
        "required": [
          "Id",
          "Employee",
          "StartDate",
          "EndDate",
          "IsApproved",
          "Type",
          "Substitute",
          "PayBeforeVacation",
          "Description",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "format": "date"
          },
          "IsApproved": {
            "type": "boolean",
            "description": "False while the absence waits for approval, and for a declined absence."
          },
          "Type": {
            "$ref": "#/components/schemas/Item"
          },
          "Substitute": {
            "$ref": "#/components/schemas/Item"
          },
          "PayBeforeVacation": {
            "type": "boolean",
            "description": "True when the vacation pay is paid before the vacation, false when with the salary."
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "AbsenceChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Absence"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "AbsenceType": {
        "required": [
          "Id",
          "Name",
          "Abbreviation"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Abbreviation": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AccountingEntry": {
        "required": [
          "Date",
          "IsRecalculation",
          "Account",
          "Debit",
          "Credit",
          "Dimensions"
        ],
        "type": "object",
        "properties": {
          "Date": {
            "type": "string",
            "format": "date"
          },
          "IsRecalculation": {
            "type": "boolean",
            "description": "Whether the entry comes from wages that recalculate earlier wages."
          },
          "Account": {
            "type": "string"
          },
          "Debit": {
            "type": "number",
            "description": "Null when the entry is a credit. Never negative.",
            "format": "double",
            "nullable": true
          },
          "Credit": {
            "type": "number",
            "description": "Null when the entry is a debit. Never negative.",
            "format": "double",
            "nullable": true
          },
          "Dimensions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The accounting dimensions, taken from the employee's employment contract: keyed by the API ID of each\ncontract extra field marked as an accounting dimension, the same key the contract's `ExtraData`\nuses, and holding the chosen option, or null when the contract has none."
          }
        },
        "additionalProperties": false,
        "description": "An accounting entry on one account: either `Debit` or `Credit` is set, never both."
      },
      "AutomaticShift": {
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "description": "The employee. Either this or `EmployeeExternalCode` is required; if both are given, they must\nmatch.",
            "format": "int64",
            "nullable": true
          },
          "EmployeeExternalCode": {
            "type": "string",
            "nullable": true
          },
          "AutomaticShiftTypeId": {
            "type": "integer",
            "description": "The automatic shift type (`v3/workingTimes/automaticShiftTypes`). Null removes the employee's\nautomatic shifts from the period.",
            "format": "int64",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "description": "The first day of the period, inclusive. Null means the period has no start.",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "description": "The last day of the period, inclusive. Null means the period has no end.",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Choice": {
        "required": [
          "Id",
          "Name",
          "ExternalCode",
          "IsInactive"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Compensation": {
        "required": [
          "Id",
          "Employee",
          "Date",
          "Amount",
          "Rate",
          "Sum",
          "Object",
          "IsApproved",
          "Type",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "Date": {
            "type": "string",
            "format": "date"
          },
          "Amount": {
            "type": "number",
            "description": "The number of units.",
            "format": "double"
          },
          "Rate": {
            "type": "number",
            "description": "The sum per unit.",
            "format": "double"
          },
          "Sum": {
            "type": "number",
            "description": "`Amount` times `Rate`.",
            "format": "double"
          },
          "Object": {
            "$ref": "#/components/schemas/Item"
          },
          "IsApproved": {
            "type": "boolean",
            "description": "False while the compensation waits for approval."
          },
          "Type": {
            "$ref": "#/components/schemas/Item"
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "CompensationType": {
        "required": [
          "Id",
          "Name",
          "Abbreviation"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Abbreviation": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataType": {
        "required": [
          "ExternalCode",
          "Name"
        ],
        "type": "object",
        "properties": {
          "ExternalCode": {
            "type": "string"
          },
          "Name": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A data type: a value reports calculate, such as hours worked. Query it by its external code."
      },
      "DecreasedWorkCapability": {
        "required": [
          "Id",
          "Employee",
          "StartDate",
          "EndDate",
          "SocialTaxDiscountStartDate",
          "SocialTaxDiscountEndDate",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "Null when the decreased work capability has no end date.",
            "format": "date",
            "nullable": true
          },
          "SocialTaxDiscountStartDate": {
            "type": "string",
            "description": "The start of the social tax discount for the decreased work capability; null when there is none.",
            "format": "date",
            "nullable": true
          },
          "SocialTaxDiscountEndDate": {
            "type": "string",
            "description": "Null when the social tax discount lasts until `EndDate`.",
            "format": "date",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Employee": {
        "required": [
          "Id",
          "FirstName",
          "LastName",
          "IdentityCode",
          "Email",
          "Telephone",
          "BankAccount",
          "BankAccountHolder",
          "UserName",
          "Language",
          "ExternalCode",
          "IsInactive",
          "LoginDisabledFrom",
          "Object",
          "ModifiedAt",
          "ProfilePictureReference",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "FirstName": {
            "type": "string",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "nullable": true
          },
          "IdentityCode": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Telephone": {
            "type": "string",
            "nullable": true
          },
          "BankAccount": {
            "type": "string",
            "nullable": true
          },
          "BankAccountHolder": {
            "type": "string",
            "nullable": true
          },
          "UserName": {
            "type": "string",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Two-letter code of the employee's user interface language, such as en or et. \"et\" when none is set."
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean"
          },
          "LoginDisabledFrom": {
            "type": "string",
            "description": "The employee can't log in from this date on.",
            "format": "date",
            "nullable": true
          },
          "Object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The employee's default object (from `v3/objects/get`), used for example when the employee starts\nthe timer."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ProfilePictureReference": {
            "type": "string",
            "description": "Reference to the profile picture for `v3/files/download`.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmployeeChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Employee"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "EmployeeExtended": {
        "required": [
          "DirectSubordinates",
          "Groups",
          "EmploymentStart",
          "EmploymentEnd",
          "JobTitle",
          "EmploymentContracts",
          "Id",
          "FirstName",
          "LastName",
          "IdentityCode",
          "Email",
          "Telephone",
          "BankAccount",
          "BankAccountHolder",
          "UserName",
          "Language",
          "ExternalCode",
          "IsInactive",
          "LoginDisabledFrom",
          "Object",
          "ModifiedAt",
          "ProfilePictureReference",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "DirectSubordinates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The employee's direct subordinates. Unless the company excludes groups from direct subordinates, this\nincludes the members of groups set as the employee's subordinates."
          },
          "Groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The active groups the employee belongs to, directly or through a nested group or a subordinates rule."
          },
          "EmploymentStart": {
            "type": "string",
            "description": "Start of the employee's current or latest employment. Contracts that follow one another without a gap\ncount as one employment.",
            "format": "date",
            "nullable": true
          },
          "EmploymentEnd": {
            "type": "string",
            "description": "End of the employee's current or latest employment, amendments included; null while it is open-ended.",
            "format": "date",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "Job titles of the contracts in effect today, separated by \"; \". With no contract in effect today, the\njob title of the latest contract.",
            "nullable": true
          },
          "EmploymentContracts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmploymentContractExtended"
            },
            "description": "The employee's contracts with their amendments; null when the API key can't view the employee's\ncontracts.",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "FirstName": {
            "type": "string",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "nullable": true
          },
          "IdentityCode": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Telephone": {
            "type": "string",
            "nullable": true
          },
          "BankAccount": {
            "type": "string",
            "nullable": true
          },
          "BankAccountHolder": {
            "type": "string",
            "nullable": true
          },
          "UserName": {
            "type": "string",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Two-letter code of the employee's user interface language, such as en or et. \"et\" when none is set."
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean"
          },
          "LoginDisabledFrom": {
            "type": "string",
            "description": "The employee can't log in from this date on.",
            "format": "date",
            "nullable": true
          },
          "Object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The employee's default object (from `v3/objects/get`), used for example when the employee starts\nthe timer."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ProfilePictureReference": {
            "type": "string",
            "description": "Reference to the profile picture for `v3/files/download`.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmployeesGroup": {
        "required": [
          "Id",
          "Name",
          "ExternalCode",
          "Members",
          "DirectMembers",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "Members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "All employees in the group: direct members, members of nested groups, and the active subordinates of\nemployees whose subordinates the group includes."
          },
          "DirectMembers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "Employees added to the group directly."
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmployeeWorkInfo": {
        "required": [
          "Employee",
          "WorkedHours",
          "ExpectedHours",
          "OvertimeHours"
        ],
        "type": "object",
        "properties": {
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "WorkedHours": {
            "type": "number",
            "description": "Hours of approved working time in the period.",
            "format": "double"
          },
          "ExpectedHours": {
            "type": "number",
            "description": "The employee's expected working hours for the period, reduced by approved absences.",
            "format": "double"
          },
          "OvertimeHours": {
            "type": "number",
            "description": "Worked hours that count towards overtime minus `ExpectedHours`; negative when the employee worked\nless than expected.",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "EmploymentContract": {
        "required": [
          "Id",
          "Employee",
          "StartDate",
          "EndDate",
          "WorkLoad",
          "JobTitle",
          "Type",
          "HourlyRate",
          "MonthlySalary",
          "WorkingLocation",
          "BasisForTermination",
          "Object",
          "ExternalCode",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "The end date set on the contract itself; null for an open-ended contract. An amendment can change it:\nsee the amendments' `EndChanged` and `EndDate`.",
            "format": "date",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "Work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "description": "EmploymentContract for an ordinary employment contract, otherwise AgencyAgreement, BoardMember,\nContractForServices, RentalEmployee, ServiceAgreement or SupervisoryBoardMember."
          },
          "HourlyRate": {
            "type": "number",
            "description": "Hourly rate in euros; null when the contract has a monthly salary or no salary.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "Monthly salary in euros; null when the contract has an hourly rate or no salary.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocation": {
            "$ref": "#/components/schemas/WorkingLocation"
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, such as 1301 for termination by\nagreement. Set only together with `EndDate`.",
            "format": "int64",
            "nullable": true
          },
          "Object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The object (from `v3/objects/get`) the contract is linked to, where the company links contracts to\nobjects."
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmploymentContractAmendment": {
        "required": [
          "Id",
          "Contract",
          "Employee",
          "StartDate",
          "EndChanged",
          "EndDate",
          "BasisForTermination",
          "WorkLoad",
          "JobTitle",
          "Salary",
          "WorkingLocation",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Contract": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Result"
              }
            ],
            "description": "The ID of the amended contract."
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndChanged": {
            "type": "boolean",
            "description": "Whether the amendment changes the contract's end date."
          },
          "EndDate": {
            "type": "string",
            "description": "The new end date when `EndChanged` is true; null then makes the contract open-ended.",
            "format": "date",
            "nullable": true
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, for an amendment that sets an end\ndate.",
            "format": "int64",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "The new work load as a share of full time (1 is 40 hours a week); null when the amendment sets none.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "The new job title; null when the amendment doesn't change it.",
            "nullable": true
          },
          "Salary": {
            "type": "number",
            "description": "The new hourly rate or monthly salary in euros; null when the amendment doesn't change the salary. Which\nof the two it is isn't included here; `v3/employees/get` shows it as `HourlyRate` or\n`MonthlySalary`.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkingLocation"
              }
            ],
            "description": "The new working location; null when the amendment doesn't change it."
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmploymentContractAmendmentChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmploymentContractAmendment"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "EmploymentContractAmendmentInfo": {
        "required": [
          "Id",
          "StartDate",
          "EndChanged",
          "EndDate",
          "BasisForTermination",
          "WorkLoad",
          "JobTitle",
          "HourlyRate",
          "MonthlySalary",
          "WorkingLocation",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndChanged": {
            "type": "boolean",
            "description": "Whether the amendment changes the contract's end date."
          },
          "EndDate": {
            "type": "string",
            "description": "The new end date when `EndChanged` is true; null then makes the contract open-ended.",
            "format": "date",
            "nullable": true
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, for an amendment that sets an end\ndate.",
            "format": "int64",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "The new work load as a share of full time (1 is 40 hours a week); null when the amendment sets none.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "The new job title; null when the amendment doesn't change it.",
            "nullable": true
          },
          "HourlyRate": {
            "type": "number",
            "description": "The new hourly rate in euros; null when the amendment doesn't change the salary or the salary is\nmonthly.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "The new monthly salary in euros; null when the amendment doesn't change the salary or the salary is\nhourly.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkingLocation"
              }
            ],
            "description": "The new working location; null when the amendment doesn't change it."
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EmploymentContractChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EmploymentContract"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "EmploymentContractExtended": {
        "required": [
          "AgencyAgreement",
          "Amendments",
          "Id",
          "Employee",
          "StartDate",
          "EndDate",
          "WorkLoad",
          "JobTitle",
          "Type",
          "HourlyRate",
          "MonthlySalary",
          "WorkingLocation",
          "BasisForTermination",
          "Object",
          "ExternalCode",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "AgencyAgreement": {
            "type": "boolean",
            "description": "True when `Type` is AgencyAgreement."
          },
          "Amendments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmploymentContractAmendmentInfo"
            },
            "description": "The contract's amendments, ordered by start date."
          },
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "The end date set on the contract itself; null for an open-ended contract. An amendment can change it:\nsee the amendments' `EndChanged` and `EndDate`.",
            "format": "date",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "Work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "description": "EmploymentContract for an ordinary employment contract, otherwise AgencyAgreement, BoardMember,\nContractForServices, RentalEmployee, ServiceAgreement or SupervisoryBoardMember."
          },
          "HourlyRate": {
            "type": "number",
            "description": "Hourly rate in euros; null when the contract has a monthly salary or no salary.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "Monthly salary in euros; null when the contract has an hourly rate or no salary.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocation": {
            "$ref": "#/components/schemas/WorkingLocation"
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, such as 1301 for termination by\nagreement. Set only together with `EndDate`.",
            "format": "int64",
            "nullable": true
          },
          "Object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The object (from `v3/objects/get`) the contract is linked to, where the company links contracts to\nobjects."
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "ErrorResult": {
        "required": [
          "Error",
          "TraceId"
        ],
        "type": "object",
        "properties": {
          "Error": {
            "type": "string"
          },
          "TraceId": {
            "type": "string",
            "description": "Identifies the request in Wemply's logs; include it when contacting support."
          }
        },
        "additionalProperties": false,
        "description": "Why the request failed."
      },
      "Event": {
        "required": [
          "Id",
          "IsAllDayEvent",
          "AllDayEventDate",
          "StartTime",
          "EndTime",
          "Name",
          "Description",
          "Type",
          "Owner",
          "Object",
          "Participants",
          "Resources",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "IsAllDayEvent": {
            "type": "boolean"
          },
          "AllDayEventDate": {
            "type": "string",
            "description": "The date of an all-day event; null for other events.",
            "format": "date",
            "nullable": true
          },
          "StartTime": {
            "type": "string",
            "description": "Null for an all-day event.",
            "format": "date-time",
            "nullable": true
          },
          "EndTime": {
            "type": "string",
            "description": "Null for an all-day event.",
            "format": "date-time",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Item"
          },
          "Owner": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "Null when the event has no owner."
          },
          "Object": {
            "$ref": "#/components/schemas/Item"
          },
          "Participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The employees taking part. The owner takes part whether or not listed here."
          },
          "Resources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The resources from `v3/events/resources` that the event books. The API cannot change them."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EventChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "ExistingAbsence": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "TypeId": {
            "type": "integer",
            "description": "An absence type from `v3/absences/types`.",
            "format": "int64",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "PayBeforeVacation": {
            "type": "boolean",
            "description": "True to pay the vacation pay before the vacation, false to pay it with the salary.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingChoice": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "description": "The new name. Null or empty keeps the current name.",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingCustomer": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "description": "A new external code for the customer.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingEmployee": {
        "type": "object",
        "properties": {
          "FirstName": {
            "type": "string",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "nullable": true
          },
          "IdentityCode": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Telephone": {
            "type": "string",
            "nullable": true
          },
          "BankAccount": {
            "type": "string",
            "description": "IBAN, with the country code in capitals; the check digits are validated.",
            "nullable": true
          },
          "BankAccountHolder": {
            "type": "string",
            "nullable": true
          },
          "UserName": {
            "type": "string",
            "description": "Must not contain spaces.",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "description": "Country code: an ISO 3166-1 alpha-2 code such as EE, or GB-ENG, GB-WLS, GB-SCT or GB-NIR for the United\nKingdom. The error for an unsupported value lists the supported codes. Null leaves the country\nunchanged.",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Two-letter code of the user interface language, such as en or et. The error for an unsupported value\nlists the supported codes. Null leaves the language unchanged.",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean",
            "description": "Setting this, to either value, also turns off letting the employee log in while inactive.",
            "nullable": true
          },
          "PermissionGroup": {
            "type": "integer",
            "description": "Permission group ID from `v3/employees/permissionGroups`. The API key can't grant a group with\npermissions its own user doesn't have.",
            "format": "int64",
            "nullable": true
          },
          "DirectSubordinates": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the employee's direct subordinates. Replaces the employees among the current subordinates; groups\nset as subordinates are kept. An empty list removes them; null keeps them.",
            "nullable": true
          },
          "DirectManagers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the employees who have this employee as a direct subordinate. Employees not listed stop having\nthe employee as a direct subordinate; managers through a group are not affected. An empty list removes\nthem; null keeps them.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "The ID of the item to change. Either this or `ExternalCode` is required.",
            "format": "int64",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "description": "Finds the item to change when `Id` is not given. When `Id` is given, a new external code for the\nitem.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingEmploymentContract": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "StartDate": {
            "type": "string",
            "description": "Null leaves the start date unchanged.",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "Work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "Job title, matched by name ignoring case. A job title that doesn't exist yet is created.",
            "nullable": true
          },
          "HourlyRate": {
            "type": "number",
            "description": "Hourly rate in euros. Setting it replaces a monthly salary; null clears the salary when it is an hourly\nrate.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "Monthly salary in euros. Setting it replaces an hourly rate; null clears the salary when it is a monthly\nsalary. Ignored when `HourlyRate` has a value.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocationAdsCode": {
            "type": "integer",
            "description": "Address ID in the Estonian Address Data System (ADS) of an existing working location.",
            "format": "int64",
            "nullable": true
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, such as 1301 for termination by\nagreement; the error for an unsupported code lists the supported ones. Dropped when the contract has no\nend date.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingEmploymentContractAmendment": {
        "required": [
          "ContractId",
          "CurrentStartDate"
        ],
        "type": "object",
        "properties": {
          "ContractId": {
            "type": "integer",
            "format": "int64"
          },
          "CurrentStartDate": {
            "type": "string",
            "description": "The start date of the amendment to change.",
            "format": "date"
          },
          "NewStartDate": {
            "type": "string",
            "description": "Moves the amendment to this start date. Null leaves the start date unchanged.",
            "format": "date",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "The new work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "The new job title, matched by name ignoring case. A job title that doesn't exist yet is created.",
            "nullable": true
          },
          "HourlyRate": {
            "type": "number",
            "description": "The new hourly rate in euros; replaces a monthly salary. Null leaves the salary unchanged, so the salary\ncan't be removed here. If both `HourlyRate` and `MonthlySalary` are given, only this is used.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "The new monthly salary in euros; replaces an hourly rate. Null leaves the salary unchanged.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocationAdsCode": {
            "type": "integer",
            "description": "Address ID in the Estonian Address Data System (ADS) of an existing working location.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "In an amendment, a field other than the salary set to null no longer changes that value: the value in effect\nbefore the amendment continues."
      },
      "ExistingEvent": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "StartTime": {
            "type": "string",
            "description": "Has no effect on an all-day event, which keeps its date.",
            "format": "date-time",
            "nullable": true
          },
          "EndTime": {
            "type": "string",
            "description": "Has no effect on an all-day event, which keeps its date.",
            "format": "date-time",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "TypeId": {
            "type": "integer",
            "description": "The event type's ID. An event must have a type, so null fails.",
            "format": "int64",
            "nullable": true
          },
          "OwnerId": {
            "type": "integer",
            "description": "The owner's employee ID.",
            "format": "int64",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "An object from `v3/objects/get`.",
            "format": "int64",
            "nullable": true
          },
          "Participants": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The employee IDs of the participants besides the owner. Replaces the whole list.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingExtraData": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "EmployeeId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean",
            "description": "An inactive row is no longer returned by `get`. `changes` returns it with `IsInactive`\ntrue when the table's rows can be made inactive in Wemply, and leaves it out otherwise.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "description": "The row's values, keyed by the API IDs of the table's fields.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingHealthCheck": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Date": {
            "type": "string",
            "description": "The date of the check. Null keeps it: the API cannot clear it.",
            "format": "date",
            "nullable": true
          },
          "ExpirationDate": {
            "type": "string",
            "description": "The date by which the next check is due.",
            "format": "date",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingObject": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "AllowedWorkTypes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the work types (`v3/workingTimes/workTypes`) that working times on the object may have. An\nempty list allows every work type; null leaves them unchanged.",
            "nullable": true
          },
          "BiometricDeviceId": {
            "type": "integer",
            "description": "The work code that biometric devices use for the object. A positive number not used by another object.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "The ID of the item to change. Either this or `ExternalCode` is required.",
            "format": "int64",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "description": "Finds the item to change when `Id` is not given. When `Id` is given, a new external code for the\nitem.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingResource": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingWageRate": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "EmployeeId": {
            "type": "integer",
            "description": "The employee the rate is for. Null in both `EmployeeId` and `EmployeeExternalCode` makes it a\nrate for all employees.",
            "format": "int64",
            "nullable": true
          },
          "EmployeeExternalCode": {
            "type": "string",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "ObjectExternalCode": {
            "type": "string",
            "nullable": true
          },
          "WorkTypeId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "WageTypeId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Rate": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "description": "The last day the rate applies. Null makes the rate apply without an end.",
            "format": "date",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingWorkingTime": {
        "type": "object",
        "properties": {
          "StartTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "EndTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "BreakLengthInMinutes": {
            "type": "integer",
            "description": "0 removes the break; null leaves it unchanged.",
            "format": "int64",
            "nullable": true
          },
          "IsApproved": {
            "type": "boolean",
            "description": "True approves the working time, false sets it waiting for approval; null leaves it unchanged. It is\napproved fully only when the API user may approve it; working times that need no approval are always\napproved.",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "The object (`v3/objects/get`) the work was done on.",
            "format": "int64",
            "nullable": true
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "The work type (`v3/workingTimes/workTypes`). If the object has allowed work types, it must be one\nof them.",
            "format": "int64",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Note": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "The ID of the item to change. Either this or `ExternalCode` is required.",
            "format": "int64",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "description": "Finds the item to change when `Id` is not given. When `Id` is given, a new external code for the\nitem.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExistingWorkType": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ExtraData": {
        "required": [
          "Id",
          "Employee",
          "Object",
          "IsInactive",
          "CreatedAt",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The employee the row belongs to. Null when it belongs to none."
          },
          "Object": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The object the row belongs to. Null when it belongs to none."
          },
          "IsInactive": {
            "type": "boolean",
            "description": "Always false in `get`, which leaves inactive rows out; `changes` includes them for tables\nwhose rows can be made inactive in Wemply."
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object",
            "description": "The row's values, keyed by the API IDs of the table's fields."
          }
        },
        "additionalProperties": false,
        "description": "A row of an extra data table."
      },
      "ExtraDataChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExtraData"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "ExtraField": {
        "required": [
          "Id",
          "Name",
          "PlaceOfUse",
          "Type"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "The field's API ID, the key of its value in `ExtraData`."
          },
          "Name": {
            "type": "string"
          },
          "PlaceOfUse": {
            "type": "string",
            "description": "Where the field is used: `Employee`, `EmploymentContract`, `EmploymentContractAmendment`,\n`EmployeesGroup`, `Absence`, `Compensation`, `WorkingTime`, `Project` (an\nobject) or `Event`; for a field of an extra data table, the table's ID."
          },
          "Type": {
            "type": "string",
            "description": "The kind of value: `Text`, `Boolean`, `Integer`, `Real`, `Time` (a time of day\nas `HH:mm`), `Date`, `DateTime`, `Choice`, `MultiChoice`, `File`,\n`Files`, `Signature`, `EmployeesAndGroups` (an array of `{ Id, Type }` with type\n`Employee` or `EmployeesGroup`), `Employee`, or the name of another kind of item the\nfield refers to, such as `Project`. A reference to an employee or another item is set as\n`{ Id }`. `MultiChoice` and `Signature` fields can only be read.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An extra field: a field the company adds to items of some kind or to an extra data table."
      },
      "HealthCheck": {
        "required": [
          "Id",
          "Employee",
          "Date",
          "ExpirationDate",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "Date": {
            "type": "string",
            "description": "The date of the check. Null for a check that has not been done yet, such as a new employee's first\ncheck; `ExpirationDate` is then its deadline.",
            "format": "date",
            "nullable": true
          },
          "ExpirationDate": {
            "type": "string",
            "description": "The date by which the next check is due.",
            "format": "date"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "IncomeTaxFreeMinimum": {
        "required": [
          "Id",
          "Employee",
          "StartDate",
          "IsConfirmed",
          "UseMaximum",
          "FixedAmount"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "IsConfirmed": {
            "type": "boolean",
            "description": "Whether the application is confirmed. Payroll uses only confirmed applications."
          },
          "UseMaximum": {
            "type": "boolean",
            "description": "True when the employee applies for the maximum amount allowed; `FixedAmount` is then null."
          },
          "FixedAmount": {
            "type": "number",
            "description": "The fixed tax-free amount per month in euros; 0 when the employee doesn't apply for the tax-free\nminimum. Null when `UseMaximum` is true.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An employee's application for the income tax-free minimum, in effect from `StartDate` until the\nemployee's next application."
      },
      "Instruction": {
        "required": [
          "Id",
          "Name",
          "ValidFrom",
          "ValidUntil",
          "CreatedAt",
          "IsInactive",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "ValidFrom": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "ValidUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "IsInactive": {
            "type": "boolean"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "InstructionApproval": {
        "required": [
          "Employee",
          "Instruction",
          "CreatedAt",
          "ApprovalTime"
        ],
        "type": "object",
        "properties": {
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "Instruction": {
            "$ref": "#/components/schemas/Item"
          },
          "CreatedAt": {
            "type": "string",
            "description": "When the instruction was assigned to the employee.",
            "format": "date-time"
          },
          "ApprovalTime": {
            "type": "string",
            "description": "When the employee confirmed or signed the instruction; null until they do.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An instruction assigned to an employee."
      },
      "Item": {
        "required": [
          "Id",
          "Name",
          "ExternalCode"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A reference to another item, such as an employee, an object or a type."
      },
      "ItemWithType": {
        "required": [
          "Id",
          "Name",
          "Type"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Type": {
            "type": "string",
            "description": "The kind of item, such as `Employee`."
          }
        },
        "additionalProperties": false,
        "description": "A reference to an item that can be of more than one kind."
      },
      "NewAbsence": {
        "required": [
          "EmployeeId",
          "TypeId",
          "StartDate",
          "EndDate"
        ],
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "format": "int64"
          },
          "TypeId": {
            "type": "integer",
            "description": "An absence type from `v3/absences/types`.",
            "format": "int64"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "format": "date"
          },
          "PayBeforeVacation": {
            "type": "boolean",
            "description": "True to pay the vacation pay before the vacation, false to pay it with the salary. False when left out.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewChoice": {
        "required": [
          "Field",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Field": {
            "type": "string",
            "description": "The API ID of a choice or multiple choice field, as `v3/extraData/fields` lists it."
          },
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewCompensation": {
        "required": [
          "EmployeeId",
          "Date",
          "TypeId"
        ],
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "format": "int64"
          },
          "Date": {
            "type": "string",
            "format": "date"
          },
          "TypeId": {
            "type": "integer",
            "description": "A compensation type from `v3/compensations/types`.",
            "format": "int64"
          },
          "ObjectId": {
            "type": "integer",
            "description": "An object from `v3/objects/get`.",
            "format": "int64",
            "nullable": true
          },
          "Amount": {
            "type": "number",
            "description": "The number of units. 1 when left out.",
            "format": "double",
            "nullable": true
          },
          "Sum": {
            "type": "number",
            "description": "The total sum. The rate is set to `Sum` divided by `Amount`.",
            "format": "double",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewCustomer": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewEmployee": {
        "required": [
          "PermissionGroup"
        ],
        "type": "object",
        "properties": {
          "FirstName": {
            "type": "string",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "nullable": true
          },
          "IdentityCode": {
            "type": "string",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "nullable": true
          },
          "Telephone": {
            "type": "string",
            "nullable": true
          },
          "BankAccount": {
            "type": "string",
            "description": "IBAN, with the country code in capitals; the check digits are validated.",
            "nullable": true
          },
          "BankAccountHolder": {
            "type": "string",
            "nullable": true
          },
          "UserName": {
            "type": "string",
            "description": "Must not contain spaces.",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "description": "At least 10 characters; under 15 characters it must contain both a letter and a digit.",
            "nullable": true
          },
          "ExternalCode": {
            "type": "string",
            "description": "When left out and the company generates employee external codes, the next free number is assigned.",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "description": "Country code: an ISO 3166-1 alpha-2 code such as EE, or GB-ENG, GB-WLS, GB-SCT or GB-NIR for the United\nKingdom. The error for an unsupported value lists the supported codes. Defaults to the company's default\ncountry.",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Two-letter code of the user interface language, such as en or et. The error for an unsupported value\nlists the supported codes.",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean"
          },
          "PermissionGroup": {
            "type": "integer",
            "description": "Permission group ID from `v3/employees/permissionGroups`. The API key can't grant a group with\npermissions its own user doesn't have.",
            "format": "int64"
          },
          "DirectSubordinates": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the employees who become the new employee's direct subordinates.",
            "nullable": true
          },
          "DirectManagers": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the employees who get the new employee as a direct subordinate.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewEmployeesGroup": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "type": "string"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewEmploymentContract": {
        "required": [
          "StartDate"
        ],
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "description": "The employee by ID; give this or `EmployeeExternalCode`. If both are given, they must match.",
            "format": "int64",
            "nullable": true
          },
          "EmployeeExternalCode": {
            "type": "string",
            "description": "The employee by external code; give this or `EmployeeId`.",
            "nullable": true
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "AgencyAgreement": {
            "type": "boolean",
            "description": "Used only when `Type` is not given: true makes an agency agreement, otherwise an ordinary\nemployment contract.",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "description": "EmploymentContract for an ordinary employment contract, or AgencyAgreement, BoardMember,\nContractForServices, RentalEmployee, ServiceAgreement or SupervisoryBoardMember.",
            "nullable": true
          },
          "WorkLoad": {
            "type": "number",
            "description": "Work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "Job title, matched by name ignoring case. A job title that doesn't exist yet is created.",
            "nullable": true
          },
          "HourlyRate": {
            "type": "number",
            "description": "Hourly rate in euros. Give this or `MonthlySalary`; if both are given, only this is used.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "Monthly salary in euros. Ignored when `HourlyRate` is given.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocationAdsCode": {
            "type": "integer",
            "description": "Address ID in the Estonian Address Data System (ADS) of an existing working location.",
            "format": "int64",
            "nullable": true
          },
          "BasisForTermination": {
            "type": "integer",
            "description": "Basis for termination as an Estonian employment register (TÖR) code, such as 1301 for termination by\nagreement; the error for an unsupported code lists the supported ones. Dropped when there is no\n`EndDate`.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewEmploymentContractAmendment": {
        "required": [
          "ContractId",
          "StartDate"
        ],
        "type": "object",
        "properties": {
          "ContractId": {
            "type": "integer",
            "format": "int64"
          },
          "StartDate": {
            "type": "string",
            "description": "The day the amendment takes effect. Must be after the contract's start date and no later than its end\ndate; a contract can't have two amendments with the same start date.",
            "format": "date"
          },
          "WorkLoad": {
            "type": "number",
            "description": "The new work load as a share of full time: 1 is full time (40 hours a week), 0.5 half time.",
            "format": "double",
            "nullable": true
          },
          "JobTitle": {
            "type": "string",
            "description": "The new job title, matched by name ignoring case. A job title that doesn't exist yet is created.",
            "nullable": true
          },
          "HourlyRate": {
            "type": "number",
            "description": "The new hourly rate in euros. Give this or `MonthlySalary`; if both are given, only this is used.",
            "format": "double",
            "nullable": true
          },
          "MonthlySalary": {
            "type": "number",
            "description": "The new monthly salary in euros. Ignored when `HourlyRate` is given.",
            "format": "double",
            "nullable": true
          },
          "WorkingLocationAdsCode": {
            "type": "integer",
            "description": "Address ID in the Estonian Address Data System (ADS) of an existing working location.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewEvent": {
        "required": [
          "StartTime",
          "EndTime"
        ],
        "type": "object",
        "properties": {
          "StartTime": {
            "type": "string",
            "format": "date-time"
          },
          "EndTime": {
            "type": "string",
            "format": "date-time"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "TypeId": {
            "type": "integer",
            "description": "The event type's ID. An event must have a type, so leaving it out fails. The API does not list event\ntypes; the events from `v3/events/get` show the types in use.",
            "format": "int64",
            "nullable": true
          },
          "OwnerId": {
            "type": "integer",
            "description": "The owner's employee ID. Left out, the event has no owner.",
            "format": "int64",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "An object from `v3/objects/get`.",
            "format": "int64",
            "nullable": true
          },
          "Participants": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "The employee IDs of the participants besides the owner.",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewExtraData": {
        "required": [
          "TableId"
        ],
        "type": "object",
        "properties": {
          "TableId": {
            "type": "integer",
            "description": "A table from `v3/extraData/tables`.",
            "format": "int64"
          },
          "EmployeeId": {
            "type": "integer",
            "description": "The employee the row belongs to, for a table with rows by employee.",
            "format": "int64",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "The object the row belongs to, for a table with rows by object.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "description": "The row's values, keyed by the API IDs of the table's fields.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewHealthCheck": {
        "required": [
          "EmployeeId",
          "Date",
          "ExpirationDate"
        ],
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "format": "int64"
          },
          "Date": {
            "type": "string",
            "format": "date"
          },
          "ExpirationDate": {
            "type": "string",
            "description": "The date by which the next check is due.",
            "format": "date"
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewObject": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string"
          },
          "StartDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "AllowedWorkTypes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "IDs of the work types (`v3/workingTimes/workTypes`) that working times on the object may have.\nEmpty or left out allows every work type.",
            "nullable": true
          },
          "CustomerId": {
            "type": "integer",
            "description": "The customer (`v3/objects/customers`). It cannot be changed later.",
            "format": "int64",
            "nullable": true
          },
          "BiometricDeviceId": {
            "type": "integer",
            "description": "The work code that biometric devices use for the object. A positive number not used by another object.",
            "format": "int64",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewResource": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "type": "string"
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewWageRate": {
        "required": [
          "WageTypeId",
          "Rate",
          "StartDate"
        ],
        "type": "object",
        "properties": {
          "EmployeeId": {
            "type": "integer",
            "description": "The employee the rate is for. Leave it out, with `EmployeeExternalCode`, for a rate for all\nemployees.",
            "format": "int64",
            "nullable": true
          },
          "EmployeeExternalCode": {
            "type": "string",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "The object whose work the rate pays. Leave it out, with `ObjectExternalCode`, for work on any\nobject.",
            "format": "int64",
            "nullable": true
          },
          "ObjectExternalCode": {
            "type": "string",
            "nullable": true
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "The work type the rate pays, from `v3/workingTimes/workTypes`. Leave it out for work of any type.",
            "format": "int64",
            "nullable": true
          },
          "WageTypeId": {
            "type": "integer",
            "description": "A wage type from `v3/wages/types`.",
            "format": "int64"
          },
          "Rate": {
            "type": "number",
            "description": "Pay per unit of the wage type's base, such as per hour, or the amount for the month when the wage type\nis paid monthly.",
            "format": "double"
          },
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "description": "The last day the rate applies. Null for a rate without an end.",
            "format": "date",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A rate per unit of the wage type's base, such as per hour."
      },
      "NewWorkingTime": {
        "required": [
          "StartTime",
          "EndTime"
        ],
        "type": "object",
        "properties": {
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "EmployeeId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "EmployeeExternalCode": {
            "type": "string",
            "nullable": true
          },
          "StartTime": {
            "type": "string",
            "format": "date-time"
          },
          "EndTime": {
            "type": "string",
            "format": "date-time"
          },
          "BreakLengthInMinutes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "IsApproved": {
            "type": "boolean",
            "description": "True approves the working time, false leaves it waiting for approval. It is approved fully only when the\nAPI user may approve it; working times that need no approval are always approved.",
            "nullable": true
          },
          "ObjectId": {
            "type": "integer",
            "description": "The object (`v3/objects/get`) the work was done on.",
            "format": "int64",
            "nullable": true
          },
          "WorkTypeId": {
            "type": "integer",
            "description": "The work type (`v3/workingTimes/workTypes`). If the object has allowed work types, it must be one\nof them.",
            "format": "int64",
            "nullable": true
          },
          "SpecialRateId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "Note": {
            "type": "string",
            "nullable": true
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewWorkType": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "type": "string"
          },
          "ExtraData": {
            "type": "object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Object": {
        "required": [
          "Id",
          "Name",
          "Customer",
          "ExternalCode",
          "BiometricDeviceId",
          "IsInactive",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Customer": {
            "$ref": "#/components/schemas/Item"
          },
          "ExternalCode": {
            "type": "string",
            "nullable": true
          },
          "BiometricDeviceId": {
            "type": "integer",
            "description": "The work code that biometric devices use for the object.",
            "format": "int64",
            "nullable": true
          },
          "IsInactive": {
            "type": "boolean",
            "description": "Always false in `get`, which leaves inactive objects out; `changes` includes them."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "description": "A project or work site."
      },
      "ObjectChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Object"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "ObjectRole": {
        "required": [
          "Id",
          "Name",
          "Members"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObjectRoleMember"
            }
          }
        },
        "additionalProperties": false,
        "description": "An object role and who holds it on the object."
      },
      "ObjectRoleAssignment": {
        "required": [
          "ObjectId",
          "RoleId"
        ],
        "type": "object",
        "properties": {
          "ObjectId": {
            "type": "integer",
            "format": "int64"
          },
          "RoleId": {
            "type": "integer",
            "description": "The object role (`v3/objects/objectRoles`).",
            "format": "int64"
          },
          "EmployeeId": {
            "type": "integer",
            "description": "The employee who holds the role. Exactly one of `EmployeeId` and `EmployeesGroupId` is\nrequired.",
            "format": "int64",
            "nullable": true
          },
          "EmployeesGroupId": {
            "type": "integer",
            "description": "The group (`v3/employees/groups`) that holds the role. Exactly one of `EmployeeId` and\n`EmployeesGroupId` is required. Groups whose members are based on subordinates cannot hold roles,\nand the API user needs permission to edit all groups.",
            "format": "int64",
            "nullable": true
          },
          "ValidFrom": {
            "type": "string",
            "description": "The first day of the period, inclusive. Null means the period has no start.",
            "format": "date",
            "nullable": true
          },
          "ValidUntil": {
            "type": "string",
            "description": "The last day of the period, inclusive. Null means the period has no end.",
            "format": "date",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ObjectRoleMember": {
        "required": [
          "IsGroup",
          "MemberId",
          "MemberName",
          "ValidFrom",
          "ValidUntil",
          "Employees"
        ],
        "type": "object",
        "properties": {
          "IsGroup": {
            "type": "boolean",
            "description": "True when the holder is an employee group, false when it is an employee."
          },
          "MemberId": {
            "type": "integer",
            "description": "The ID of the employee, or of the group (`v3/employees/groups`) when `IsGroup` is true.",
            "format": "int64"
          },
          "MemberName": {
            "type": "string",
            "nullable": true
          },
          "ValidFrom": {
            "type": "string",
            "description": "The first day of the period, inclusive. Null means the period has no start.",
            "format": "date",
            "nullable": true
          },
          "ValidUntil": {
            "type": "string",
            "description": "The last day of the period, inclusive. Null means the period has no end.",
            "format": "date",
            "nullable": true
          },
          "Employees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "The employee, or the group's current members."
          }
        },
        "additionalProperties": false,
        "description": "One period over which an employee or a group holds the role. The same holder appears once for each of their\nperiods."
      },
      "ReportQuery": {
        "required": [
          "StartDate",
          "EndDate",
          "DataTypes",
          "Dimensions"
        ],
        "type": "object",
        "properties": {
          "StartDate": {
            "type": "string",
            "format": "date"
          },
          "EndDate": {
            "type": "string",
            "format": "date"
          },
          "DataTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "External codes of the data types to calculate, from `v3/reports/dataTypes`. At least one, none\nrepeated. A code that several data types share is refused."
          },
          "Dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportQueryDimension"
            },
            "description": "What to group the values by, none repeated: `Date`, `Month`, `Employee`, `Object`,\n`WorkType` or `CompensationType`. Without dimensions the response is one row of totals."
          },
          "EmployeeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Only these employees. With the `Employee` dimension each of them gets a row, of zeroes when there\nis no data.",
            "nullable": true
          },
          "ObjectIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Only these objects. With the `Object` dimension each of them gets a row, of zeroes when there is no\ndata.",
            "nullable": true
          },
          "WorkTypeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Only these work types, from `v3/workingTimes/workTypes`. With the `WorkType` dimension each of\nthem gets a row, of zeroes when there is no data. Compensations have no work type, so this leaves them\nout.",
            "nullable": true
          },
          "IncludeUnapproved": {
            "type": "boolean",
            "description": "Whether to count items still waiting for approval too. By default only approved items count; declined\nones never do."
          }
        },
        "additionalProperties": false
      },
      "ReportQueryDimension": {
        "enum": [
          "Date",
          "Month",
          "Employee",
          "Object",
          "WorkType",
          "CompensationType"
        ],
        "type": "string"
      },
      "ReportRow": {
        "required": [
          "Dimensions",
          "Values"
        ],
        "type": "object",
        "properties": {
          "Dimensions": {
            "type": "object"
          },
          "Values": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          }
        },
        "additionalProperties": false,
        "description": "One row of a report query. `Dimensions` is keyed by the dimension names asked for. `Employee`,\n`Object`, `WorkType` and `CompensationType` hold the item as\n`{ Id, Name, ExternalCode }`, `Date` a date and `Month` a month as `yyyy-MM`. Null\nstands for data without that value, such as work on no object; work has no compensation type and\ncompensations no work type. `Values` is keyed by the data types' external codes and holds each in the\ndata type's own unit, such as hours."
      },
      "Result": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "The ID of an item, such as the one an add endpoint created."
      },
      "ScheduledWorkingTime": {
        "required": [
          "Id",
          "Employee",
          "StartTime",
          "EndTime",
          "WorkedHours",
          "Object",
          "WorkType",
          "IsApproved",
          "SpecialRate",
          "ShiftTemplate",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartTime": {
            "type": "string",
            "format": "date-time"
          },
          "EndTime": {
            "type": "string",
            "format": "date-time"
          },
          "WorkedHours": {
            "type": "number",
            "description": "Scheduled hours: the time from start to end minus the break.",
            "format": "double"
          },
          "Object": {
            "$ref": "#/components/schemas/Item"
          },
          "WorkType": {
            "$ref": "#/components/schemas/Item"
          },
          "IsApproved": {
            "type": "boolean"
          },
          "SpecialRate": {
            "$ref": "#/components/schemas/SpecialRate"
          },
          "ShiftTemplate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShiftTemplate"
              }
            ],
            "description": "The shift template the scheduled working time was made from, if any."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "ScheduledWorkingTimeChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ScheduledWorkingTime"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "ShiftTemplate": {
        "required": [
          "Id",
          "Name",
          "Abbreviation"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Abbreviation": {
            "type": "string",
            "description": "A short name shown in schedules.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A template that scheduled working times are made from."
      },
      "SpecialRate": {
        "required": [
          "Id",
          "Name",
          "Rate"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Rate": {
            "type": "number",
            "description": "The rate as a fraction rather than a percentage, e.g. 1.5 for 150 %. Null when no rate is set.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VacationBalance": {
        "required": [
          "Employee",
          "Type",
          "Balance",
          "AnnualEntitledVacationDays"
        ],
        "type": "object",
        "properties": {
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "Type": {
            "$ref": "#/components/schemas/Item"
          },
          "Balance": {
            "type": "number",
            "description": "Days left at the end of the requested date, after the approved absences up to that date; absences still\nwaiting for approval are not subtracted. Null when the employee's balance only starts being counted\nafter that date.",
            "format": "double",
            "nullable": true
          },
          "AnnualEntitledVacationDays": {
            "type": "number",
            "description": "Days earned in the whole balance year that contains the requested date. The balance year is the calendar\nyear unless the absence type starts it in another month.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "An employee's vacation balance of one absence type."
      },
      "Wage": {
        "required": [
          "Id",
          "Employee",
          "IsApproved",
          "Date",
          "PaymentDate",
          "Type",
          "Amount",
          "Coefficient",
          "Rate",
          "Sum",
          "NetSalary",
          "EmployerCost",
          "SocialTax",
          "IncomeTax",
          "PensionPayment",
          "EmployeeUnemploymentPayment",
          "EmployerUnemploymentPayment",
          "TsdCode",
          "DebitAccount",
          "Description",
          "IsAccountedForAveragePay",
          "RecalculatedWageIds",
          "ModifiedAt"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "IsApproved": {
            "type": "boolean",
            "description": "False for a wage waiting for confirmation, and in `changes` also for a declined one."
          },
          "Date": {
            "type": "string",
            "description": "The date the wage is for, usually the last day of the month it is earned in.",
            "format": "date"
          },
          "PaymentDate": {
            "type": "string",
            "format": "date"
          },
          "Type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ItemWithType"
              }
            ],
            "description": "What the wage is paid for: a `WageType` (`v3/wages/types`), a `VacationType`\n(`v3/absences/types`) or a `CompensationType` (`v3/compensations/types`). Null for a wage\nwithout one, such as the one adding social tax up to the monthly minimum."
          },
          "Amount": {
            "type": "number",
            "description": "The quantity paid for, such as hours or days.",
            "format": "double"
          },
          "Coefficient": {
            "type": "number",
            "format": "double"
          },
          "Rate": {
            "type": "number",
            "description": "The pay per unit of `Amount`.",
            "format": "double"
          },
          "Sum": {
            "type": "number",
            "description": "Gross pay: `Amount` × `Coefficient` × `Rate`, rounded to 2 decimals. Negative for a\nrecalculation that lowers earlier wages.",
            "format": "double"
          },
          "NetSalary": {
            "type": "number",
            "description": "`Sum` less income tax, the employee's unemployment insurance and the pension payment.",
            "format": "double"
          },
          "EmployerCost": {
            "type": "number",
            "description": "`Sum` plus social tax and the employer's unemployment insurance.",
            "format": "double"
          },
          "SocialTax": {
            "type": "number",
            "format": "double"
          },
          "IncomeTax": {
            "type": "number",
            "format": "double"
          },
          "PensionPayment": {
            "type": "number",
            "description": "The employee's funded pension (II pillar) payment withheld from `Sum`.",
            "format": "double"
          },
          "EmployeeUnemploymentPayment": {
            "type": "number",
            "format": "double"
          },
          "EmployerUnemploymentPayment": {
            "type": "number",
            "format": "double"
          },
          "TsdCode": {
            "type": "string",
            "description": "The payment type code of the Estonian TSD tax declaration, which decides which taxes apply. Null for a\nwage without taxes.",
            "nullable": true
          },
          "DebitAccount": {
            "type": "string",
            "description": "The accounting account the wage is booked to as an expense.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "IsAccountedForAveragePay": {
            "type": "boolean",
            "description": "Whether the wage counts toward the employee's average pay, used for vacation pay."
          },
          "RecalculatedWageIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "For a recalculation, the IDs of the earlier wages it corrects; this wage then holds the difference.\nEmpty otherwise."
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "A wage of an employee: `Amount` × `Coefficient` × `Rate`, with its taxes."
      },
      "WageChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Wage"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      },
      "WagesReportData": {
        "required": [
          "Employee",
          "Project",
          "WorkType",
          "WageType",
          "Amount",
          "Coefficient",
          "Rate"
        ],
        "type": "object",
        "properties": {
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "Project": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "The object the work was done on. Null for pay not tied to an object."
          },
          "WorkType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "Null for pay not tied to a work type."
          },
          "WageType": {
            "$ref": "#/components/schemas/Item"
          },
          "Amount": {
            "type": "number",
            "description": "The quantity paid for in the wage type's base, such as hours.",
            "format": "double"
          },
          "Coefficient": {
            "type": "number",
            "description": "The wage type's coefficient, 1 when it has none.",
            "format": "double"
          },
          "Rate": {
            "type": "number",
            "description": "The pay per unit of `Amount`.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "One row of the wages report: what an employee earns by one wage type for the work on one object and of one\nwork type. The row's sum is `Amount` × `Coefficient` × `Rate`."
      },
      "WorkEquipment": {
        "required": [
          "Id",
          "Employee",
          "Name",
          "Type",
          "ApprovalTime",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Item"
              }
            ],
            "description": "Null when the equipment is not assigned to anyone."
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Item"
          },
          "ApprovalTime": {
            "type": "string",
            "description": "When the employee confirmed the equipment; null until they do.",
            "format": "date-time",
            "nullable": true
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "WorkEquipmentType": {
        "required": [
          "Id",
          "Name",
          "Description",
          "BlockWemplyIfNotApproved",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Name": {
            "type": "string"
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "BlockWemplyIfNotApproved": {
            "type": "boolean",
            "description": "Whether an employee who has not confirmed equipment of this type within 7 days of it being added is\nblocked from using Wemply until they confirm it."
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "WorkingLocation": {
        "required": [
          "Name",
          "AdsCode"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "type": "string"
          },
          "AdsCode": {
            "type": "integer",
            "description": "Address ID of the location in the Estonian Address Data System (ADS).",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WorkingTime": {
        "required": [
          "Id",
          "Employee",
          "StartTime",
          "MethodOfStart",
          "EndTime",
          "MethodOfEnd",
          "WorkedHours",
          "Object",
          "WorkType",
          "IsApproved",
          "SpecialRate",
          "ModifiedAt",
          "ExtraData"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "Employee": {
            "$ref": "#/components/schemas/Item"
          },
          "StartTime": {
            "type": "string",
            "format": "date-time"
          },
          "MethodOfStart": {
            "type": "string",
            "description": "How the working time was started: `Common` (entered by hand or through the API), `Timer`,\n`Automatic` (added by an automatic shift), `BiometricDevice` or `Telephone`."
          },
          "EndTime": {
            "type": "string",
            "description": "Null while the working time has not been ended yet, e.g. a running timer.",
            "format": "date-time",
            "nullable": true
          },
          "MethodOfEnd": {
            "type": "string",
            "description": "How the working time was ended: `Common`, `Timer`, `Automatic`, `BiometricDevice` or\n`Telephone`. Null while it has not been ended yet.",
            "nullable": true
          },
          "WorkedHours": {
            "type": "number",
            "description": "Hours worked: the time from start to end minus the break and any time the company's working time rules\nleave uncounted.",
            "format": "double"
          },
          "Object": {
            "$ref": "#/components/schemas/Item"
          },
          "WorkType": {
            "$ref": "#/components/schemas/Item"
          },
          "IsApproved": {
            "type": "boolean",
            "description": "False also when the working time is approved only partly (by a sub-approver) or declined."
          },
          "SpecialRate": {
            "$ref": "#/components/schemas/SpecialRate"
          },
          "ModifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ExtraData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "WorkingTimeChange": {
        "required": [
          "Id",
          "LastChangeTime",
          "IsDeleted",
          "Data"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64"
          },
          "LastChangeTime": {
            "type": "string",
            "description": "When the item was last changed or deleted. The next request can pass it as `modifiedSince`.",
            "format": "date-time"
          },
          "IsDeleted": {
            "type": "boolean"
          },
          "Data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WorkingTime"
              }
            ],
            "description": "The item as it is now; null when it has been deleted."
          }
        },
        "additionalProperties": false,
        "description": "An item that was added, changed or deleted."
      }
    },
    "securitySchemes": {
      "API Key": {
        "type": "apiKey",
        "name": "apiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "API Key": [ ]
    }
  ]
}